Search is not available for this dataset
repo_name string | path string | license string | full_code string | full_size int64 | uncommented_code string | uncommented_size int64 | function_only_code string | function_only_size int64 | is_commented bool | is_signatured bool | n_ast_errors int64 | ast_max_depth int64 | n_whitespaces int64 | n_ast_nodes int64 | n_ast_terminals int64 | n_ast_nonterminals int64 | loc int64 | cycloplexity int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
spechub/Hets | HasCASL/InteractiveTests.hs | gpl-2.0 | collectNodes dg nds = do
let ledgs = concatMap (innDG dg) nds
newnds = map linkSource ledgs
showl = map f ledgs
f (x, _, lbl) = show x ++ ":" ++ show (pretty $ dgl_origin lbl)
print showl
collectNodes dg newnds | 234 | collectNodes dg nds = do
let ledgs = concatMap (innDG dg) nds
newnds = map linkSource ledgs
showl = map f ledgs
f (x, _, lbl) = show x ++ ":" ++ show (pretty $ dgl_origin lbl)
print showl
collectNodes dg newnds | 234 | collectNodes dg nds = do
let ledgs = concatMap (innDG dg) nds
newnds = map linkSource ledgs
showl = map f ledgs
f (x, _, lbl) = show x ++ ":" ++ show (pretty $ dgl_origin lbl)
print showl
collectNodes dg newnds | 234 | false | false | 0 | 14 | 65 | 106 | 50 | 56 | null | null |
danidiaz/haskell-sandbox | comprehend2.hs | mit | -- Get all B values for which the component also has A = 4
filtered :: [String]
filtered = do
c <- clist
A 4 <- _capabilities c
B z <- _capabilities c
return z | 172 | filtered :: [String]
filtered = do
c <- clist
A 4 <- _capabilities c
B z <- _capabilities c
return z | 113 | filtered = do
c <- clist
A 4 <- _capabilities c
B z <- _capabilities c
return z | 92 | true | true | 0 | 8 | 47 | 54 | 24 | 30 | null | null |
dmjio/CompactMap | src/Data/CompactMap/Index.hs | bsd-3-clause | balance !pos
= do --keyCursor <- extractElemIdx pos
--bs <- peekKeyCursorKey keyCursor
--putStrLn $ "Balancing: " ++ show (decode (Lazy.fromChunks [bs]) :: Integer)
!left <- extractLeft pos
!right <- extractRight pos
!sizeL <- getSize left
!sizeR <- getSize right
putSize pos (sizeL+sizeR+1)
case () of
() | sizeL + sizeR <= 1 -> return ()
| sizeR >= delta*sizeL -> rotateL pos left right
| sizeL >= delta*sizeR -> rotateR pos left right
| otherwise -> return () | 604 | balance !pos
= do --keyCursor <- extractElemIdx pos
--bs <- peekKeyCursorKey keyCursor
--putStrLn $ "Balancing: " ++ show (decode (Lazy.fromChunks [bs]) :: Integer)
!left <- extractLeft pos
!right <- extractRight pos
!sizeL <- getSize left
!sizeR <- getSize right
putSize pos (sizeL+sizeR+1)
case () of
() | sizeL + sizeR <= 1 -> return ()
| sizeR >= delta*sizeL -> rotateL pos left right
| sizeL >= delta*sizeR -> rotateR pos left right
| otherwise -> return () | 604 | balance !pos
= do --keyCursor <- extractElemIdx pos
--bs <- peekKeyCursorKey keyCursor
--putStrLn $ "Balancing: " ++ show (decode (Lazy.fromChunks [bs]) :: Integer)
!left <- extractLeft pos
!right <- extractRight pos
!sizeL <- getSize left
!sizeR <- getSize right
putSize pos (sizeL+sizeR+1)
case () of
() | sizeL + sizeR <= 1 -> return ()
| sizeR >= delta*sizeL -> rotateL pos left right
| sizeL >= delta*sizeR -> rotateR pos left right
| otherwise -> return () | 604 | false | false | 0 | 14 | 219 | 175 | 76 | 99 | null | null |
sdiehl/ghc | compiler/simplCore/OccurAnal.hs | bsd-3-clause | extendFvs_ :: UniqFM VarSet -> VarSet -> VarSet
extendFvs_ env s = fst (extendFvs env s) | 88 | extendFvs_ :: UniqFM VarSet -> VarSet -> VarSet
extendFvs_ env s = fst (extendFvs env s) | 88 | extendFvs_ env s = fst (extendFvs env s) | 40 | false | true | 0 | 7 | 15 | 38 | 18 | 20 | null | null |
brendanhay/gogol | gogol-play-moviespartner/gen/Network/Google/PlayMoviesPartner/Types/Product.hs | mpl-2.0 | -- | Default Season name, usually in the language of the country of origin.
-- Only available for TV Edits Example: \"Googlers, The - A Brave New
-- World\".
siSeasonName :: Lens' StoreInfo (Maybe Text)
siSeasonName
= lens _siSeasonName (\ s a -> s{_siSeasonName = a}) | 270 | siSeasonName :: Lens' StoreInfo (Maybe Text)
siSeasonName
= lens _siSeasonName (\ s a -> s{_siSeasonName = a}) | 112 | siSeasonName
= lens _siSeasonName (\ s a -> s{_siSeasonName = a}) | 67 | true | true | 0 | 9 | 47 | 50 | 27 | 23 | null | null |
ksaveljev/hake-2 | src/Game/Monsters/MInsane.hs | bsd-3-clause | insaneMoveCrawlPain :: MMoveT
insaneMoveCrawlPain = MMoveT "insaneMoveCrawlPain" frameCrawlPain2 frameCrawlPain10 insaneFramesCrawlPain (Just insaneRun) | 152 | insaneMoveCrawlPain :: MMoveT
insaneMoveCrawlPain = MMoveT "insaneMoveCrawlPain" frameCrawlPain2 frameCrawlPain10 insaneFramesCrawlPain (Just insaneRun) | 152 | insaneMoveCrawlPain = MMoveT "insaneMoveCrawlPain" frameCrawlPain2 frameCrawlPain10 insaneFramesCrawlPain (Just insaneRun) | 122 | false | true | 0 | 7 | 11 | 34 | 15 | 19 | null | null |
kawu/dawg-ord | src/Data/DAWG/Int/Dynamic/Node.hs | bsd-2-clause | -- | List of symbol/edge pairs outgoing from the node.
edges :: Node -> [(Sym, ID)]
edges (Node _ t) = T.toList t | 114 | edges :: Node -> [(Sym, ID)]
edges (Node _ t) = T.toList t | 59 | edges (Node _ t) = T.toList t | 30 | true | true | 0 | 9 | 23 | 46 | 23 | 23 | null | null |
mathologist/hTestMaker | testmaker/src/TestMaker/SageTex.hs | gpl-3.0 | findMatch' count pos t = case T.head t of
'}' -> findMatch' (count - 1) (pos + 1) (T.tail t)
'{' -> findMatch' (count + 1) (pos + 1) (T.tail t)
_ -> findMatch' count (pos + 1) (T.tail t)
-- | Find the position of the batching brace. This only works for curly braces. | 348 | findMatch' count pos t = case T.head t of
'}' -> findMatch' (count - 1) (pos + 1) (T.tail t)
'{' -> findMatch' (count + 1) (pos + 1) (T.tail t)
_ -> findMatch' count (pos + 1) (T.tail t)
-- | Find the position of the batching brace. This only works for curly braces. | 348 | findMatch' count pos t = case T.head t of
'}' -> findMatch' (count - 1) (pos + 1) (T.tail t)
'{' -> findMatch' (count + 1) (pos + 1) (T.tail t)
_ -> findMatch' count (pos + 1) (T.tail t)
-- | Find the position of the batching brace. This only works for curly braces. | 348 | false | false | 1 | 11 | 136 | 126 | 61 | 65 | null | null |
GaloisInc/HaNS | tests/Tests/IP4/Icmp4.hs | bsd-3-clause | arbitraryRouterAddress :: Gen RouterAddress
arbitraryRouterAddress =
do a <- arbitraryIP4
b <- arbitraryPreferenceLevel
return $! RouterAddress a b | 160 | arbitraryRouterAddress :: Gen RouterAddress
arbitraryRouterAddress =
do a <- arbitraryIP4
b <- arbitraryPreferenceLevel
return $! RouterAddress a b | 160 | arbitraryRouterAddress =
do a <- arbitraryIP4
b <- arbitraryPreferenceLevel
return $! RouterAddress a b | 116 | false | true | 0 | 8 | 30 | 40 | 18 | 22 | null | null |
mcschroeder/ghc | compiler/hsSyn/HsDecls.hs | bsd-3-clause | -- Simple classifiers for TyClDecl
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- | @True@ <=> argument is a @data@\/@newtype@
-- declaration.
isDataDecl :: TyClDecl name -> Bool
isDataDecl (DataDecl {}) = True | 202 | isDataDecl :: TyClDecl name -> Bool
isDataDecl (DataDecl {}) = True | 67 | isDataDecl (DataDecl {}) = True | 31 | true | true | 0 | 7 | 28 | 32 | 18 | 14 | null | null |
23Skidoo/text | Data/Text/Lazy.hs | bsd-2-clause | -- | /O(n)/ 'zip' takes two 'Text's and returns a list of
-- corresponding pairs of bytes. If one input 'Text' is short,
-- excess elements of the longer 'Text' are discarded. This is
-- equivalent to a pair of 'unpack' operations.
zip :: Text -> Text -> [(Char,Char)]
zip a b = S.unstreamList $ S.zipWith (,) (stream a) (stream b) | 331 | zip :: Text -> Text -> [(Char,Char)]
zip a b = S.unstreamList $ S.zipWith (,) (stream a) (stream b) | 99 | zip a b = S.unstreamList $ S.zipWith (,) (stream a) (stream b) | 62 | true | true | 0 | 8 | 60 | 67 | 37 | 30 | null | null |
michalkonecny/aern2 | aern2-mfun/src/AERN2/BoxFunMinMax/Expressions/Type.hs | bsd-3-clause | simplifyF (FConn Impl _ FTrue) = FTrue | 68 | simplifyF (FConn Impl _ FTrue) = FTrue | 68 | simplifyF (FConn Impl _ FTrue) = FTrue | 68 | false | false | 0 | 7 | 36 | 19 | 9 | 10 | null | null |
bos/wreq | tests/AWS/IAM.hs | bsd-3-clause | testPolicyName :: T.Text
testPolicyName = "testPolicy" | 54 | testPolicyName :: T.Text
testPolicyName = "testPolicy" | 54 | testPolicyName = "testPolicy" | 29 | false | true | 0 | 5 | 5 | 13 | 7 | 6 | null | null |
ducis/haAni | hs/common/Graphics/Rendering/OpenGL/GL/PixelRectangles/Histogram.hs | gpl-2.0 | --------------------------------------------------------------------------------
resetHistogram :: IO ()
resetHistogram = glResetHistogram (marshalHistogramTarget Histogram) | 174 | resetHistogram :: IO ()
resetHistogram = glResetHistogram (marshalHistogramTarget Histogram) | 92 | resetHistogram = glResetHistogram (marshalHistogramTarget Histogram) | 68 | true | true | 0 | 7 | 10 | 26 | 13 | 13 | null | null |
bgamari/text | src/Data/Text/Lazy/Encoding.hs | bsd-2-clause | -- | Decode text from little endian UTF-16 encoding.
--
-- If the input contains any invalid little endian UTF-16 data, an
-- exception will be thrown. For more control over the handling of
-- invalid data, use 'decodeUtf16LEWith'.
decodeUtf16LE :: B.ByteString -> Text
decodeUtf16LE = decodeUtf16LEWith strictDecode | 317 | decodeUtf16LE :: B.ByteString -> Text
decodeUtf16LE = decodeUtf16LEWith strictDecode | 84 | decodeUtf16LE = decodeUtf16LEWith strictDecode | 46 | true | true | 0 | 6 | 48 | 25 | 15 | 10 | null | null |
phadej/psqueues | src/Data/IntPSQ/Internal.hs | bsd-3-clause | -- | /O(min(n,W))/ The priority and value of a given key, or 'Nothing' if the
-- key is not bound.
lookup :: Int -> IntPSQ p v -> Maybe (p, v)
lookup k = go
where
go t = case t of
Nil -> Nothing
Tip k' p' x'
| k == k' -> Just (p', x')
| otherwise -> Nothing
Bin k' p' x' m l r
| nomatch k k' m -> Nothing
| k == k' -> Just (p', x')
| zero k m -> go l
| otherwise -> go r
-- | /O(1)/ The element with the lowest priority. | 558 | lookup :: Int -> IntPSQ p v -> Maybe (p, v)
lookup k = go
where
go t = case t of
Nil -> Nothing
Tip k' p' x'
| k == k' -> Just (p', x')
| otherwise -> Nothing
Bin k' p' x' m l r
| nomatch k k' m -> Nothing
| k == k' -> Just (p', x')
| zero k m -> go l
| otherwise -> go r
-- | /O(1)/ The element with the lowest priority. | 459 | lookup k = go
where
go t = case t of
Nil -> Nothing
Tip k' p' x'
| k == k' -> Just (p', x')
| otherwise -> Nothing
Bin k' p' x' m l r
| nomatch k k' m -> Nothing
| k == k' -> Just (p', x')
| zero k m -> go l
| otherwise -> go r
-- | /O(1)/ The element with the lowest priority. | 415 | true | true | 0 | 11 | 241 | 184 | 87 | 97 | null | null |
QuickChick/Luck | luck/src/Core/Optimizations.hs | mit | inlineLeaves :: Map VarId String -> Map ConId String -> Int -> FMap -> Exp
-> ConId -> ConId -> (Int, FMap, Exp)
inlineLeaves vrev crev step fenv e cTrue cFalse =
let leaves = getLeafFunctions fenv
rs = R { _fenv = Map.map (undefined,) fenv
, _step = step
, _pred = \fid -> return (Set.member fid leaves)
, _localAdjust = \fid r -> r
, _vrev = vrev
, _crev = crev
, _nesting = 0
}
(fs, idxs) = unzip $ map (\(fid, FItem args e) ->
let (e', idx) = runState ?? 1 $ runReaderT ?? rs $ inlineExp e
eComp = evalState (compute e') (CS cTrue cFalse)
in ((fid, FItem args eComp), idx)
) $ Map.assocs fenv
(e',idx') = runState ?? 1 $ runReaderT ?? rs $ inlineExp e
in (maximum (idx':idxs), Map.fromList fs, e') | 998 | inlineLeaves :: Map VarId String -> Map ConId String -> Int -> FMap -> Exp
-> ConId -> ConId -> (Int, FMap, Exp)
inlineLeaves vrev crev step fenv e cTrue cFalse =
let leaves = getLeafFunctions fenv
rs = R { _fenv = Map.map (undefined,) fenv
, _step = step
, _pred = \fid -> return (Set.member fid leaves)
, _localAdjust = \fid r -> r
, _vrev = vrev
, _crev = crev
, _nesting = 0
}
(fs, idxs) = unzip $ map (\(fid, FItem args e) ->
let (e', idx) = runState ?? 1 $ runReaderT ?? rs $ inlineExp e
eComp = evalState (compute e') (CS cTrue cFalse)
in ((fid, FItem args eComp), idx)
) $ Map.assocs fenv
(e',idx') = runState ?? 1 $ runReaderT ?? rs $ inlineExp e
in (maximum (idx':idxs), Map.fromList fs, e') | 998 | inlineLeaves vrev crev step fenv e cTrue cFalse =
let leaves = getLeafFunctions fenv
rs = R { _fenv = Map.map (undefined,) fenv
, _step = step
, _pred = \fid -> return (Set.member fid leaves)
, _localAdjust = \fid r -> r
, _vrev = vrev
, _crev = crev
, _nesting = 0
}
(fs, idxs) = unzip $ map (\(fid, FItem args e) ->
let (e', idx) = runState ?? 1 $ runReaderT ?? rs $ inlineExp e
eComp = evalState (compute e') (CS cTrue cFalse)
in ((fid, FItem args eComp), idx)
) $ Map.assocs fenv
(e',idx') = runState ?? 1 $ runReaderT ?? rs $ inlineExp e
in (maximum (idx':idxs), Map.fromList fs, e') | 871 | false | true | 0 | 21 | 436 | 352 | 188 | 164 | null | null |
jdreaver/eventful | eventful-memory/src/Eventful/ProjectionCache/Memory.hs | mit | projectionMapTVar :: IO (TVar (ProjectionMap key position serialized))
projectionMapTVar = newTVarIO emptyProjectionMap | 119 | projectionMapTVar :: IO (TVar (ProjectionMap key position serialized))
projectionMapTVar = newTVarIO emptyProjectionMap | 119 | projectionMapTVar = newTVarIO emptyProjectionMap | 48 | false | true | 0 | 9 | 11 | 33 | 16 | 17 | null | null |
cnc-patch/disass | src/Language/Assembly/X86/Parse.hs | bsd-3-clause | parseRCPPS :: (Stream s m Word8, Monad m) => t -> ParsecT s PState m Instr
parseRCPPS = parseXmmVW RCPPS RCPSS InvalidOpcode InvalidOpcode | 138 | parseRCPPS :: (Stream s m Word8, Monad m) => t -> ParsecT s PState m Instr
parseRCPPS = parseXmmVW RCPPS RCPSS InvalidOpcode InvalidOpcode | 138 | parseRCPPS = parseXmmVW RCPPS RCPSS InvalidOpcode InvalidOpcode | 63 | false | true | 0 | 7 | 22 | 52 | 26 | 26 | null | null |
bermanjosh/bloodhound | src/Database/V1/Bloodhound/Client.hs | bsd-3-clause | simpleAccumulator :: (FromJSON a, MonadBH m, MonadThrow m) => [Hit a] -> ([Hit a], Maybe ScrollId) -> m ([Hit a], Maybe ScrollId)
simpleAccumulator oldHits (newHits, Nothing) = return (oldHits ++ newHits, Nothing) | 213 | simpleAccumulator :: (FromJSON a, MonadBH m, MonadThrow m) => [Hit a] -> ([Hit a], Maybe ScrollId) -> m ([Hit a], Maybe ScrollId)
simpleAccumulator oldHits (newHits, Nothing) = return (oldHits ++ newHits, Nothing) | 213 | simpleAccumulator oldHits (newHits, Nothing) = return (oldHits ++ newHits, Nothing) | 83 | false | true | 0 | 11 | 31 | 103 | 54 | 49 | null | null |
GaloisInc/halvm-ghc | compiler/typecheck/TcType.hs | bsd-3-clause | isFlexi, isIndirect :: MetaDetails -> Bool
isFlexi Flexi = True | 63 | isFlexi, isIndirect :: MetaDetails -> Bool
isFlexi Flexi = True | 63 | isFlexi Flexi = True | 20 | false | true | 2 | 5 | 9 | 25 | 11 | 14 | null | null |
tjhance/logic-puzzles | src/Battleship.hs | mit | -- ship points down: cell is first on a vertical ship
isCellStateOkay FaceDown (ctype, i, n) = (ctype .== literal Vert &&& i .== 0 &&& n .>= literal 2) | 151 | isCellStateOkay FaceDown (ctype, i, n) = (ctype .== literal Vert &&& i .== 0 &&& n .>= literal 2) | 97 | isCellStateOkay FaceDown (ctype, i, n) = (ctype .== literal Vert &&& i .== 0 &&& n .>= literal 2) | 97 | true | false | 0 | 11 | 29 | 50 | 26 | 24 | null | null |
spechub/Hets | THF/Sublogic.hs | gpl-2.0 | tHFP_P = tHFP { ext_Poly = True } | 33 | tHFP_P = tHFP { ext_Poly = True } | 33 | tHFP_P = tHFP { ext_Poly = True } | 33 | false | false | 1 | 7 | 7 | 21 | 9 | 12 | null | null |
j-rock/rayt | src/Ray/Shape.hs | mit | getShapeBounds (Triangle (V x1 y1 z1) (V x2 y2 z2) (V x3 y3 z3)) =
let minV = V (minimum [x1,x2,x3]) (minimum [y1,y2,y3]) (minimum [z1,z2,z3])
maxV = V (maximum [x1,x2,x3]) (maximum [y1,y2,y3]) (maximum [z1,z2,z3])
in Bounds minV maxV | 251 | getShapeBounds (Triangle (V x1 y1 z1) (V x2 y2 z2) (V x3 y3 z3)) =
let minV = V (minimum [x1,x2,x3]) (minimum [y1,y2,y3]) (minimum [z1,z2,z3])
maxV = V (maximum [x1,x2,x3]) (maximum [y1,y2,y3]) (maximum [z1,z2,z3])
in Bounds minV maxV | 251 | getShapeBounds (Triangle (V x1 y1 z1) (V x2 y2 z2) (V x3 y3 z3)) =
let minV = V (minimum [x1,x2,x3]) (minimum [y1,y2,y3]) (minimum [z1,z2,z3])
maxV = V (maximum [x1,x2,x3]) (maximum [y1,y2,y3]) (maximum [z1,z2,z3])
in Bounds minV maxV | 251 | false | false | 0 | 12 | 54 | 176 | 94 | 82 | null | null |
jgonggrijp/net-prove | src/Main.hs | bsd-3-clause | stage3 :: [CompositionGraph] -> IO ()
stage3 gs = do
putStrLn "The associated term(s) are:"
mapM_ print $ termsFromProofnet' $ head gs
-- Generates possible proof structures for "(a/b)/b", as in Figure 15 of M&M (2012) | 224 | stage3 :: [CompositionGraph] -> IO ()
stage3 gs = do
putStrLn "The associated term(s) are:"
mapM_ print $ termsFromProofnet' $ head gs
-- Generates possible proof structures for "(a/b)/b", as in Figure 15 of M&M (2012) | 224 | stage3 gs = do
putStrLn "The associated term(s) are:"
mapM_ print $ termsFromProofnet' $ head gs
-- Generates possible proof structures for "(a/b)/b", as in Figure 15 of M&M (2012) | 186 | false | true | 0 | 9 | 41 | 50 | 23 | 27 | null | null |
agrafix/hackage-server | Distribution/Server/Util/ReadDigest.hs | bsd-3-clause | decodeBase16 :: Binary a => String -> Either String a
decodeBase16 str =
case Binary.decodeOrFail . BS.Lazy.fromStrict . readBase16 $ str of
Left (_, _, err) -> Left err
Right (_, _, a) -> Right a
-- | Read base-16 encoded string
--
-- For instance, the string "deadbeef" will be turned into a 4-byte bytestring
-- @[0xDE, 0xAD, 0xBE, 0xEF]@
--
-- TODO: This uses 'error' if the characters out of range. Might be nicer to
-- use @Either String ..@ here too (though less performant). | 503 | decodeBase16 :: Binary a => String -> Either String a
decodeBase16 str =
case Binary.decodeOrFail . BS.Lazy.fromStrict . readBase16 $ str of
Left (_, _, err) -> Left err
Right (_, _, a) -> Right a
-- | Read base-16 encoded string
--
-- For instance, the string "deadbeef" will be turned into a 4-byte bytestring
-- @[0xDE, 0xAD, 0xBE, 0xEF]@
--
-- TODO: This uses 'error' if the characters out of range. Might be nicer to
-- use @Either String ..@ here too (though less performant). | 503 | decodeBase16 str =
case Binary.decodeOrFail . BS.Lazy.fromStrict . readBase16 $ str of
Left (_, _, err) -> Left err
Right (_, _, a) -> Right a
-- | Read base-16 encoded string
--
-- For instance, the string "deadbeef" will be turned into a 4-byte bytestring
-- @[0xDE, 0xAD, 0xBE, 0xEF]@
--
-- TODO: This uses 'error' if the characters out of range. Might be nicer to
-- use @Either String ..@ here too (though less performant). | 449 | false | true | 0 | 9 | 107 | 100 | 54 | 46 | null | null |
dmbarbour/Sirea | tst/TstCross.hs | bsd-3-clause | cross = bfmap (++ "->") >>> bcross | 34 | cross = bfmap (++ "->") >>> bcross | 34 | cross = bfmap (++ "->") >>> bcross | 34 | false | false | 3 | 5 | 6 | 22 | 9 | 13 | null | null |
spatial-reasoning/homer | HomFinder.hs | bsd-2-clause | liftList :: [a] -> [[a]]
liftList lst =
map (\x -> [x]) lst | 63 | liftList :: [a] -> [[a]]
liftList lst =
map (\x -> [x]) lst | 63 | liftList lst =
map (\x -> [x]) lst | 38 | false | true | 0 | 8 | 16 | 43 | 24 | 19 | null | null |
CristhianMotoche/scion | lib/Scion/Utils.hs | bsd-3-clause | thingsAroundPoint :: (Int, Int) -> [Located n] -> [Located n]
thingsAroundPoint pt ls = [ l | l <- ls, spans (getLoc l) pt ] | 124 | thingsAroundPoint :: (Int, Int) -> [Located n] -> [Located n]
thingsAroundPoint pt ls = [ l | l <- ls, spans (getLoc l) pt ] | 124 | thingsAroundPoint pt ls = [ l | l <- ls, spans (getLoc l) pt ] | 62 | false | true | 0 | 9 | 24 | 68 | 35 | 33 | null | null |
imuli/gitit | Network/Gitit/Handlers.hs | gpl-2.0 | discussPage :: Handler
discussPage = do
page <- getPage
base' <- getWikiBase
seeOther (base' ++ urlForPage (if isDiscussPage page then page else ('@':page))) $
toResponse "Redirecting to discussion page" | 230 | discussPage :: Handler
discussPage = do
page <- getPage
base' <- getWikiBase
seeOther (base' ++ urlForPage (if isDiscussPage page then page else ('@':page))) $
toResponse "Redirecting to discussion page" | 230 | discussPage = do
page <- getPage
base' <- getWikiBase
seeOther (base' ++ urlForPage (if isDiscussPage page then page else ('@':page))) $
toResponse "Redirecting to discussion page" | 207 | false | true | 0 | 16 | 55 | 76 | 35 | 41 | null | null |
conal/hermit | src/HERMIT/Dictionary/FixPoint.hs | bsd-2-clause | fixComputationRuleBR :: BiRewriteH CoreExpr
fixComputationRuleBR = bidirectional computationL computationR
where
computationL :: RewriteH CoreExpr
computationL = prefixFailMsg "fix computation rule failed: " $
do (_,f) <- isFixExprT
fixf <- idR
return (App f fixf)
computationR :: RewriteH CoreExpr
computationR = prefixFailMsg "(backwards) fix computation rule failed: " $
do App f fixf <- idR
(_,f') <- isFixExprT <<< constant fixf
guardMsg (exprAlphaEq f f') "external function does not match internal expression"
return fixf
-- | @fix tyA (\\ a -> f (g a))@ \<==\> @f (fix tyB (\\ b -> g (f b))@ | 771 | fixComputationRuleBR :: BiRewriteH CoreExpr
fixComputationRuleBR = bidirectional computationL computationR
where
computationL :: RewriteH CoreExpr
computationL = prefixFailMsg "fix computation rule failed: " $
do (_,f) <- isFixExprT
fixf <- idR
return (App f fixf)
computationR :: RewriteH CoreExpr
computationR = prefixFailMsg "(backwards) fix computation rule failed: " $
do App f fixf <- idR
(_,f') <- isFixExprT <<< constant fixf
guardMsg (exprAlphaEq f f') "external function does not match internal expression"
return fixf
-- | @fix tyA (\\ a -> f (g a))@ \<==\> @f (fix tyB (\\ b -> g (f b))@ | 771 | fixComputationRuleBR = bidirectional computationL computationR
where
computationL :: RewriteH CoreExpr
computationL = prefixFailMsg "fix computation rule failed: " $
do (_,f) <- isFixExprT
fixf <- idR
return (App f fixf)
computationR :: RewriteH CoreExpr
computationR = prefixFailMsg "(backwards) fix computation rule failed: " $
do App f fixf <- idR
(_,f') <- isFixExprT <<< constant fixf
guardMsg (exprAlphaEq f f') "external function does not match internal expression"
return fixf
-- | @fix tyA (\\ a -> f (g a))@ \<==\> @f (fix tyB (\\ b -> g (f b))@ | 727 | false | true | 0 | 10 | 264 | 151 | 71 | 80 | null | null |
markus1189/PearlsFAD | src/Surpasser.hs | gpl-3.0 | prop_SortedMergeCorrect :: Ord a => OrderedList a -> OrderedList a -> Bool
prop_SortedMergeCorrect (Ordered xs) (Ordered ys) =
sortedMerge xs ys == sort (xs ++ ys) | 165 | prop_SortedMergeCorrect :: Ord a => OrderedList a -> OrderedList a -> Bool
prop_SortedMergeCorrect (Ordered xs) (Ordered ys) =
sortedMerge xs ys == sort (xs ++ ys) | 165 | prop_SortedMergeCorrect (Ordered xs) (Ordered ys) =
sortedMerge xs ys == sort (xs ++ ys) | 90 | false | true | 0 | 8 | 27 | 68 | 32 | 36 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/Cabal/Distribution/Simple.hs | bsd-3-clause | buildAction :: UserHooks -> BuildFlags -> Args -> IO ()
buildAction hooks flags args = do
let distPref = fromFlag $ buildDistPref flags
verbosity = fromFlag $ buildVerbosity flags
lbi <- getBuildConfig hooks verbosity distPref
progs <- reconfigurePrograms verbosity
(buildProgramPaths flags)
(buildProgramArgs flags)
(withPrograms lbi)
hookedAction preBuild buildHook postBuild
(return lbi { withPrograms = progs })
hooks flags { buildArgs = args } args | 539 | buildAction :: UserHooks -> BuildFlags -> Args -> IO ()
buildAction hooks flags args = do
let distPref = fromFlag $ buildDistPref flags
verbosity = fromFlag $ buildVerbosity flags
lbi <- getBuildConfig hooks verbosity distPref
progs <- reconfigurePrograms verbosity
(buildProgramPaths flags)
(buildProgramArgs flags)
(withPrograms lbi)
hookedAction preBuild buildHook postBuild
(return lbi { withPrograms = progs })
hooks flags { buildArgs = args } args | 539 | buildAction hooks flags args = do
let distPref = fromFlag $ buildDistPref flags
verbosity = fromFlag $ buildVerbosity flags
lbi <- getBuildConfig hooks verbosity distPref
progs <- reconfigurePrograms verbosity
(buildProgramPaths flags)
(buildProgramArgs flags)
(withPrograms lbi)
hookedAction preBuild buildHook postBuild
(return lbi { withPrograms = progs })
hooks flags { buildArgs = args } args | 483 | false | true | 0 | 11 | 149 | 151 | 73 | 78 | null | null |
rvion/ride | jetpack/src/Data/Map/Strict/AsMap.hs | bsd-3-clause | -- map_deleteFindMax :: forall k a. Map k a -> ((k, a), Map k a)
map_deleteFindMax = I.deleteFindMax | 100 | map_deleteFindMax = I.deleteFindMax | 35 | map_deleteFindMax = I.deleteFindMax | 35 | true | false | 1 | 6 | 17 | 13 | 5 | 8 | null | null |
hvr/jhc | src/Grin/Show.hs | mit | prettyVal (Index p off) = prettyVal p <> char '[' <> prettyVal off <> char ']' | 78 | prettyVal (Index p off) = prettyVal p <> char '[' <> prettyVal off <> char ']' | 78 | prettyVal (Index p off) = prettyVal p <> char '[' <> prettyVal off <> char ']' | 78 | false | false | 0 | 8 | 15 | 41 | 18 | 23 | null | null |
rueshyna/gogol | gogol-safebrowsing/gen/Network/Google/Resource/SafeBrowsing/ThreatListUpdates/Fetch.hs | mpl-2.0 | -- | OAuth bearer token.
tlufBearerToken :: Lens' ThreatListUpdatesFetch (Maybe Text)
tlufBearerToken
= lens _tlufBearerToken
(\ s a -> s{_tlufBearerToken = a}) | 168 | tlufBearerToken :: Lens' ThreatListUpdatesFetch (Maybe Text)
tlufBearerToken
= lens _tlufBearerToken
(\ s a -> s{_tlufBearerToken = a}) | 143 | tlufBearerToken
= lens _tlufBearerToken
(\ s a -> s{_tlufBearerToken = a}) | 82 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
raptros/respond | src/Web/Respond/Response.hs | bsd-3-clause | -- | respond using a ReportableError to generate the response body.
respondReportError :: (MonadRespond m, ReportableError e) => Status -> ResponseHeaders -> e -> m ResponseReceived
respondReportError status headers err = getAcceptHeader >>= respondUsingBody status headers . reportError status err | 298 | respondReportError :: (MonadRespond m, ReportableError e) => Status -> ResponseHeaders -> e -> m ResponseReceived
respondReportError status headers err = getAcceptHeader >>= respondUsingBody status headers . reportError status err | 230 | respondReportError status headers err = getAcceptHeader >>= respondUsingBody status headers . reportError status err | 116 | true | true | 0 | 9 | 39 | 72 | 34 | 38 | null | null |
mcschroeder/ghc | compiler/prelude/PrelRules.hs | bsd-3-clause | primOpRules nm WordGtOp = mkRelOpRule nm (>) [ boundsCmp Gt ] | 64 | primOpRules nm WordGtOp = mkRelOpRule nm (>) [ boundsCmp Gt ] | 64 | primOpRules nm WordGtOp = mkRelOpRule nm (>) [ boundsCmp Gt ] | 64 | false | false | 0 | 7 | 13 | 26 | 13 | 13 | null | null |
nobsun/oi | src/Data/OI/Resource.hs | bsd-3-clause | mapR' _ (Resource r _) = case r of () -> [] | 56 | mapR' _ (Resource r _) = case r of () -> [] | 56 | mapR' _ (Resource r _) = case r of () -> [] | 56 | false | false | 0 | 8 | 24 | 33 | 16 | 17 | null | null |
LumiGuide/blaze-react | src/Text/Blaze/Event.hs | mit | -- | The mouse cursor has entered the region where the target element is
-- visible. The mouse position at the time the event was fired is passed as a
-- parameter to the callback.
onMouseOver :: (MousePosition -> act) -> Attribute act
onMouseOver mkAct = onMouseOverM $ return . mkAct | 285 | onMouseOver :: (MousePosition -> act) -> Attribute act
onMouseOver mkAct = onMouseOverM $ return . mkAct | 104 | onMouseOver mkAct = onMouseOverM $ return . mkAct | 49 | true | true | 0 | 8 | 50 | 44 | 22 | 22 | null | null |
rvion/ride | jetpack/src/Data/Map/AsLmap.hs | bsd-3-clause | -- lmap_mapWithKey :: forall k a b. (k -> a -> b) -> Map k a -> Map k b
lmap_mapWithKey = I.mapWithKey | 102 | lmap_mapWithKey = I.mapWithKey | 30 | lmap_mapWithKey = I.mapWithKey | 30 | true | false | 1 | 6 | 22 | 13 | 5 | 8 | null | null |
tanishiking/hscc | src/TypeCheck.hs | mit | checkAddressRefer _ (CheckedUnaryPointer _ _) = return () | 57 | checkAddressRefer _ (CheckedUnaryPointer _ _) = return () | 57 | checkAddressRefer _ (CheckedUnaryPointer _ _) = return () | 57 | false | false | 0 | 7 | 7 | 24 | 11 | 13 | null | null |
urbanslug/ghc | compiler/main/DynFlags.hs | bsd-3-clause | -- | Set a 'ExtensionFlag'
xopt_set :: DynFlags -> ExtensionFlag -> DynFlags
xopt_set dfs f
= let onoffs = On f : extensions dfs
in dfs { extensions = onoffs,
extensionFlags = flattenExtensionFlags (language dfs) onoffs } | 246 | xopt_set :: DynFlags -> ExtensionFlag -> DynFlags
xopt_set dfs f
= let onoffs = On f : extensions dfs
in dfs { extensions = onoffs,
extensionFlags = flattenExtensionFlags (language dfs) onoffs } | 219 | xopt_set dfs f
= let onoffs = On f : extensions dfs
in dfs { extensions = onoffs,
extensionFlags = flattenExtensionFlags (language dfs) onoffs } | 169 | true | true | 0 | 10 | 61 | 80 | 38 | 42 | null | null |
kmate/HaRe | old/tools/base/lib/Lists.hs | bsd-3-clause | unionMany = nub . concat | 30 | unionMany = nub . concat | 30 | unionMany = nub . concat | 30 | false | false | 0 | 5 | 10 | 10 | 5 | 5 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/cabal-install/Distribution/Client/InstallPlan.hs | bsd-3-clause | showPlanProblem (PackageStateInvalid pkg pkg') =
"Package " ++ display (packageId pkg)
++ " is in the " ++ showPlanState pkg
++ " state but it depends on package " ++ display (packageId pkg')
++ " which is in the " ++ showPlanState pkg'
++ " state"
where
showPlanState (PreExisting _) = "pre-existing"
showPlanState (Configured _) = "configured"
showPlanState (Processing _) = "processing"
showPlanState (Installed _ _) = "installed"
showPlanState (Failed _ _) = "failed"
-- | For an invalid plan, produce a detailed list of problems as human readable
-- error messages. This is mainly intended for debugging purposes.
-- Use 'showPlanProblem' for a human readable explanation.
-- | 721 | showPlanProblem (PackageStateInvalid pkg pkg') =
"Package " ++ display (packageId pkg)
++ " is in the " ++ showPlanState pkg
++ " state but it depends on package " ++ display (packageId pkg')
++ " which is in the " ++ showPlanState pkg'
++ " state"
where
showPlanState (PreExisting _) = "pre-existing"
showPlanState (Configured _) = "configured"
showPlanState (Processing _) = "processing"
showPlanState (Installed _ _) = "installed"
showPlanState (Failed _ _) = "failed"
-- | For an invalid plan, produce a detailed list of problems as human readable
-- error messages. This is mainly intended for debugging purposes.
-- Use 'showPlanProblem' for a human readable explanation.
-- | 721 | showPlanProblem (PackageStateInvalid pkg pkg') =
"Package " ++ display (packageId pkg)
++ " is in the " ++ showPlanState pkg
++ " state but it depends on package " ++ display (packageId pkg')
++ " which is in the " ++ showPlanState pkg'
++ " state"
where
showPlanState (PreExisting _) = "pre-existing"
showPlanState (Configured _) = "configured"
showPlanState (Processing _) = "processing"
showPlanState (Installed _ _) = "installed"
showPlanState (Failed _ _) = "failed"
-- | For an invalid plan, produce a detailed list of problems as human readable
-- error messages. This is mainly intended for debugging purposes.
-- Use 'showPlanProblem' for a human readable explanation.
-- | 721 | false | false | 8 | 8 | 148 | 159 | 76 | 83 | null | null |
mbakke/ganeti | src/Ganeti/Constants.hs | bsd-2-clause | cvEclusterfilecheck :: (String, String, String)
cvEclusterfilecheck =
("cluster",
Types.cVErrorCodeToRaw CvECLUSTERFILECHECK,
"Cluster configuration verification failure") | 179 | cvEclusterfilecheck :: (String, String, String)
cvEclusterfilecheck =
("cluster",
Types.cVErrorCodeToRaw CvECLUSTERFILECHECK,
"Cluster configuration verification failure") | 179 | cvEclusterfilecheck =
("cluster",
Types.cVErrorCodeToRaw CvECLUSTERFILECHECK,
"Cluster configuration verification failure") | 131 | false | true | 0 | 7 | 21 | 34 | 20 | 14 | null | null |
learnyou/learnyou | Application.hs | agpl-3.0 | warpSettings :: App -> Settings
warpSettings foundation =
setPort (appPort $ appSettings foundation)
$ setHost (appHost $ appSettings foundation)
$ setOnException (\_req e ->
when (defaultShouldDisplayException e) $ messageLoggerSource
foundation
(appLogger foundation)
$(qLocation >>= liftLoc)
"yesod"
LevelError
(toLogStr $ "Exception from Warp: " ++ show e))
defaultSettings | 477 | warpSettings :: App -> Settings
warpSettings foundation =
setPort (appPort $ appSettings foundation)
$ setHost (appHost $ appSettings foundation)
$ setOnException (\_req e ->
when (defaultShouldDisplayException e) $ messageLoggerSource
foundation
(appLogger foundation)
$(qLocation >>= liftLoc)
"yesod"
LevelError
(toLogStr $ "Exception from Warp: " ++ show e))
defaultSettings | 477 | warpSettings foundation =
setPort (appPort $ appSettings foundation)
$ setHost (appHost $ appSettings foundation)
$ setOnException (\_req e ->
when (defaultShouldDisplayException e) $ messageLoggerSource
foundation
(appLogger foundation)
$(qLocation >>= liftLoc)
"yesod"
LevelError
(toLogStr $ "Exception from Warp: " ++ show e))
defaultSettings | 445 | false | true | 4 | 12 | 146 | 123 | 59 | 64 | null | null |
GaloisInc/why3 | src/Language/Why3/CSE.hs | bsd-3-clause | importTerm :: Expr -> M Simple
importTerm expr =
case expr of
Lit {} -> return expr
App !_ [] -> return expr
App !x es -> compound (App x) es
Field l e -> compound (\[a] -> Field l a) [e]
Record fs -> compound (\es -> Record (zip (map fst fs) es)) (map snd fs)
RecordUpdate r fs -> compound (\(s:es) -> RecordUpdate s (zip (map fst fs) es)) (r : map snd fs)
Cast e t -> compound (\[a] -> Cast a t) [e]
If e1 e2 e3 -> compound (\[a,b,c] -> If a b c) [e1,e2,e3]
Labeled l e -> compound (\[a] -> Labeled l a) [e]
Match {} -> error "XXX: importTerm Match"
Let p e1 e2 ->
case p of
PWild -> importTerm e2
PVar x -> do e1' <- importTerm e1
let su = Map.singleton x e1'
importTerm (apSubst su e2)
PCon {} -> do e1' <- importTerm e1
e2' <- importTerm e2
return (Let p e1' e2')
Quant {} -> error "Not a term: quant"
Conn {} -> error "Not a term: conn"
Not {} -> error "Not a term: not" | 1,093 | importTerm :: Expr -> M Simple
importTerm expr =
case expr of
Lit {} -> return expr
App !_ [] -> return expr
App !x es -> compound (App x) es
Field l e -> compound (\[a] -> Field l a) [e]
Record fs -> compound (\es -> Record (zip (map fst fs) es)) (map snd fs)
RecordUpdate r fs -> compound (\(s:es) -> RecordUpdate s (zip (map fst fs) es)) (r : map snd fs)
Cast e t -> compound (\[a] -> Cast a t) [e]
If e1 e2 e3 -> compound (\[a,b,c] -> If a b c) [e1,e2,e3]
Labeled l e -> compound (\[a] -> Labeled l a) [e]
Match {} -> error "XXX: importTerm Match"
Let p e1 e2 ->
case p of
PWild -> importTerm e2
PVar x -> do e1' <- importTerm e1
let su = Map.singleton x e1'
importTerm (apSubst su e2)
PCon {} -> do e1' <- importTerm e1
e2' <- importTerm e2
return (Let p e1' e2')
Quant {} -> error "Not a term: quant"
Conn {} -> error "Not a term: conn"
Not {} -> error "Not a term: not" | 1,093 | importTerm expr =
case expr of
Lit {} -> return expr
App !_ [] -> return expr
App !x es -> compound (App x) es
Field l e -> compound (\[a] -> Field l a) [e]
Record fs -> compound (\es -> Record (zip (map fst fs) es)) (map snd fs)
RecordUpdate r fs -> compound (\(s:es) -> RecordUpdate s (zip (map fst fs) es)) (r : map snd fs)
Cast e t -> compound (\[a] -> Cast a t) [e]
If e1 e2 e3 -> compound (\[a,b,c] -> If a b c) [e1,e2,e3]
Labeled l e -> compound (\[a] -> Labeled l a) [e]
Match {} -> error "XXX: importTerm Match"
Let p e1 e2 ->
case p of
PWild -> importTerm e2
PVar x -> do e1' <- importTerm e1
let su = Map.singleton x e1'
importTerm (apSubst su e2)
PCon {} -> do e1' <- importTerm e1
e2' <- importTerm e2
return (Let p e1' e2')
Quant {} -> error "Not a term: quant"
Conn {} -> error "Not a term: conn"
Not {} -> error "Not a term: not" | 1,062 | false | true | 26 | 14 | 405 | 511 | 250 | 261 | null | null |
ancientlanguage/haskell-analysis | greek-script/app/ScriptQueries.hs | mit | queryElision = pure . view (_2 . _1 . _2) | 41 | queryElision = pure . view (_2 . _1 . _2) | 41 | queryElision = pure . view (_2 . _1 . _2) | 41 | false | false | 0 | 9 | 9 | 24 | 12 | 12 | null | null |
slogsdon/haskell-exercises | pe/src/Util.hs | mit | -- | pairs
pairs :: (a -> a -> a) -> [a] -> [a]
pairs f (x:y:t) = f x y : pairs f t | 95 | pairs :: (a -> a -> a) -> [a] -> [a]
pairs f (x:y:t) = f x y : pairs f t | 84 | pairs f (x:y:t) = f x y : pairs f t | 36 | true | true | 0 | 8 | 36 | 67 | 35 | 32 | null | null |
scrive/log-utils | log-server/Handlers.hs | bsd-3-clause | apiError :: SomeException -> Response
apiError = responseLBS badRequest400 [(hContentType, jsonContentType)] . encode . f
where
f err = object ["error" .= show err] | 170 | apiError :: SomeException -> Response
apiError = responseLBS badRequest400 [(hContentType, jsonContentType)] . encode . f
where
f err = object ["error" .= show err] | 170 | apiError = responseLBS badRequest400 [(hContentType, jsonContentType)] . encode . f
where
f err = object ["error" .= show err] | 132 | false | true | 0 | 9 | 29 | 60 | 31 | 29 | null | null |
rueshyna/gogol | gogol-youtube/gen/Network/Google/Resource/YouTube/ChannelBanners/Insert.hs | mpl-2.0 | -- | Creates a value of 'ChannelBannersInsert' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'cbiPayload'
--
-- * 'cbiOnBehalfOfContentOwner'
channelBannersInsert
:: ChannelBannerResource -- ^ 'cbiPayload'
-> ChannelBannersInsert
channelBannersInsert pCbiPayload_ =
ChannelBannersInsert'
{ _cbiPayload = pCbiPayload_
, _cbiOnBehalfOfContentOwner = Nothing
} | 468 | channelBannersInsert
:: ChannelBannerResource -- ^ 'cbiPayload'
-> ChannelBannersInsert
channelBannersInsert pCbiPayload_ =
ChannelBannersInsert'
{ _cbiPayload = pCbiPayload_
, _cbiOnBehalfOfContentOwner = Nothing
} | 239 | channelBannersInsert pCbiPayload_ =
ChannelBannersInsert'
{ _cbiPayload = pCbiPayload_
, _cbiOnBehalfOfContentOwner = Nothing
} | 143 | true | true | 0 | 7 | 82 | 49 | 28 | 21 | null | null |
betaveros/bcodex | Text/Bcodex/Cx.hs | mit | isCxLeftFrozen :: CxLeft -> Bool
isCxLeftFrozen (CxFrozen _) = True | 67 | isCxLeftFrozen :: CxLeft -> Bool
isCxLeftFrozen (CxFrozen _) = True | 67 | isCxLeftFrozen (CxFrozen _) = True | 34 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
omefire/lens | src/Control/Lens/Internal/FieldTH.hs | bsd-3-clause | unify1 sub x y
| x == y = return (sub, x) | 43 | unify1 sub x y
| x == y = return (sub, x) | 43 | unify1 sub x y
| x == y = return (sub, x) | 43 | false | false | 0 | 8 | 13 | 37 | 16 | 21 | null | null |
yousufmsoliman/music | Source (Haskell)/Voice.hs | gpl-3.0 | getBackN 0 v = Just [] | 22 | getBackN 0 v = Just [] | 22 | getBackN 0 v = Just [] | 22 | false | false | 0 | 6 | 5 | 16 | 7 | 9 | null | null |
vTurbine/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | pprMatchContextNoun ProcExpr = text "arrow abstraction" | 62 | pprMatchContextNoun ProcExpr = text "arrow abstraction" | 62 | pprMatchContextNoun ProcExpr = text "arrow abstraction" | 62 | false | false | 0 | 5 | 12 | 13 | 5 | 8 | null | null |
Vlix/telegram-bot-http | Network/Telegram/Bot/Requests.hs | mit | getChatAdministratorsRequest :: (MonadIO m, MonadThrow m) =>
TelegramRequest TG.GetChatAdministratorsRequest m [TG.ChatMember]
getChatAdministratorsRequest = telegramPostJSONRequest "getChatAdministrators" [] | 236 | getChatAdministratorsRequest :: (MonadIO m, MonadThrow m) =>
TelegramRequest TG.GetChatAdministratorsRequest m [TG.ChatMember]
getChatAdministratorsRequest = telegramPostJSONRequest "getChatAdministrators" [] | 236 | getChatAdministratorsRequest = telegramPostJSONRequest "getChatAdministrators" [] | 81 | false | true | 0 | 8 | 43 | 47 | 24 | 23 | null | null |
A1kmm/motocse | which_different.hs | agpl-3.0 | buildDiffOfGenesForProbe [] ((n1, g1):l1) m = buildDiffOfGenesForProbe [] l1 (unilateralProbe '+' g1 (('>':n1):m)) | 114 | buildDiffOfGenesForProbe [] ((n1, g1):l1) m = buildDiffOfGenesForProbe [] l1 (unilateralProbe '+' g1 (('>':n1):m)) | 114 | buildDiffOfGenesForProbe [] ((n1, g1):l1) m = buildDiffOfGenesForProbe [] l1 (unilateralProbe '+' g1 (('>':n1):m)) | 114 | false | false | 0 | 11 | 12 | 61 | 32 | 29 | null | null |
gbataille/pandoc | src/Text/Pandoc/SelfContained.hs | gpl-2.0 | -- already data: uri
getDataURI media sourceURL mimetype src = do
let ext = map toLower $ takeExtension src
fetchResult <- fetchItem' media sourceURL src
(raw, respMime) <- case fetchResult of
Left msg -> err 67 $ "Could not fetch " ++ src ++
"\n" ++ show msg
Right x -> return x
let raw' = if ext == ".gz"
then B.concat $ L.toChunks $ Gzip.decompress $ L.fromChunks
$ [raw]
else raw
let mime = case (mimetype, respMime) of
("",Nothing) -> error
$ "Could not determine mime type for `" ++ src ++ "'"
(x, Nothing) -> x
(_, Just x ) -> x
let cssSourceURL = case parseURI src of
Just u
| uriScheme u `elem` ["http:","https:"] ->
Just $ show u{ uriPath = "",
uriQuery = "",
uriFragment = "" }
_ -> Nothing
result <- if mime == "text/css"
then cssURLs media cssSourceURL (takeDirectory src) raw'
else return raw'
return $ makeDataURI mime result
-- | Convert HTML into self-contained HTML, incorporating images,
-- scripts, and CSS using data: URIs. | 1,430 | getDataURI media sourceURL mimetype src = do
let ext = map toLower $ takeExtension src
fetchResult <- fetchItem' media sourceURL src
(raw, respMime) <- case fetchResult of
Left msg -> err 67 $ "Could not fetch " ++ src ++
"\n" ++ show msg
Right x -> return x
let raw' = if ext == ".gz"
then B.concat $ L.toChunks $ Gzip.decompress $ L.fromChunks
$ [raw]
else raw
let mime = case (mimetype, respMime) of
("",Nothing) -> error
$ "Could not determine mime type for `" ++ src ++ "'"
(x, Nothing) -> x
(_, Just x ) -> x
let cssSourceURL = case parseURI src of
Just u
| uriScheme u `elem` ["http:","https:"] ->
Just $ show u{ uriPath = "",
uriQuery = "",
uriFragment = "" }
_ -> Nothing
result <- if mime == "text/css"
then cssURLs media cssSourceURL (takeDirectory src) raw'
else return raw'
return $ makeDataURI mime result
-- | Convert HTML into self-contained HTML, incorporating images,
-- scripts, and CSS using data: URIs. | 1,409 | getDataURI media sourceURL mimetype src = do
let ext = map toLower $ takeExtension src
fetchResult <- fetchItem' media sourceURL src
(raw, respMime) <- case fetchResult of
Left msg -> err 67 $ "Could not fetch " ++ src ++
"\n" ++ show msg
Right x -> return x
let raw' = if ext == ".gz"
then B.concat $ L.toChunks $ Gzip.decompress $ L.fromChunks
$ [raw]
else raw
let mime = case (mimetype, respMime) of
("",Nothing) -> error
$ "Could not determine mime type for `" ++ src ++ "'"
(x, Nothing) -> x
(_, Just x ) -> x
let cssSourceURL = case parseURI src of
Just u
| uriScheme u `elem` ["http:","https:"] ->
Just $ show u{ uriPath = "",
uriQuery = "",
uriFragment = "" }
_ -> Nothing
result <- if mime == "text/css"
then cssURLs media cssSourceURL (takeDirectory src) raw'
else return raw'
return $ makeDataURI mime result
-- | Convert HTML into self-contained HTML, incorporating images,
-- scripts, and CSS using data: URIs. | 1,409 | true | false | 0 | 17 | 658 | 357 | 179 | 178 | null | null |
pxqr/ureader | src/UReader/Feed.hs | bsd-3-clause | hdrLastModified :: String
hdrLastModified = "last-modified" | 59 | hdrLastModified :: String
hdrLastModified = "last-modified" | 59 | hdrLastModified = "last-modified" | 33 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
elieux/ghc | compiler/typecheck/TcRnTypes.hs | bsd-3-clause | pprSkolInfo (RuleSkol name) = ptext (sLit "the RULE") <+> pprRuleName name | 76 | pprSkolInfo (RuleSkol name) = ptext (sLit "the RULE") <+> pprRuleName name | 76 | pprSkolInfo (RuleSkol name) = ptext (sLit "the RULE") <+> pprRuleName name | 76 | false | false | 0 | 8 | 12 | 32 | 14 | 18 | null | null |
dorchard/gram_lang | repl/app/Language/Granule/ReplParser.hs | bsd-3-clause | loadFileParser = replFileCmdParser "l" "load" LoadFile | 54 | loadFileParser = replFileCmdParser "l" "load" LoadFile | 54 | loadFileParser = replFileCmdParser "l" "load" LoadFile | 54 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
juhp/stack | src/Stack/Build/ConstructPlan.hs | bsd-3-clause | -- | Get all of the dependencies for a given package, including build
-- tool dependencies.
packageDepsWithTools :: Package -> M (Map PackageName DepValue)
packageDepsWithTools p = do
-- Check whether the tool is on the PATH before warning about it.
warnings <- fmap catMaybes $ forM (Set.toList $ packageUnknownTools p) $
\name@(ExeName toolName) -> do
let settings = minimalEnvSettings { esIncludeLocals = True }
config <- view configL
menv <- liftIO $ configProcessContextSettings config settings
mfound <- runRIO menv $ findExecutable $ T.unpack toolName
case mfound of
Left _ -> return $ Just $ ToolWarning name (packageName p)
Right _ -> return Nothing
tell mempty { wWarnings = (map toolWarningText warnings ++) }
return $ packageDeps p
-- | Warn about tools in the snapshot definition. States the tool name
-- expected and the package name using it. | 944 | packageDepsWithTools :: Package -> M (Map PackageName DepValue)
packageDepsWithTools p = do
-- Check whether the tool is on the PATH before warning about it.
warnings <- fmap catMaybes $ forM (Set.toList $ packageUnknownTools p) $
\name@(ExeName toolName) -> do
let settings = minimalEnvSettings { esIncludeLocals = True }
config <- view configL
menv <- liftIO $ configProcessContextSettings config settings
mfound <- runRIO menv $ findExecutable $ T.unpack toolName
case mfound of
Left _ -> return $ Just $ ToolWarning name (packageName p)
Right _ -> return Nothing
tell mempty { wWarnings = (map toolWarningText warnings ++) }
return $ packageDeps p
-- | Warn about tools in the snapshot definition. States the tool name
-- expected and the package name using it. | 852 | packageDepsWithTools p = do
-- Check whether the tool is on the PATH before warning about it.
warnings <- fmap catMaybes $ forM (Set.toList $ packageUnknownTools p) $
\name@(ExeName toolName) -> do
let settings = minimalEnvSettings { esIncludeLocals = True }
config <- view configL
menv <- liftIO $ configProcessContextSettings config settings
mfound <- runRIO menv $ findExecutable $ T.unpack toolName
case mfound of
Left _ -> return $ Just $ ToolWarning name (packageName p)
Right _ -> return Nothing
tell mempty { wWarnings = (map toolWarningText warnings ++) }
return $ packageDeps p
-- | Warn about tools in the snapshot definition. States the tool name
-- expected and the package name using it. | 788 | true | true | 0 | 18 | 225 | 227 | 109 | 118 | null | null |
kazu-yamamoto/network-uri | tests/uri001.hs | bsd-3-clause | testURIRef014 = testURIRef RelRf "aaa%2Fbbb" | 44 | testURIRef014 = testURIRef RelRf "aaa%2Fbbb" | 44 | testURIRef014 = testURIRef RelRf "aaa%2Fbbb" | 44 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
thoughtpolice/cabal | cabal-install/Distribution/Client/InstallPlan.hs | bsd-3-clause | -- | The graph of packages (nodes) and dependencies (edges) must be acyclic.
--
-- * if the result is @False@ use 'PackageIndex.dependencyCycles' to find out
-- which packages are involved in dependency cycles.
--
acyclic :: (HasComponentId ipkg, PackageFixedDeps ipkg,
HasComponentId srcpkg, PackageFixedDeps srcpkg)
=> FakeMap -> PlanIndex ipkg srcpkg iresult ifailure -> Bool
acyclic fakeMap = null . PlanIndex.dependencyCycles fakeMap | 462 | acyclic :: (HasComponentId ipkg, PackageFixedDeps ipkg,
HasComponentId srcpkg, PackageFixedDeps srcpkg)
=> FakeMap -> PlanIndex ipkg srcpkg iresult ifailure -> Bool
acyclic fakeMap = null . PlanIndex.dependencyCycles fakeMap | 246 | acyclic fakeMap = null . PlanIndex.dependencyCycles fakeMap | 59 | true | true | 0 | 8 | 85 | 72 | 38 | 34 | null | null |
m00nlight/99-problems | haskell/p-31.hs | bsd-3-clause | isPrime :: Integral a => a -> Bool
isPrime 2 = True | 51 | isPrime :: Integral a => a -> Bool
isPrime 2 = True | 51 | isPrime 2 = True | 16 | false | true | 0 | 6 | 11 | 25 | 12 | 13 | null | null |
GaloisInc/saw-script | rme/src/Data/RME/Vector.hs | bsd-3-clause | ripple_carry_adder :: [RME] -> [RME] -> RME -> (RME, [RME])
ripple_carry_adder [] _ c = (c, []) | 95 | ripple_carry_adder :: [RME] -> [RME] -> RME -> (RME, [RME])
ripple_carry_adder [] _ c = (c, []) | 95 | ripple_carry_adder [] _ c = (c, []) | 35 | false | true | 0 | 9 | 16 | 55 | 31 | 24 | null | null |
adbrowne/dynamodb-eventstore | dynamodb-eventstore-client/client/Main.hs | mit | outputEntry :: Text -> Text -> (Int, Response LByteString) -> IO ()
outputEntry baseDir responseType (sequenceNumber,response) = do
let directory = baseDir <> "/" <> responseType <> "/entries/"
let filename = directory <> tshow sequenceNumber <> ".json"
saveResponse directory filename response | 306 | outputEntry :: Text -> Text -> (Int, Response LByteString) -> IO ()
outputEntry baseDir responseType (sequenceNumber,response) = do
let directory = baseDir <> "/" <> responseType <> "/entries/"
let filename = directory <> tshow sequenceNumber <> ".json"
saveResponse directory filename response | 306 | outputEntry baseDir responseType (sequenceNumber,response) = do
let directory = baseDir <> "/" <> responseType <> "/entries/"
let filename = directory <> tshow sequenceNumber <> ".json"
saveResponse directory filename response | 238 | false | true | 0 | 12 | 52 | 101 | 49 | 52 | null | null |
FranklinChen/music-score | sketch/old/update/update4.hs | bsd-3-clause | swap (x,y) = (y,x) | 18 | swap (x,y) = (y,x) | 18 | swap (x,y) = (y,x) | 18 | false | false | 0 | 5 | 3 | 22 | 12 | 10 | null | null |
danr/hipspec | examples/old-examples/hip/Infinite.hs | gpl-3.0 | reverse (x:xs) = reverse xs ++ [x] | 34 | reverse (x:xs) = reverse xs ++ [x] | 34 | reverse (x:xs) = reverse xs ++ [x] | 34 | false | false | 0 | 7 | 6 | 26 | 13 | 13 | null | null |
hazel-el/hazel | Hazel/Parser/OWL/Functional.hs | gpl-3.0 | axiomAnnotations :: Parser [Annotation]
axiomAnnotations = many' annotation | 75 | axiomAnnotations :: Parser [Annotation]
axiomAnnotations = many' annotation | 75 | axiomAnnotations = many' annotation | 35 | false | true | 0 | 7 | 7 | 26 | 11 | 15 | null | null |
gabesoft/kapi | test/PersistenceSubscriptionsSpec.hs | bsd-3-clause | result2 :: Record
result2 =
Record
[ mkTxtField "title" "Feed title"
, mkTxtField "feedId" feedId
, mkTxtField "userId" userId
] | 146 | result2 :: Record
result2 =
Record
[ mkTxtField "title" "Feed title"
, mkTxtField "feedId" feedId
, mkTxtField "userId" userId
] | 146 | result2 =
Record
[ mkTxtField "title" "Feed title"
, mkTxtField "feedId" feedId
, mkTxtField "userId" userId
] | 128 | false | true | 0 | 6 | 37 | 38 | 19 | 19 | null | null |
mathhun/stack | src/Stack/Constants.hs | bsd-3-clause | -- See https://downloads.haskell.org/~ghc/7.10.1/docs/html/libraries/ghc/src/Module.html#integerPackageKey
wiredInPackages :: HashSet PackageName
wiredInPackages =
maybe (error "Parse error in wiredInPackages") HashSet.fromList mparsed
where
mparsed = mapM parsePackageName
[ "ghc-prim"
, "integer-gmp"
, "integer-simple"
, "base"
, "rts"
, "template-haskell"
, "dph-seq"
, "dph-par"
, "ghc"
, "interactive"
]
-- TODO: Get this unwieldy list out of here and into a datafile
-- generated by GHCJS! See https://github.com/ghcjs/ghcjs/issues/434 | 619 | wiredInPackages :: HashSet PackageName
wiredInPackages =
maybe (error "Parse error in wiredInPackages") HashSet.fromList mparsed
where
mparsed = mapM parsePackageName
[ "ghc-prim"
, "integer-gmp"
, "integer-simple"
, "base"
, "rts"
, "template-haskell"
, "dph-seq"
, "dph-par"
, "ghc"
, "interactive"
]
-- TODO: Get this unwieldy list out of here and into a datafile
-- generated by GHCJS! See https://github.com/ghcjs/ghcjs/issues/434 | 512 | wiredInPackages =
maybe (error "Parse error in wiredInPackages") HashSet.fromList mparsed
where
mparsed = mapM parsePackageName
[ "ghc-prim"
, "integer-gmp"
, "integer-simple"
, "base"
, "rts"
, "template-haskell"
, "dph-seq"
, "dph-par"
, "ghc"
, "interactive"
]
-- TODO: Get this unwieldy list out of here and into a datafile
-- generated by GHCJS! See https://github.com/ghcjs/ghcjs/issues/434 | 473 | true | true | 1 | 7 | 138 | 85 | 44 | 41 | null | null |
hsyl20/HaskellPU | tests/Blas.hs | lgpl-3.0 | check_equality m1 m2 epsilon = do
m1s <- readFloatMatrix m1
m2s <- readFloatMatrix m2
diff <- return $ zipWith (-) (concat m1s) (concat m2s)
res <- return $ all (\x -> x < epsilon) diff
if (not res) then do
-- putStrLn $ show m1s
-- putStrLn $ show m2s
-- putStrLn $ show diff
putStrLn $ show $ filter (epsilon <=) diff
else
return ()
return $ res | 378 | check_equality m1 m2 epsilon = do
m1s <- readFloatMatrix m1
m2s <- readFloatMatrix m2
diff <- return $ zipWith (-) (concat m1s) (concat m2s)
res <- return $ all (\x -> x < epsilon) diff
if (not res) then do
-- putStrLn $ show m1s
-- putStrLn $ show m2s
-- putStrLn $ show diff
putStrLn $ show $ filter (epsilon <=) diff
else
return ()
return $ res | 378 | check_equality m1 m2 epsilon = do
m1s <- readFloatMatrix m1
m2s <- readFloatMatrix m2
diff <- return $ zipWith (-) (concat m1s) (concat m2s)
res <- return $ all (\x -> x < epsilon) diff
if (not res) then do
-- putStrLn $ show m1s
-- putStrLn $ show m2s
-- putStrLn $ show diff
putStrLn $ show $ filter (epsilon <=) diff
else
return ()
return $ res | 378 | false | false | 0 | 12 | 99 | 145 | 71 | 74 | null | null |
termite2/simple-abstractor | SimpleAbstractor/Predicate.hs | bsd-3-clause | eSectVarPred x y _ _ _ _ = error $ "effectiveSection: " ++ show x ++ " " ++ show y | 110 | eSectVarPred x y _ _ _ _ = error $ "effectiveSection: " ++ show x ++ " " ++ show y | 110 | eSectVarPred x y _ _ _ _ = error $ "effectiveSection: " ++ show x ++ " " ++ show y | 110 | false | false | 0 | 8 | 48 | 42 | 19 | 23 | null | null |
snoyberg/ghc | compiler/basicTypes/OccName.hs | bsd-3-clause | -- Coercion for type functions
mkEqPredCoOcc = mk_simple_deriv tcName "$co" | 83 | mkEqPredCoOcc = mk_simple_deriv tcName "$co" | 52 | mkEqPredCoOcc = mk_simple_deriv tcName "$co" | 52 | true | false | 0 | 5 | 17 | 12 | 6 | 6 | null | null |
zeyuanxy/haskell-playground | ninety-nine-haskell-problems/vol3/25.hs | mit | rnd_permu :: (Eq a) => [a] -> IO [a]
rnd_permu xs = rnd_select xs (length xs) | 77 | rnd_permu :: (Eq a) => [a] -> IO [a]
rnd_permu xs = rnd_select xs (length xs) | 77 | rnd_permu xs = rnd_select xs (length xs) | 40 | false | true | 0 | 9 | 15 | 51 | 25 | 26 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/Layout.hs | lgpl-2.1 | -- | Make the layout stretchable and align it centered to the left of the assigned area.
floatLeft :: Layout -> Layout
floatLeft
= stretch . alignLeft | 152 | floatLeft :: Layout -> Layout
floatLeft
= stretch . alignLeft | 63 | floatLeft
= stretch . alignLeft | 33 | true | true | 0 | 7 | 28 | 23 | 11 | 12 | null | null |
kawamuray/ganeti | src/Ganeti/Config.hs | gpl-2.0 | -- | Returns a node's group, with optional failure if we can't find it
-- (configuration corrupt).
getGroupOfNode :: ConfigData -> Node -> Maybe NodeGroup
getGroupOfNode cfg node =
M.lookup (nodeGroup node) (fromContainer . configNodegroups $ cfg) | 249 | getGroupOfNode :: ConfigData -> Node -> Maybe NodeGroup
getGroupOfNode cfg node =
M.lookup (nodeGroup node) (fromContainer . configNodegroups $ cfg) | 150 | getGroupOfNode cfg node =
M.lookup (nodeGroup node) (fromContainer . configNodegroups $ cfg) | 94 | true | true | 0 | 8 | 38 | 53 | 27 | 26 | null | null |
kavigupta/Infsabot | Infsabot/MoveConflictResolution/Logic.hs | gpl-3.0 | removeOutOfBounds (Just size) act = fst . noopifyIf (act, FinalLocs a b) $ any outOfBounds [a, b]
where
(FinalLocs a b) = finalLocations act
outOfBounds (Just (x, y)) = x < 0 || y < 0 || x >= size || y >= size
outOfBounds Nothing = False | 263 | removeOutOfBounds (Just size) act = fst . noopifyIf (act, FinalLocs a b) $ any outOfBounds [a, b]
where
(FinalLocs a b) = finalLocations act
outOfBounds (Just (x, y)) = x < 0 || y < 0 || x >= size || y >= size
outOfBounds Nothing = False | 263 | removeOutOfBounds (Just size) act = fst . noopifyIf (act, FinalLocs a b) $ any outOfBounds [a, b]
where
(FinalLocs a b) = finalLocations act
outOfBounds (Just (x, y)) = x < 0 || y < 0 || x >= size || y >= size
outOfBounds Nothing = False | 263 | false | false | 0 | 13 | 73 | 125 | 63 | 62 | null | null |
rueshyna/gogol | gogol-drive/gen/Network/Google/Drive/Types/Product.hs | mpl-2.0 | -- | The MIME type of the revision.
revMimeType :: Lens' Revision (Maybe Text)
revMimeType
= lens _revMimeType (\ s a -> s{_revMimeType = a}) | 143 | revMimeType :: Lens' Revision (Maybe Text)
revMimeType
= lens _revMimeType (\ s a -> s{_revMimeType = a}) | 107 | revMimeType
= lens _revMimeType (\ s a -> s{_revMimeType = a}) | 64 | true | true | 0 | 9 | 26 | 48 | 25 | 23 | null | null |
fmapfmapfmap/amazonka | amazonka-cloudfront/gen/Network/AWS/CloudFront/Types/Product.hs | mpl-2.0 | -- | Specify the minimum version of the SSL protocol that you want CloudFront
-- to use, SSLv3 or TLSv1, for HTTPS connections. CloudFront will serve
-- your objects only to browsers or devices that support at least the SSL
-- version that you specify. The TLSv1 protocol is more secure, so we
-- recommend that you specify SSLv3 only if your users are using browsers
-- or devices that don\'t support TLSv1. If you\'re using a custom
-- certificate (if you specify a value for IAMCertificateId) and if you\'re
-- using dedicated IP (if you specify vip for SSLSupportMethod), you can
-- choose SSLv3 or TLSv1 as the MinimumProtocolVersion. If you\'re using a
-- custom certificate (if you specify a value for IAMCertificateId) and if
-- you\'re using SNI (if you specify sni-only for SSLSupportMethod), you
-- must specify TLSv1 for MinimumProtocolVersion.
vcMinimumProtocolVersion :: Lens' ViewerCertificate (Maybe MinimumProtocolVersion)
vcMinimumProtocolVersion = lens _vcMinimumProtocolVersion (\ s a -> s{_vcMinimumProtocolVersion = a}) | 1,041 | vcMinimumProtocolVersion :: Lens' ViewerCertificate (Maybe MinimumProtocolVersion)
vcMinimumProtocolVersion = lens _vcMinimumProtocolVersion (\ s a -> s{_vcMinimumProtocolVersion = a}) | 184 | vcMinimumProtocolVersion = lens _vcMinimumProtocolVersion (\ s a -> s{_vcMinimumProtocolVersion = a}) | 101 | true | true | 0 | 9 | 159 | 57 | 36 | 21 | null | null |
alexander-at-github/eta | compiler/ETA/Prelude/PrimOp.hs | bsd-3-clause | primOpCodeSize DoubleTanhOp = primOpCodeSizeForeignCall | 56 | primOpCodeSize DoubleTanhOp = primOpCodeSizeForeignCall | 56 | primOpCodeSize DoubleTanhOp = primOpCodeSizeForeignCall | 56 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
haslab/SecreC | src/Language/SecreC/Monad.hs | gpl-3.0 | mapError :: MonadError SecrecError m => (SecrecError -> SecrecError) -> m a -> m a
mapError f m = m `catchError` (throwError . f) | 129 | mapError :: MonadError SecrecError m => (SecrecError -> SecrecError) -> m a -> m a
mapError f m = m `catchError` (throwError . f) | 129 | mapError f m = m `catchError` (throwError . f) | 46 | false | true | 0 | 8 | 23 | 59 | 30 | 29 | null | null |
yogsototh/holy-project | src/HolyProject.hs | mit | intro :: IO ()
intro = do
bk "Stop!"
bk "Who would cross the Bridge of Death"
bk "must answer me these questions three,"
bk "ere the other side he see."
you "Ask me the questions, bridgekeeper, I am not afraid.\n"
-- | Show the final dialog | 261 | intro :: IO ()
intro = do
bk "Stop!"
bk "Who would cross the Bridge of Death"
bk "must answer me these questions three,"
bk "ere the other side he see."
you "Ask me the questions, bridgekeeper, I am not afraid.\n"
-- | Show the final dialog | 261 | intro = do
bk "Stop!"
bk "Who would cross the Bridge of Death"
bk "must answer me these questions three,"
bk "ere the other side he see."
you "Ask me the questions, bridgekeeper, I am not afraid.\n"
-- | Show the final dialog | 246 | false | true | 0 | 7 | 67 | 47 | 19 | 28 | null | null |
google/hs-dependent-literals | dependent-literals-plugin/tests/PolyErrors.hs | apache-2.0 | -- Want: negative literal for unsigned type.
-- TODO: this generates two errors currently.
x6 = -1 | 98 | x6 = -1 | 7 | x6 = -1 | 7 | true | false | 1 | 5 | 16 | 13 | 6 | 7 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/base/Data/ByteString.hs | bsd-3-clause | splitWith _pred (PS _ _ 0) = [] | 34 | splitWith _pred (PS _ _ 0) = [] | 34 | splitWith _pred (PS _ _ 0) = [] | 34 | false | false | 0 | 7 | 10 | 23 | 11 | 12 | null | null |
kaoskorobase/freesound | test/Sound/Freesound/Test.hs | bsd-2-clause | fs :: Freesound a -> IO a
fs a = flip runFreesound a =<< apiKeyFromString `fmap` getEnv "FREESOUND_API_KEY" | 107 | fs :: Freesound a -> IO a
fs a = flip runFreesound a =<< apiKeyFromString `fmap` getEnv "FREESOUND_API_KEY" | 107 | fs a = flip runFreesound a =<< apiKeyFromString `fmap` getEnv "FREESOUND_API_KEY" | 81 | false | true | 0 | 7 | 17 | 47 | 21 | 26 | null | null |
byorgey/Idris-dev | src/RTS/CodegenC.hs | bsd-3-clause | off o x = x | 11 | off o x = x | 11 | off o x = x | 11 | false | false | 1 | 5 | 4 | 16 | 5 | 11 | null | null |
johnbelamaric/themis | vendor/github.com/apache/thrift/lib/hs/src/Thrift/Transport/Header.hs | apache-2.0 | transform :: HeaderTransport i o -> LBS.ByteString -> LBS.ByteString
transform t bs =
foldr applyTransform bs $ writeTransforms t
where
-- applyTransform bs ZlibTransform =
-- throw $ TransportExn "HeaderTransport: not implemented: ZlibTransform " TE_UNKNOWN
applyTransform bs _ =
throw $ TransportExn "HeaderTransport: Unknown transform" TE_UNKNOWN | 374 | transform :: HeaderTransport i o -> LBS.ByteString -> LBS.ByteString
transform t bs =
foldr applyTransform bs $ writeTransforms t
where
-- applyTransform bs ZlibTransform =
-- throw $ TransportExn "HeaderTransport: not implemented: ZlibTransform " TE_UNKNOWN
applyTransform bs _ =
throw $ TransportExn "HeaderTransport: Unknown transform" TE_UNKNOWN | 374 | transform t bs =
foldr applyTransform bs $ writeTransforms t
where
-- applyTransform bs ZlibTransform =
-- throw $ TransportExn "HeaderTransport: not implemented: ZlibTransform " TE_UNKNOWN
applyTransform bs _ =
throw $ TransportExn "HeaderTransport: Unknown transform" TE_UNKNOWN | 305 | false | true | 0 | 7 | 70 | 69 | 33 | 36 | null | null |
tidalcycles/tidal-midi | Sound/Tidal/MIDI/CC.hs | gpl-3.0 | (cc94, cc94_p) = pF "cc94" (Just 0) | 35 | (cc94, cc94_p) = pF "cc94" (Just 0) | 35 | (cc94, cc94_p) = pF "cc94" (Just 0) | 35 | false | false | 0 | 6 | 6 | 25 | 12 | 13 | null | null |
Lexer747/Haskell-Fractals | Core/Mandelbrot.hs | gpl-3.0 | basePoint :: Point
basePoint = ((-0.5),0) | 41 | basePoint :: Point
basePoint = ((-0.5),0) | 41 | basePoint = ((-0.5),0) | 22 | false | true | 0 | 7 | 5 | 22 | 13 | 9 | null | null |
merijn/GPU-benchmarks | evolve/src/Process.hs | gpl-3.0 | killChildren :: (?threadState :: ThreadState) => IO ()
killChildren = mapChildren $ throwToWeak KillChild | 105 | killChildren :: (?threadState :: ThreadState) => IO ()
killChildren = mapChildren $ throwToWeak KillChild | 105 | killChildren = mapChildren $ throwToWeak KillChild | 50 | false | true | 0 | 7 | 13 | 32 | 17 | 15 | null | null |
pascal-knodel/haskell-craft | _/links/E'3''4.hs | mit | (&&) False False = False | 24 | (&&) False False = False | 24 | (&&) False False = False | 24 | false | false | 0 | 5 | 4 | 13 | 7 | 6 | null | null |
kawamuray/ganeti | src/Ganeti/HTools/Node.hs | gpl-2.0 | list :: [String] -> Node -> [String]
list fields t = map (showField t) fields | 77 | list :: [String] -> Node -> [String]
list fields t = map (showField t) fields | 77 | list fields t = map (showField t) fields | 40 | false | true | 0 | 7 | 14 | 45 | 22 | 23 | null | null |
rawlep/EQS | sourceCode/Parallel.hs | mit | forkProcessWithID mdes writer process endAction = do -- mdes writer
----------------------- the threadding --------------------------------------
thredMan <- newManager --
thredId <- forkManagedFinally thredMan process (\ _ -> endExecution endAction mdes )
thredStatus <- getStatus thredMan thredId -- getStatus
case thredStatus of
Just (Threw e) -> do
let exceptionMessage = ("Exception : " ++ show (e :: SomeException))
G.postGUIAsync $ runMsgDialog (Just "Exception") exceptionMessage Error
--
--G.postGUIAsync $ writer ("Exception : " ++ show (e :: SomeException))
Just _ -> return ()
-- maybe (return ()) (writer . ("Finished: " ++)) mdes
return thredId
where
endExecution endAction mdes = do
maybe (return ()) id endAction
maybe (return ()) (writer . ("Finished: " ++)) mdes
----- | 957 | forkProcessWithID mdes writer process endAction = do -- mdes writer
----------------------- the threadding --------------------------------------
thredMan <- newManager --
thredId <- forkManagedFinally thredMan process (\ _ -> endExecution endAction mdes )
thredStatus <- getStatus thredMan thredId -- getStatus
case thredStatus of
Just (Threw e) -> do
let exceptionMessage = ("Exception : " ++ show (e :: SomeException))
G.postGUIAsync $ runMsgDialog (Just "Exception") exceptionMessage Error
--
--G.postGUIAsync $ writer ("Exception : " ++ show (e :: SomeException))
Just _ -> return ()
-- maybe (return ()) (writer . ("Finished: " ++)) mdes
return thredId
where
endExecution endAction mdes = do
maybe (return ()) id endAction
maybe (return ()) (writer . ("Finished: " ++)) mdes
----- | 957 | forkProcessWithID mdes writer process endAction = do -- mdes writer
----------------------- the threadding --------------------------------------
thredMan <- newManager --
thredId <- forkManagedFinally thredMan process (\ _ -> endExecution endAction mdes )
thredStatus <- getStatus thredMan thredId -- getStatus
case thredStatus of
Just (Threw e) -> do
let exceptionMessage = ("Exception : " ++ show (e :: SomeException))
G.postGUIAsync $ runMsgDialog (Just "Exception") exceptionMessage Error
--
--G.postGUIAsync $ writer ("Exception : " ++ show (e :: SomeException))
Just _ -> return ()
-- maybe (return ()) (writer . ("Finished: " ++)) mdes
return thredId
where
endExecution endAction mdes = do
maybe (return ()) id endAction
maybe (return ()) (writer . ("Finished: " ++)) mdes
----- | 957 | false | false | 0 | 18 | 283 | 217 | 106 | 111 | null | null |
forestbelton/anima | Test/Eval.hs | mit | unitTC = tc_test tunit unit | 34 | unitTC = tc_test tunit unit | 34 | unitTC = tc_test tunit unit | 34 | false | false | 1 | 5 | 11 | 15 | 5 | 10 | null | null |
mightybyte/cabal | Cabal/Distribution/Simple/GHC.hs | bsd-3-clause | installLib :: Verbosity
-> LocalBuildInfo
-> FilePath -- ^install location
-> FilePath -- ^install location for dynamic libraries
-> FilePath -- ^Build location
-> PackageDescription
-> Library
-> ComponentLocalBuildInfo
-> IO ()
installLib verbosity lbi targetDir dynlibTargetDir builtDir _pkg lib clbi = do
-- copy .hi files over:
whenVanilla $ copyModuleFiles "hi"
whenProf $ copyModuleFiles "p_hi"
whenShared $ copyModuleFiles "dyn_hi"
-- copy the built library files over:
whenVanilla $ installOrdinary builtDir targetDir vanillaLibName
whenProf $ installOrdinary builtDir targetDir profileLibName
whenGHCi $ installOrdinary builtDir targetDir ghciLibName
whenShared $ installShared builtDir dynlibTargetDir sharedLibName
where
install isShared srcDir dstDir name = do
let src = srcDir </> name
dst = dstDir </> name
createDirectoryIfMissingVerbose verbosity True dstDir
if isShared
then do when (stripLibs lbi) $ Strip.stripLib verbosity
(hostPlatform lbi) (withPrograms lbi) src
installExecutableFile verbosity src dst
else installOrdinaryFile verbosity src dst
installOrdinary = install False
installShared = install True
copyModuleFiles ext =
findModuleFiles [builtDir] [ext] (libModules lib)
>>= installOrdinaryFiles verbosity targetDir
cid = compilerId (compiler lbi)
libName = componentLibraryName clbi
vanillaLibName = mkLibName libName
profileLibName = mkProfLibName libName
ghciLibName = Internal.mkGHCiLibName libName
sharedLibName = (mkSharedLibName cid) libName
hasLib = not $ null (libModules lib)
&& null (cSources (libBuildInfo lib))
whenVanilla = when (hasLib && withVanillaLib lbi)
whenProf = when (hasLib && withProfLib lbi)
whenGHCi = when (hasLib && withGHCiLib lbi)
whenShared = when (hasLib && withSharedLib lbi)
-- -----------------------------------------------------------------------------
-- Registering | 2,250 | installLib :: Verbosity
-> LocalBuildInfo
-> FilePath -- ^install location
-> FilePath -- ^install location for dynamic libraries
-> FilePath -- ^Build location
-> PackageDescription
-> Library
-> ComponentLocalBuildInfo
-> IO ()
installLib verbosity lbi targetDir dynlibTargetDir builtDir _pkg lib clbi = do
-- copy .hi files over:
whenVanilla $ copyModuleFiles "hi"
whenProf $ copyModuleFiles "p_hi"
whenShared $ copyModuleFiles "dyn_hi"
-- copy the built library files over:
whenVanilla $ installOrdinary builtDir targetDir vanillaLibName
whenProf $ installOrdinary builtDir targetDir profileLibName
whenGHCi $ installOrdinary builtDir targetDir ghciLibName
whenShared $ installShared builtDir dynlibTargetDir sharedLibName
where
install isShared srcDir dstDir name = do
let src = srcDir </> name
dst = dstDir </> name
createDirectoryIfMissingVerbose verbosity True dstDir
if isShared
then do when (stripLibs lbi) $ Strip.stripLib verbosity
(hostPlatform lbi) (withPrograms lbi) src
installExecutableFile verbosity src dst
else installOrdinaryFile verbosity src dst
installOrdinary = install False
installShared = install True
copyModuleFiles ext =
findModuleFiles [builtDir] [ext] (libModules lib)
>>= installOrdinaryFiles verbosity targetDir
cid = compilerId (compiler lbi)
libName = componentLibraryName clbi
vanillaLibName = mkLibName libName
profileLibName = mkProfLibName libName
ghciLibName = Internal.mkGHCiLibName libName
sharedLibName = (mkSharedLibName cid) libName
hasLib = not $ null (libModules lib)
&& null (cSources (libBuildInfo lib))
whenVanilla = when (hasLib && withVanillaLib lbi)
whenProf = when (hasLib && withProfLib lbi)
whenGHCi = when (hasLib && withGHCiLib lbi)
whenShared = when (hasLib && withSharedLib lbi)
-- -----------------------------------------------------------------------------
-- Registering | 2,250 | installLib verbosity lbi targetDir dynlibTargetDir builtDir _pkg lib clbi = do
-- copy .hi files over:
whenVanilla $ copyModuleFiles "hi"
whenProf $ copyModuleFiles "p_hi"
whenShared $ copyModuleFiles "dyn_hi"
-- copy the built library files over:
whenVanilla $ installOrdinary builtDir targetDir vanillaLibName
whenProf $ installOrdinary builtDir targetDir profileLibName
whenGHCi $ installOrdinary builtDir targetDir ghciLibName
whenShared $ installShared builtDir dynlibTargetDir sharedLibName
where
install isShared srcDir dstDir name = do
let src = srcDir </> name
dst = dstDir </> name
createDirectoryIfMissingVerbose verbosity True dstDir
if isShared
then do when (stripLibs lbi) $ Strip.stripLib verbosity
(hostPlatform lbi) (withPrograms lbi) src
installExecutableFile verbosity src dst
else installOrdinaryFile verbosity src dst
installOrdinary = install False
installShared = install True
copyModuleFiles ext =
findModuleFiles [builtDir] [ext] (libModules lib)
>>= installOrdinaryFiles verbosity targetDir
cid = compilerId (compiler lbi)
libName = componentLibraryName clbi
vanillaLibName = mkLibName libName
profileLibName = mkProfLibName libName
ghciLibName = Internal.mkGHCiLibName libName
sharedLibName = (mkSharedLibName cid) libName
hasLib = not $ null (libModules lib)
&& null (cSources (libBuildInfo lib))
whenVanilla = when (hasLib && withVanillaLib lbi)
whenProf = when (hasLib && withProfLib lbi)
whenGHCi = when (hasLib && withGHCiLib lbi)
whenShared = when (hasLib && withSharedLib lbi)
-- -----------------------------------------------------------------------------
-- Registering | 1,902 | false | true | 15 | 15 | 641 | 531 | 242 | 289 | null | null |
KaiHa/GuiTest | src/Screenshot.hs | bsd-3-clause | startVisrun :: IO ProcessHandle
startVisrun = do
env <- getEnvironment
h <- run "visrun" ["-alaheight", "0", "-geom", "1280x1024"]
$ Just $ [("DISPLAY", ":1")] ++ env
sleep 4
return h | 208 | startVisrun :: IO ProcessHandle
startVisrun = do
env <- getEnvironment
h <- run "visrun" ["-alaheight", "0", "-geom", "1280x1024"]
$ Just $ [("DISPLAY", ":1")] ++ env
sleep 4
return h | 208 | startVisrun = do
env <- getEnvironment
h <- run "visrun" ["-alaheight", "0", "-geom", "1280x1024"]
$ Just $ [("DISPLAY", ":1")] ++ env
sleep 4
return h | 176 | false | true | 0 | 12 | 53 | 78 | 39 | 39 | null | null |
sgillespie/ghc | compiler/ghci/ByteCodeGen.hs | bsd-3-clause | getCCArray :: BcM (Array BreakIndex (RemotePtr CostCentre))
getCCArray = BcM $ \st ->
let breaks = expectJust "ByteCodeGen.getCCArray" $ modBreaks st in
return (st, modBreaks_ccs breaks) | 190 | getCCArray :: BcM (Array BreakIndex (RemotePtr CostCentre))
getCCArray = BcM $ \st ->
let breaks = expectJust "ByteCodeGen.getCCArray" $ modBreaks st in
return (st, modBreaks_ccs breaks) | 190 | getCCArray = BcM $ \st ->
let breaks = expectJust "ByteCodeGen.getCCArray" $ modBreaks st in
return (st, modBreaks_ccs breaks) | 130 | false | true | 0 | 12 | 29 | 70 | 34 | 36 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.