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
EdisonAlgorithms/HackerRank
practice/fp/ds/lists-and-gcd/lists-and-gcd.hs
mit
merge _ [] = []
15
merge _ [] = []
15
merge _ [] = []
15
false
false
0
6
4
19
8
11
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
getResourceDensityStream :: KRPCHS.SpaceCenter.Resource -> RPCContext (KRPCStream (Float)) getResourceDensityStream thisArg = requestStream $ getResourceDensityStreamReq thisArg
177
getResourceDensityStream :: KRPCHS.SpaceCenter.Resource -> RPCContext (KRPCStream (Float)) getResourceDensityStream thisArg = requestStream $ getResourceDensityStreamReq thisArg
177
getResourceDensityStream thisArg = requestStream $ getResourceDensityStreamReq thisArg
86
false
true
0
10
13
44
21
23
null
null
nwolverson/psc-ide
src/PureScript/Ide/Watcher.hs
mit
reloadFile :: TVar PscState -> FilePath -> IO () reloadFile stateVar fp = do Right (name, decls) <- readExternFile fp reloaded <- atomically $ do st <- readTVar stateVar if isLoaded name st then loadModule name decls *> pure True else pure False when reloaded $ putStrLn $ "Relo...
545
reloadFile :: TVar PscState -> FilePath -> IO () reloadFile stateVar fp = do Right (name, decls) <- readExternFile fp reloaded <- atomically $ do st <- readTVar stateVar if isLoaded name st then loadModule name decls *> pure True else pure False when reloaded $ putStrLn $ "Relo...
545
reloadFile stateVar fp = do Right (name, decls) <- readExternFile fp reloaded <- atomically $ do st <- readTVar stateVar if isLoaded name st then loadModule name decls *> pure True else pure False when reloaded $ putStrLn $ "Reloaded File at: " ++ fp where isLoaded name s...
496
false
true
2
13
143
214
95
119
null
null
toothbrush/dotfs
System/DotFS/Core/HeaderParser.hs
bsd-3-clause
-- | this parses a shell command. These are denoted by using := instead -- of = for assignment. This is because backticks are a pain to parse, and -- we prefer the built-in stringLiteral parser. shellCommandP :: VarParser () shellCommandP = do { name <- identifier lex ; whiteSpace lex ...
630
shellCommandP :: VarParser () shellCommandP = do { name <- identifier lex ; whiteSpace lex ; _ <- symbol lex ":=" ; whiteSpace lex ; command <- exprP ; s <- getState ; let finalCommand = eval s command ...
435
shellCommandP = do { name <- identifier lex ; whiteSpace lex ; _ <- symbol lex ":=" ; whiteSpace lex ; command <- exprP ; s <- getState ; let finalCommand = eval s command ; let e = eval ...
405
true
true
0
14
242
137
67
70
null
null
silky/react-haskell
example/animation/Chain.hs
mit
finalHeight = 200
17
finalHeight = 200
17
finalHeight = 200
17
false
false
0
4
2
6
3
3
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/EC2SubnetNetworkAclAssociation.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ec2-subnet-network-acl-assoc.html#cfn-ec2-subnetnetworkaclassociation-associationid ecsnaaSubnetId :: Lens' EC2SubnetNetworkAclAssociation (Val Text) ecsnaaSubnetId = lens _eC2SubnetNetworkAclAssociationSubnetId (\s a -> s { _eC2SubnetNetwo...
351
ecsnaaSubnetId :: Lens' EC2SubnetNetworkAclAssociation (Val Text) ecsnaaSubnetId = lens _eC2SubnetNetworkAclAssociationSubnetId (\s a -> s { _eC2SubnetNetworkAclAssociationSubnetId = a })
187
ecsnaaSubnetId = lens _eC2SubnetNetworkAclAssociationSubnetId (\s a -> s { _eC2SubnetNetworkAclAssociationSubnetId = a })
121
true
true
0
9
21
46
25
21
null
null
ckaestne/CIDE
CIDE_Language_Haskell/test/WSP/Webserver/Response.hs
gpl-3.0
responseDescription :: Int -> String; responseDescription 100 = "Continue"
76
responseDescription :: Int -> String responseDescription 100 = "Continue"
73
responseDescription 100 = "Continue"
36
false
true
0
5
10
19
10
9
null
null
meiersi/scyther-proof
src/Scyther/Theory/Dot.hs
gpl-3.0
dotConclusion :: Formula -> MyDot () dotConclusion concl = case distributeOverDisj concl of f@(FDisj _ _) -> clusterAlts f f -> dotConclusionAlt f -- no extra cluster for single alternative where clusterAlts (FDisj f1 f2) = clusterAlts f1 >> clusterAlts f2 clusterAlts f = do s <- ...
523
dotConclusion :: Formula -> MyDot () dotConclusion concl = case distributeOverDisj concl of f@(FDisj _ _) -> clusterAlts f f -> dotConclusionAlt f -- no extra cluster for single alternative where clusterAlts (FDisj f1 f2) = clusterAlts f1 >> clusterAlts f2 clusterAlts f = do s <- ...
523
dotConclusion concl = case distributeOverDisj concl of f@(FDisj _ _) -> clusterAlts f f -> dotConclusionAlt f -- no extra cluster for single alternative where clusterAlts (FDisj f1 f2) = clusterAlts f1 >> clusterAlts f2 clusterAlts f = do s <- get _ <- myCluster $ do ...
486
false
true
1
14
149
153
68
85
null
null
tomahawkins/risk
RISK/X86_64.hs
bsd-2-clause
eax = Eax
9
eax = Eax
9
eax = Eax
9
false
false
1
5
2
10
3
7
null
null
piyush-kurur/yesod
yesod-core/test/YesodCoreTest/YesodTest.hs
mit
yesod :: (YesodDispatch y y, Yesod y) => y -> Session a -> IO a yesod app f = toWaiApp app >>= runSession f
107
yesod :: (YesodDispatch y y, Yesod y) => y -> Session a -> IO a yesod app f = toWaiApp app >>= runSession f
107
yesod app f = toWaiApp app >>= runSession f
43
false
true
2
9
23
63
29
34
null
null
quchen/prettyprinter
prettyprinter/test/Testsuite/StripTrailingSpace.hs
bsd-2-clause
testStripping :: Doc ann -> Assertion testStripping doc = case hasTrailingWhitespace (render removeTrailingWhitespace doc) of False -> pure () True -> (assertFailure . T.unpack . T.unlines) [ bbox "Input is not stripped correctly!" , "" , box "Rendered/stripped:" , (revealSpaces...
1,185
testStripping :: Doc ann -> Assertion testStripping doc = case hasTrailingWhitespace (render removeTrailingWhitespace doc) of False -> pure () True -> (assertFailure . T.unpack . T.unlines) [ bbox "Input is not stripped correctly!" , "" , box "Rendered/stripped:" , (revealSpaces...
1,185
testStripping doc = case hasTrailingWhitespace (render removeTrailingWhitespace doc) of False -> pure () True -> (assertFailure . T.unpack . T.unlines) [ bbox "Input is not stripped correctly!" , "" , box "Rendered/stripped:" , (revealSpaces . render removeTrailingWhitespace) do...
1,147
false
true
0
13
284
319
161
158
null
null
sonyandy/var
src/Data/Tuple/Array.hs
bsd-3-clause
sizeOf :: (ITuple t, ArraySlice (Tuple (ListRep t))) => t -> Int sizeOf = size . proxyTuple
91
sizeOf :: (ITuple t, ArraySlice (Tuple (ListRep t))) => t -> Int sizeOf = size . proxyTuple
91
sizeOf = size . proxyTuple
26
false
true
0
10
16
46
24
22
null
null
vikraman/ghc
compiler/prelude/TysPrim.hs
bsd-3-clause
smallArrayPrimTyConName = mkPrimTc (fsLit "SmallArray#") smallArrayPrimTyConKey smallArrayPrimTyCon
105
smallArrayPrimTyConName = mkPrimTc (fsLit "SmallArray#") smallArrayPrimTyConKey smallArrayPrimTyCon
105
smallArrayPrimTyConName = mkPrimTc (fsLit "SmallArray#") smallArrayPrimTyConKey smallArrayPrimTyCon
105
false
false
1
7
12
22
9
13
null
null
unisonweb/platform
parser-typechecker/src/Unison/Util/PinBoard.hs
mit
-- | Add a value to a bucket. bucketAdd :: Bucket a -> a -> IO () -> IO (Bucket a) bucketAdd (Bucket weaks) x finalizer = do weak <- mkWeakPtr x (Just finalizer) pure (Bucket (weak : weaks)) -- | Drop all garbage-collected values from a bucket. If none remain, returns Nothing.
282
bucketAdd :: Bucket a -> a -> IO () -> IO (Bucket a) bucketAdd (Bucket weaks) x finalizer = do weak <- mkWeakPtr x (Just finalizer) pure (Bucket (weak : weaks)) -- | Drop all garbage-collected values from a bucket. If none remain, returns Nothing.
252
bucketAdd (Bucket weaks) x finalizer = do weak <- mkWeakPtr x (Just finalizer) pure (Bucket (weak : weaks)) -- | Drop all garbage-collected values from a bucket. If none remain, returns Nothing.
199
true
true
0
11
57
92
44
48
null
null
mettekou/ghc
compiler/nativeGen/SPARC/Ppr.hs
bsd-3-clause
-- | Pretty print a condition code. pprCond :: Cond -> SDoc pprCond c = ptext (case c of ALWAYS -> sLit "" NEVER -> sLit "n" GEU -> sLit "geu" LU -> sLit "lu" EQQ -> sLit "e" GTT -> sLit "g" GE -> sLit "ge" GU -> sLit "gu...
556
pprCond :: Cond -> SDoc pprCond c = ptext (case c of ALWAYS -> sLit "" NEVER -> sLit "n" GEU -> sLit "geu" LU -> sLit "lu" EQQ -> sLit "e" GTT -> sLit "g" GE -> sLit "ge" GU -> sLit "gu" LTT -> sLit "l" ...
520
pprCond c = ptext (case c of ALWAYS -> sLit "" NEVER -> sLit "n" GEU -> sLit "geu" LU -> sLit "lu" EQQ -> sLit "e" GTT -> sLit "g" GE -> sLit "ge" GU -> sLit "gu" LTT -> sLit "l" LE -> sLit "le" ...
496
true
true
0
10
281
179
80
99
null
null
spacekitteh/smcghc
libraries/base/Control/Monad/ST/Lazy/Imp.hs
bsd-3-clause
-- --------------------------------------------------------------------------- -- Strict <--> Lazy unsafeInterleaveST :: ST s a -> ST s a unsafeInterleaveST = strictToLazyST . ST.unsafeInterleaveST . lazyToStrictST
215
unsafeInterleaveST :: ST s a -> ST s a unsafeInterleaveST = strictToLazyST . ST.unsafeInterleaveST . lazyToStrictST
115
unsafeInterleaveST = strictToLazyST . ST.unsafeInterleaveST . lazyToStrictST
76
true
true
0
7
22
43
20
23
null
null
silkapp/pickler.js
src/Pickler.hs
bsd-3-clause
many :: Eq o => Pickler i o -> Pickler i [o] many p = label (Many (_label p)) $ cons `guards` (:) <$> head >- p <*> tail >- many p <|> (nil `guards` pure [])
197
many :: Eq o => Pickler i o -> Pickler i [o] many p = label (Many (_label p)) $ cons `guards` (:) <$> head >- p <*> tail >- many p <|> (nil `guards` pure [])
197
many p = label (Many (_label p)) $ cons `guards` (:) <$> head >- p <*> tail >- many p <|> (nil `guards` pure [])
152
false
true
0
16
76
102
52
50
null
null
glguy/irc-core
src/Client/Commands/TabCompletion.hs
isc
-- | Provides nickname based tab completion for client commands simpleClientTab :: Bool -> ClientCommand String simpleClientTab isReversed st _ = nickTabCompletion isReversed st
179
simpleClientTab :: Bool -> ClientCommand String simpleClientTab isReversed st _ = nickTabCompletion isReversed st
115
simpleClientTab isReversed st _ = nickTabCompletion isReversed st
67
true
true
0
6
25
31
15
16
null
null
dermesser/twothousandfortyeight
Main.hs
mit
gameIsOver :: Field -> Bool gameIsOver f = (null $ getTilesWith 0 f) && f == shiftField ToUp f && f == shiftField ToDown f && f == shiftField ToRight f && f == shiftField ToLeft f
227
gameIsOver :: Field -> Bool gameIsOver f = (null $ getTilesWith 0 f) && f == shiftField ToUp f && f == shiftField ToDown f && f == shiftField ToRight f && f == shiftField ToLeft f
227
gameIsOver f = (null $ getTilesWith 0 f) && f == shiftField ToUp f && f == shiftField ToDown f && f == shiftField ToRight f && f == shiftField ToLeft f
199
false
true
8
7
84
85
40
45
null
null
andorp/grin
grin/src/AbstractInterpretation/HeapPointsTo/CodeGenBase.hs
bsd-3-clause
getTag :: Tag -> CG IR.Tag getTag tag = do tagMap <- gets _sTagMap case Bimap.lookup tag tagMap of Just t -> pure t Nothing -> do let t = IR.Tag . fromIntegral $ Bimap.size tagMap modify' $ \s -> s {_sTagMap = Bimap.insert tag t tagMap} pure t
274
getTag :: Tag -> CG IR.Tag getTag tag = do tagMap <- gets _sTagMap case Bimap.lookup tag tagMap of Just t -> pure t Nothing -> do let t = IR.Tag . fromIntegral $ Bimap.size tagMap modify' $ \s -> s {_sTagMap = Bimap.insert tag t tagMap} pure t
274
getTag tag = do tagMap <- gets _sTagMap case Bimap.lookup tag tagMap of Just t -> pure t Nothing -> do let t = IR.Tag . fromIntegral $ Bimap.size tagMap modify' $ \s -> s {_sTagMap = Bimap.insert tag t tagMap} pure t
247
false
true
0
17
79
124
57
67
null
null
christiaanb/ghc
compiler/basicTypes/IdInfo.hs
bsd-3-clause
ppArityInfo :: Int -> SDoc ppArityInfo 0 = empty
48
ppArityInfo :: Int -> SDoc ppArityInfo 0 = empty
48
ppArityInfo 0 = empty
21
false
true
0
5
8
18
9
9
null
null
atc-/haskell-dsci
test/TestMain.hs
gpl-3.0
main :: IO () main = runTests >> specMain
41
main :: IO () main = runTests >> specMain
41
main = runTests >> specMain
27
false
true
0
6
8
20
10
10
null
null
iblumenfeld/saw-core
src/Verifier/SAW/Simulator/Value.hs
bsd-3-clause
apply _ _ = fail "Not a function value"
39
apply _ _ = fail "Not a function value"
39
apply _ _ = fail "Not a function value"
39
false
false
0
5
8
14
6
8
null
null
themoritz/cabal
Cabal/Distribution/Simple/Compiler.hs
bsd-3-clause
arResponseFilesSupported :: Compiler -> Bool arResponseFilesSupported = ghcSupported "ar supports at file"
106
arResponseFilesSupported :: Compiler -> Bool arResponseFilesSupported = ghcSupported "ar supports at file"
106
arResponseFilesSupported = ghcSupported "ar supports at file"
61
false
true
0
5
11
18
9
9
null
null
purcell/adventofcodeteam
app/Fourteen.hs
bsd-3-clause
distanceFlown :: Int -> Reindeer -> Int distanceFlown seconds (speed, fly, rest) = speed * flightTime where flightTime = full * fly + min fly partial (full, partial) = seconds `divMod` cycle cycle = fly + rest
227
distanceFlown :: Int -> Reindeer -> Int distanceFlown seconds (speed, fly, rest) = speed * flightTime where flightTime = full * fly + min fly partial (full, partial) = seconds `divMod` cycle cycle = fly + rest
227
distanceFlown seconds (speed, fly, rest) = speed * flightTime where flightTime = full * fly + min fly partial (full, partial) = seconds `divMod` cycle cycle = fly + rest
187
false
true
2
9
54
87
46
41
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Regions/List.hs
mpl-2.0
-- | Sets a filter expression for filtering listed resources, in the form -- filter={expression}. Your {expression} must be in the format: field_name -- comparison_string literal_string. The field_name is the name of the -- field you want to compare. Only atomic field types are supported -- (string, number, boolean). T...
1,502
regFilter :: Lens' RegionsList (Maybe Text) regFilter = lens _regFilter (\ s a -> s{_regFilter = a})
102
regFilter = lens _regFilter (\ s a -> s{_regFilter = a})
58
true
true
0
9
241
67
44
23
null
null
fmapfmapfmap/amazonka
amazonka-swf/gen/Network/AWS/SWF/StartWorkflowExecution.hs
mpl-2.0
-- | The response status code. swersResponseStatus :: Lens' StartWorkflowExecutionResponse Int swersResponseStatus = lens _swersResponseStatus (\ s a -> s{_swersResponseStatus = a})
181
swersResponseStatus :: Lens' StartWorkflowExecutionResponse Int swersResponseStatus = lens _swersResponseStatus (\ s a -> s{_swersResponseStatus = a})
150
swersResponseStatus = lens _swersResponseStatus (\ s a -> s{_swersResponseStatus = a})
86
true
true
0
9
21
40
22
18
null
null
jwiegley/ghc-release
libraries/Cabal/cabal/Distribution/Simple/Utils.hs
gpl-3.0
-- | Use a temporary filename that doesn't already exist. -- withTempFile :: FilePath -- ^ Temp dir to create the file in -> String -- ^ File name template. See 'openTempFile'. -> (FilePath -> Handle -> IO a) -> IO a withTempFile tmpDir template action = withTempFileEx defaultTemp...
354
withTempFile :: FilePath -- ^ Temp dir to create the file in -> String -- ^ File name template. See 'openTempFile'. -> (FilePath -> Handle -> IO a) -> IO a withTempFile tmpDir template action = withTempFileEx defaultTempFileOptions tmpDir template action
293
withTempFile tmpDir template action = withTempFileEx defaultTempFileOptions tmpDir template action
100
true
true
0
11
90
60
31
29
null
null
fcostantini/PlEb
src/Parsing.hs
gpl-3.0
toCmd :: [Cmd] -> Cmd toCmd [] = error "Shouldn't happen..."
60
toCmd :: [Cmd] -> Cmd toCmd [] = error "Shouldn't happen..."
60
toCmd [] = error "Shouldn't happen..."
38
false
true
0
8
10
31
14
17
null
null
ImsungChoi/haskell-test
src/HW03.hs
bsd-3-clause
{- Calculate the floor of the square root of the input B := 0; while (A >= B * B) { B++ }; B := B - 1 -} squareRoot :: Statement squareRoot = slist [ Assign "B" (Val 0) , While (Op (Var "A") Ge (Op (Var "B") Times (Var "B"))) (Incr "B") , As...
378
squareRoot :: Statement squareRoot = slist [ Assign "B" (Val 0) , While (Op (Var "A") Ge (Op (Var "B") Times (Var "B"))) (Incr "B") , Assign "B" (Op (Var "B") Minus (Val 1)) ]
255
squareRoot = slist [ Assign "B" (Val 0) , While (Op (Var "A") Ge (Op (Var "B") Times (Var "B"))) (Incr "B") , Assign "B" (Op (Var "B") Minus (Val 1)) ]
231
true
true
0
12
161
117
57
60
null
null
mrkkrp/mida
src/Mida/Interaction/Commands.hs
gpl-3.0
cmdPwd :: MonadIO m => String -> m () cmdPwd _ = liftIO (getCurrentDir >>= putStrLn . fromAbsDir)
97
cmdPwd :: MonadIO m => String -> m () cmdPwd _ = liftIO (getCurrentDir >>= putStrLn . fromAbsDir)
97
cmdPwd _ = liftIO (getCurrentDir >>= putStrLn . fromAbsDir)
59
false
true
0
8
17
44
21
23
null
null
mfine/hs-talks
src/Libv11.hs
bsd-3-clause
afcWest = "AFC West"
20
afcWest = "AFC West"
20
afcWest = "AFC West"
20
false
false
0
4
3
6
3
3
null
null
glaebhoerl/phasechange
Data/PhaseChange/Internal.hs
bsd-3-clause
copy2 :: (PhaseChange (imm a b) (M2 mut a b), MonadST mST, s ~ World mST) => mut s a b -> mST (mut s a b) copy2 = liftM unM2 . copy . M2
136
copy2 :: (PhaseChange (imm a b) (M2 mut a b), MonadST mST, s ~ World mST) => mut s a b -> mST (mut s a b) copy2 = liftM unM2 . copy . M2
136
copy2 = liftM unM2 . copy . M2
30
false
true
0
9
34
92
45
47
null
null
brendanhay/gogol
gogol-dns/gen/Network/Google/DNS/Types/Product.hs
mpl-2.0
plrHeader :: Lens' PoliciesListResponse (Maybe ResponseHeader) plrHeader = lens _plrHeader (\ s a -> s{_plrHeader = a})
121
plrHeader :: Lens' PoliciesListResponse (Maybe ResponseHeader) plrHeader = lens _plrHeader (\ s a -> s{_plrHeader = a})
121
plrHeader = lens _plrHeader (\ s a -> s{_plrHeader = a})
58
false
true
0
9
18
48
24
24
null
null
obgs/utils
src/Obgs/Utils/Type.hs
mit
-- | Returns a 'Proxy' for the second argument of the given type. subProxySnd4 :: Proxy (a b c d e) -> Proxy c subProxySnd4 _ = Proxy
133
subProxySnd4 :: Proxy (a b c d e) -> Proxy c subProxySnd4 _ = Proxy
67
subProxySnd4 _ = Proxy
22
true
true
0
8
27
37
18
19
null
null
Siprj/xmonadrc
src/xmonad.hs
mit
rotateKeyboardLayouts (x:[]) = [x]
34
rotateKeyboardLayouts (x:[]) = [x]
34
rotateKeyboardLayouts (x:[]) = [x]
34
false
false
0
8
3
21
11
10
null
null
devtype-blogspot-com/Haskell-Examples
OddCont/Demo.hs
gpl-3.0
takeNCons n (BiCons a b c) = BiCons a b (takeNCons (n - 1) c)
61
takeNCons n (BiCons a b c) = BiCons a b (takeNCons (n - 1) c)
61
takeNCons n (BiCons a b c) = BiCons a b (takeNCons (n - 1) c)
61
false
false
0
9
14
43
21
22
null
null
romanofski/gtfsschedule
src/GTFS/Database.hs
gpl-3.0
prepareStmt :: (MonadIO m) => T.Text -> ReaderT Sqlite.SqlBackend m Sqlite.Statement prepareStmt sql = ask >>= liftIO . flip Sqlite.connPrepare sql
153
prepareStmt :: (MonadIO m) => T.Text -> ReaderT Sqlite.SqlBackend m Sqlite.Statement prepareStmt sql = ask >>= liftIO . flip Sqlite.connPrepare sql
153
prepareStmt sql = ask >>= liftIO . flip Sqlite.connPrepare sql
62
false
true
0
8
26
55
27
28
null
null
comraq/scheme-interpreter
src/LispVector.hs
bsd-3-clause
vectorFill :: b -> SVector a -> SVector b vectorFill val = amap (const val)
75
vectorFill :: b -> SVector a -> SVector b vectorFill val = amap (const val)
75
vectorFill val = amap (const val)
33
false
true
0
7
14
37
17
20
null
null
kfish/hogg
tools/hogg.hs
bsd-3-clause
-- Don't add banners if only one file to report reportPerFile l = do filenames <- asks hotFilenames let fHeader f = C.pack $ printf "Filename: %s\n\n" f let fText = zip (map fHeader filenames) l let sep = C.pack $ replicate 60 '-' ++ "\n" let banner (f,t) = C.concat [sep,f,t] outputC $ C.concat ...
361
reportPerFile l = do filenames <- asks hotFilenames let fHeader f = C.pack $ printf "Filename: %s\n\n" f let fText = zip (map fHeader filenames) l let sep = C.pack $ replicate 60 '-' ++ "\n" let banner (f,t) = C.concat [sep,f,t] outputC $ C.concat $ map banner fText -- Output binary data
313
reportPerFile l = do filenames <- asks hotFilenames let fHeader f = C.pack $ printf "Filename: %s\n\n" f let fText = zip (map fHeader filenames) l let sep = C.pack $ replicate 60 '-' ++ "\n" let banner (f,t) = C.concat [sep,f,t] outputC $ C.concat $ map banner fText -- Output binary data
313
true
false
1
13
87
144
66
78
null
null
wxzh/fcore
lib/FileIO.hs
bsd-2-clause
receiveMsg :: Int -> Handle -> IO Int receiveMsg err h = do msg <- hGetLine h if msg == "exit" then return err else do putStrLn msg receiveMsg err h -- make test2
187
receiveMsg :: Int -> Handle -> IO Int receiveMsg err h = do msg <- hGetLine h if msg == "exit" then return err else do putStrLn msg receiveMsg err h -- make test2
187
receiveMsg err h = do msg <- hGetLine h if msg == "exit" then return err else do putStrLn msg receiveMsg err h -- make test2
149
false
true
0
10
58
70
32
38
null
null
micknelso/language-c
src/Language/CFamily/C/Analysis/SemRep.hs
bsd-3-clause
-- | @splitIdentDecls includeAllDecls@ splits a map of object, function and enumerator declarations and definitions into one map -- holding declarations, and three maps for object definitions, enumerator definitions and function definitions. -- If @includeAllDecls@ is @True@ all declarations are present in the first ma...
1,382
splitIdentDecls :: Bool -> Map Ident IdentDecl -> (Map Ident Decl, ( Map Ident Enumerator, Map Ident ObjDef, Map Ident FunDef ) ) splitIdentDecls include_all = Map.foldWith...
987
splitIdentDecls include_all = Map.foldWithKey (if include_all then deal else deal') (Map.empty,(Map.empty,Map.empty,Map.empty)) where deal ident entry (decls,defs) = (Map.insert ident (declOfDef entry) decls, addDef ident entry defs) deal' ident (Declaration d) (decls,defs) = (Map.insert ident d decls,defs) dea...
709
true
true
0
10
370
351
189
162
null
null
fffej/Yahtzee
src/Game/Yahtzee/Yahtzee.hs
bsd-2-clause
scoreRoll r LargeStraight | isLargeStraight r = 40 | otherwise = 0
70
scoreRoll r LargeStraight | isLargeStraight r = 40 | otherwise = 0
70
scoreRoll r LargeStraight | isLargeStraight r = 40 | otherwise = 0
70
false
false
1
8
15
28
12
16
null
null
rueshyna/gogol
gogol-youtube-reporting/gen/Network/Google/YouTubeReporting/Types/Product.hs
mpl-2.0
-- | Creates a value of 'Job' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'jName' -- -- * 'jId' -- -- * 'jSystemManaged' -- -- * 'jReportTypeId' -- -- * 'jExpireTime' -- -- * 'jCreateTime' job :: Job job = Job' { _jName...
478
job :: Job job = Job' { _jName = Nothing , _jId = Nothing , _jSystemManaged = Nothing , _jReportTypeId = Nothing , _jExpireTime = Nothing , _jCreateTime = Nothing }
200
job = Job' { _jName = Nothing , _jId = Nothing , _jSystemManaged = Nothing , _jReportTypeId = Nothing , _jExpireTime = Nothing , _jCreateTime = Nothing }
185
true
true
0
6
120
64
46
18
null
null
atomb/dalvik
Dalvik/LEB128.hs
bsd-3-clause
{- LEB128 decoding -} getSLEB128 :: Get Int32 getSLEB128 = do (a, n) <- smashLEB <$> getLEB let a' | a .&. (1 `shiftL` n) == 0 = a | otherwise = a .|. (0xFFFFFFFF `shiftL` n) return $ fromIntegral a'
215
getSLEB128 :: Get Int32 getSLEB128 = do (a, n) <- smashLEB <$> getLEB let a' | a .&. (1 `shiftL` n) == 0 = a | otherwise = a .|. (0xFFFFFFFF `shiftL` n) return $ fromIntegral a'
192
getSLEB128 = do (a, n) <- smashLEB <$> getLEB let a' | a .&. (1 `shiftL` n) == 0 = a | otherwise = a .|. (0xFFFFFFFF `shiftL` n) return $ fromIntegral a'
168
true
true
0
16
56
96
49
47
null
null
codingSteve/fp101x
20151019/ex_07.hs
cc0-1.0
qsort1 [] = qsort []
24
qsort1 [] = qsort []
24
qsort1 [] = qsort []
24
false
false
0
6
8
17
7
10
null
null
markuspf/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
termSmallerThan x Impossible = True
35
termSmallerThan x Impossible = True
35
termSmallerThan x Impossible = True
35
false
false
0
4
4
13
5
8
null
null
brendanhay/gogol
gogol-vault/gen/Network/Google/Resource/Vault/Operations/Get.hs
mpl-2.0
-- | The name of the operation resource. ogName :: Lens' OperationsGet Text ogName = lens _ogName (\ s a -> s{_ogName = a})
123
ogName :: Lens' OperationsGet Text ogName = lens _ogName (\ s a -> s{_ogName = a})
82
ogName = lens _ogName (\ s a -> s{_ogName = a})
47
true
true
1
9
23
45
22
23
null
null
avieth/diplomacy
Diplomacy/Province.hs
bsd-3-clause
supplyCentre Trieste = True
27
supplyCentre Trieste = True
27
supplyCentre Trieste = True
27
false
false
0
5
3
9
4
5
null
null
rootzlevel/device-manager
src/Brick/Widgets/HelpMessage.hs
bsd-3-clause
key :: Text -> Text -> Widget n key k h = markup ((" " <> k) @? (helpAttr <> "key")) <+> padLeft Max (markup (h @? (helpAttr <> "description")))
153
key :: Text -> Text -> Widget n key k h = markup ((" " <> k) @? (helpAttr <> "key")) <+> padLeft Max (markup (h @? (helpAttr <> "description")))
153
key k h = markup ((" " <> k) @? (helpAttr <> "key")) <+> padLeft Max (markup (h @? (helpAttr <> "description")))
121
false
true
0
12
38
84
42
42
null
null
obscaenvs/yesod-ng
Yesod/Angular.hs
mit
directiveToComponent :: (NgCompFoundation c) => NgDirective c -> NgComponents c directiveToComponent dct = NgComponents ([],[dct],[])
133
directiveToComponent :: (NgCompFoundation c) => NgDirective c -> NgComponents c directiveToComponent dct = NgComponents ([],[dct],[])
133
directiveToComponent dct = NgComponents ([],[dct],[])
53
false
true
0
7
14
52
27
25
null
null
denibertovic/dummy-api
src/Dummy/Api/Docs.hs
bsd-3-clause
list = List "Sample List" (toSqlKey 1)
38
list = List "Sample List" (toSqlKey 1)
38
list = List "Sample List" (toSqlKey 1)
38
false
false
0
7
6
17
8
9
null
null
input-output-hk/pos-haskell-prototype
db/src/Pos/DB/Update/GState.hs
mit
-- | Get last confirmed SoftwareVersion of given application. getConfirmedSV :: MonadDBRead m => ApplicationName -> m (Maybe NumSoftwareVersion) getConfirmedSV = gsGetBi . confirmedVersionKey
191
getConfirmedSV :: MonadDBRead m => ApplicationName -> m (Maybe NumSoftwareVersion) getConfirmedSV = gsGetBi . confirmedVersionKey
129
getConfirmedSV = gsGetBi . confirmedVersionKey
46
true
true
0
9
23
36
18
18
null
null
green-haskell/ghc
compiler/utils/Util.hs
bsd-3-clause
filterOut p (x:xs) | p x = filterOut p xs | otherwise = x : filterOut p xs
99
filterOut p (x:xs) | p x = filterOut p xs | otherwise = x : filterOut p xs
99
filterOut p (x:xs) | p x = filterOut p xs | otherwise = x : filterOut p xs
99
false
false
0
8
42
50
22
28
null
null
romanb/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DeleteSubnet.hs
mpl-2.0
-- | 'DeleteSubnetResponse' constructor. deleteSubnetResponse :: DeleteSubnetResponse deleteSubnetResponse = DeleteSubnetResponse
129
deleteSubnetResponse :: DeleteSubnetResponse deleteSubnetResponse = DeleteSubnetResponse
88
deleteSubnetResponse = DeleteSubnetResponse
43
true
true
0
4
9
12
7
5
null
null
stu-smith/rendering-in-haskell
src/experiment01/Main.hs
mit
main :: IO () main = do putStrLn "Starting render..." createDirectoryIfMissing True "output" saveRender "output/experiment01.bmp" 640 480 $ render cam cornellBox putStrLn "Written output to output/experiment01.bmp" where cam = Ray { rayOrigin = Point 50.0 52.0 295.6 , rayDirection...
384
main :: IO () main = do putStrLn "Starting render..." createDirectoryIfMissing True "output" saveRender "output/experiment01.bmp" 640 480 $ render cam cornellBox putStrLn "Written output to output/experiment01.bmp" where cam = Ray { rayOrigin = Point 50.0 52.0 295.6 , rayDirection...
384
main = do putStrLn "Starting render..." createDirectoryIfMissing True "output" saveRender "output/experiment01.bmp" 640 480 $ render cam cornellBox putStrLn "Written output to output/experiment01.bmp" where cam = Ray { rayOrigin = Point 50.0 52.0 295.6 , rayDirection = normalize $...
370
false
true
1
11
103
114
51
63
null
null
ghcjs/ghcjs-base
test/Tests.hs
mit
main :: IO () main = defaultMain [Buffer.tests, Properties.tests, Regressions.tests, Marshal.tests]
99
main :: IO () main = defaultMain [Buffer.tests, Properties.tests, Regressions.tests, Marshal.tests]
99
main = defaultMain [Buffer.tests, Properties.tests, Regressions.tests, Marshal.tests]
85
false
true
1
7
10
42
21
21
null
null
zouppen/stratum-tool
src/Main.hs
agpl-3.0
-- |Parse argument using alias notation splitAlias :: String -> (String, Maybe (Text, Text)) splitAlias s = case break (==':') s of (name, "") -> (name, Nothing) (alias, ':':name) -> (name, Just (T.pack name, T.pack alias)) -- |Process a list of arguments and produce pair which has names in -- first element and al...
366
splitAlias :: String -> (String, Maybe (Text, Text)) splitAlias s = case break (==':') s of (name, "") -> (name, Nothing) (alias, ':':name) -> (name, Just (T.pack name, T.pack alias)) -- |Process a list of arguments and produce pair which has names in -- first element and alias conversion function as the second el...
326
splitAlias s = case break (==':') s of (name, "") -> (name, Nothing) (alias, ':':name) -> (name, Just (T.pack name, T.pack alias)) -- |Process a list of arguments and produce pair which has names in -- first element and alias conversion function as the second element)
273
true
true
0
13
64
114
62
52
null
null
harrisi/on-being-better
list-expansion/Haskell/course/src/Course/JsonParser.hs
cc0-1.0
fromSpecialCharacter VerticalTab = '\v'
41
fromSpecialCharacter VerticalTab = '\v'
41
fromSpecialCharacter VerticalTab = '\v'
41
false
false
1
5
5
13
4
9
null
null
kdungs/adventofcode2016
08.hs
mit
parseRotCol :: Parser Instruction parseRotCol = do string "rotate column x=" x <- parseDecimal string " by " n <- parseDecimal return (RotCol x n)
226
parseRotCol :: Parser Instruction parseRotCol = do string "rotate column x=" x <- parseDecimal string " by " n <- parseDecimal return (RotCol x n)
226
parseRotCol = do string "rotate column x=" x <- parseDecimal string " by " n <- parseDecimal return (RotCol x n)
192
false
true
0
10
104
60
24
36
null
null
iblumenfeld/cryptol
src/Cryptol/Parser/NoPat.hs
bsd-3-clause
-------------------------------------------------------------------------------- noPatE :: Expr -> NoPatM Expr noPatE expr = case expr of EVar {} -> return expr ELit {} -> return expr ETuple es -> ETuple <$> mapM noPatE es ERecord es -> ERecord <$> mapM noPatF es ESel e s ...
1,266
noPatE :: Expr -> NoPatM Expr noPatE expr = case expr of EVar {} -> return expr ELit {} -> return expr ETuple es -> ETuple <$> mapM noPatE es ERecord es -> ERecord <$> mapM noPatF es ESel e s -> ESel <$> noPatE e <*> return s EList es -> EList <$> mapM noPatE...
1,184
noPatE expr = case expr of EVar {} -> return expr ELit {} -> return expr ETuple es -> ETuple <$> mapM noPatE es ERecord es -> ERecord <$> mapM noPatF es ESel e s -> ESel <$> noPatE e <*> return s EList es -> EList <$> mapM noPatE es EFromTo {} -> retur...
1,154
true
true
0
12
418
526
236
290
null
null
davmre/matrizer
src/Matrizer/Analysis.hs
gpl-2.0
exprType strict (Branch3 MTernaryProduct t1 t2 t3) tbl = updateMatrixTernaryOp strict ternProductSizeCheck ternProductNewSize MTernaryProduct t1 t2 t3 tbl
154
exprType strict (Branch3 MTernaryProduct t1 t2 t3) tbl = updateMatrixTernaryOp strict ternProductSizeCheck ternProductNewSize MTernaryProduct t1 t2 t3 tbl
154
exprType strict (Branch3 MTernaryProduct t1 t2 t3) tbl = updateMatrixTernaryOp strict ternProductSizeCheck ternProductNewSize MTernaryProduct t1 t2 t3 tbl
154
false
false
0
7
17
42
20
22
null
null
vladfi1/hs-misc
lib/Misc/VinylUtils.hs
mit
rnull _ = False
15
rnull _ = False
15
rnull _ = False
15
false
false
0
5
3
9
4
5
null
null
Blaisorblade/stack
src/Stack/Build/Cache.hs
bsd-3-clause
-- | Try to read the dirtiness cache for the given package directory. tryGetConfigCache :: (MonadIO m, MonadReader env m, MonadThrow m, HasEnvConfig env, MonadBaseControl IO m, MonadLogger m) => Path Abs Dir -> m (Maybe ConfigCache) tryGetConfigCache dir = $(versionedDecodeFile configCacheVC) =<< conf...
335
tryGetConfigCache :: (MonadIO m, MonadReader env m, MonadThrow m, HasEnvConfig env, MonadBaseControl IO m, MonadLogger m) => Path Abs Dir -> m (Maybe ConfigCache) tryGetConfigCache dir = $(versionedDecodeFile configCacheVC) =<< configCacheFile dir
265
tryGetConfigCache dir = $(versionedDecodeFile configCacheVC) =<< configCacheFile dir
84
true
true
0
9
62
90
44
46
null
null
yjwen/hada
src/IR/Heap.hs
lgpl-3.0
-- Another name of (!?), to avoid name conflicts access :: Heap -> Int -> Maybe Closure access = (!?)
101
access :: Heap -> Int -> Maybe Closure access = (!?)
52
access = (!?)
13
true
true
0
8
19
31
15
16
null
null
t4sk/upenn-cis194
hw-02/LogAnalysis.hs
mit
parseMessage :: String -> LogMessage parseMessage str = case (words str) of ("I":t:ws) -> LogMessage Info (toInt t) (unwords ws) ("W":t:ws) -> LogMessage Warning (toInt t) (unwords ws) ("E":t:e:ws) -> LogMessage (Error (toInt e)) (toInt t) (unwords ws) _ -> Unknown str
287
parseMessage :: String -> LogMessage parseMessage str = case (words str) of ("I":t:ws) -> LogMessage Info (toInt t) (unwords ws) ("W":t:ws) -> LogMessage Warning (toInt t) (unwords ws) ("E":t:e:ws) -> LogMessage (Error (toInt e)) (toInt t) (unwords ws) _ -> Unknown str
287
parseMessage str = case (words str) of ("I":t:ws) -> LogMessage Info (toInt t) (unwords ws) ("W":t:ws) -> LogMessage Warning (toInt t) (unwords ws) ("E":t:e:ws) -> LogMessage (Error (toInt e)) (toInt t) (unwords ws) _ -> Unknown str
250
false
true
0
12
59
161
80
81
null
null
beni55/old-openresty
haskell/src/RestyScript/Parser.hs
bsd-3-clause
parseFuncCall :: Parser RSVal parseFuncCall = do f <- parseIdent args <- parens parseArgs return $ FuncCall f args
152
parseFuncCall :: Parser RSVal parseFuncCall = do f <- parseIdent args <- parens parseArgs return $ FuncCall f args
152
parseFuncCall = do f <- parseIdent args <- parens parseArgs return $ FuncCall f args
122
false
true
0
9
56
49
20
29
null
null
iatorm/grime
Expression.hs
mit
orient AnyRect _ = AnyRect
26
orient AnyRect _ = AnyRect
26
orient AnyRect _ = AnyRect
26
false
false
0
4
4
13
5
8
null
null
ulricha/dsh-tpc-h
BenchDSH.hs
bsd-3-clause
q10Row _ = error "q10: row format"
60
q10Row _ = error "q10: row format"
60
q10Row _ = error "q10: row format"
60
false
false
0
5
32
12
5
7
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Unit.hs
mit
isWorker CritterKakaru = False
30
isWorker CritterKakaru = False
30
isWorker CritterKakaru = False
30
false
false
0
5
3
9
4
5
null
null
23Skidoo/xmlhtml
src/Text/XmlHtml/TextParser.hs
bsd-3-clause
------------------------------------------------------------------------------ parse :: (Encoding -> Parser a) -> String -> ByteString -> Either String a parse p src b = let (e, b') = guessEncoding b t = decoder e b' bad = T.find (not . isValidChar) t in...
544
parse :: (Encoding -> Parser a) -> String -> ByteString -> Either String a parse p src b = let (e, b') = guessEncoding b t = decoder e b' bad = T.find (not . isValidChar) t in if isNothing bad then parseText (p e <* P.eof) src t ...
465
parse p src b = let (e, b') = guessEncoding b t = decoder e b' bad = T.find (not . isValidChar) t in if isNothing bad then parseText (p e <* P.eof) src t else Left $ "Document contains invalid character:" ...
390
true
true
0
13
212
153
76
77
null
null
JoeyEremondi/utrecht-apa-p1
src/Type/Unify.hs
bsd-3-clause
fieldMismatchError :: Map.Map String a -> String fieldMismatchError missingFields = case Map.keys missingFields of [] -> "" [key] -> "Looks like a record is missing the field '" ++ key ++ "'.\n " ++ "Maybe there is a misspelling in a record access or record update?" keys -> ...
436
fieldMismatchError :: Map.Map String a -> String fieldMismatchError missingFields = case Map.keys missingFields of [] -> "" [key] -> "Looks like a record is missing the field '" ++ key ++ "'.\n " ++ "Maybe there is a misspelling in a record access or record update?" keys -> ...
436
fieldMismatchError missingFields = case Map.keys missingFields of [] -> "" [key] -> "Looks like a record is missing the field '" ++ key ++ "'.\n " ++ "Maybe there is a misspelling in a record access or record update?" keys -> "Looks like one record is missing fields " ...
387
false
true
0
13
125
100
48
52
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp dflags res WriteByteArrayOp_Word16 args = doWriteByteArrayOp (Just (mo_WordTo16 dflags)) b16 res args
122
emitPrimOp dflags res WriteByteArrayOp_Word16 args = doWriteByteArrayOp (Just (mo_WordTo16 dflags)) b16 res args
122
emitPrimOp dflags res WriteByteArrayOp_Word16 args = doWriteByteArrayOp (Just (mo_WordTo16 dflags)) b16 res args
122
false
false
0
9
22
36
17
19
null
null
IreneKnapp/Faction
libfaction/Distribution/Simple/GHC.hs
bsd-3-clause
updateLibArchive :: Verbosity -> LocalBuildInfo -> FilePath -> IO () updateLibArchive verbosity lbi path | buildOS == OSX = do (ranlib, _) <- requireProgram verbosity ranlibProgram (withPrograms lbi) rawSystemProgram verbosity ranlib [path] | otherwise = return ()
276
updateLibArchive :: Verbosity -> LocalBuildInfo -> FilePath -> IO () updateLibArchive verbosity lbi path | buildOS == OSX = do (ranlib, _) <- requireProgram verbosity ranlibProgram (withPrograms lbi) rawSystemProgram verbosity ranlib [path] | otherwise = return ()
276
updateLibArchive verbosity lbi path | buildOS == OSX = do (ranlib, _) <- requireProgram verbosity ranlibProgram (withPrograms lbi) rawSystemProgram verbosity ranlib [path] | otherwise = return ()
207
false
true
1
12
48
97
46
51
null
null
olorin/nagios-perfdata
tests/Perfdata.hs
bsd-3-clause
main :: IO () main = hspec suite
32
main :: IO () main = hspec suite
32
main = hspec suite
18
false
true
0
6
7
19
9
10
null
null
fros1y/umbral
src/LevelBuilder.hs
bsd-3-clause
mkEntityFrom (coord,LitColumn) = mkLitColumn coord
50
mkEntityFrom (coord,LitColumn) = mkLitColumn coord
50
mkEntityFrom (coord,LitColumn) = mkLitColumn coord
50
false
false
0
6
4
18
9
9
null
null
olsner/ghc
compiler/prelude/TysWiredIn.hs
bsd-3-clause
unicodeStarKindTyCon = buildSynTyCon unicodeStarKindTyConName [] liftedTypeKind [] (tYPE ptrRepLiftedTy)
183
unicodeStarKindTyCon = buildSynTyCon unicodeStarKindTyConName [] liftedTypeKind [] (tYPE ptrRepLiftedTy)
183
unicodeStarKindTyCon = buildSynTyCon unicodeStarKindTyConName [] liftedTypeKind [] (tYPE ptrRepLiftedTy)
183
false
false
1
7
87
30
13
17
null
null
scslab/iterIO
Data/IterIO/Search.hs
bsd-3-clause
-- | Feeds input to an Iteratee until some boundary string is found. -- The boundary string is neither consumed nor passed through to the -- target 'Iter'. (Thus, if the input is at end-of-file after -- inumStopString returns, it means the boundary string was never -- encountered.) inumStopString :: (Monad m) => ...
1,406
inumStopString :: (Monad m) => S8.ByteString -> Inum L8.ByteString L8.ByteString m a inumStopString spat = mkInumM $ nextChunk L8.empty where lpat = L8.fromChunks [spat] plen = toEnum $ S8.length spat search = Search.breakOn spat nextChunk old = do (C...
1,122
inumStopString spat = mkInumM $ nextChunk L8.empty where lpat = L8.fromChunks [spat] plen = toEnum $ S8.length spat search = Search.breakOn spat nextChunk old = do (Chunk t eof) <- chunkI case search $ L8.append old t of (a, b) | not (L8.null b) -> ungetI b >> ifeed...
1,004
true
true
0
18
559
390
196
194
null
null
christiaanb/ghc
compiler/hsSyn/HsBinds.hs
bsd-3-clause
emptyValBindsOut = ValBindsOut [] []
41
emptyValBindsOut = ValBindsOut [] []
41
emptyValBindsOut = ValBindsOut [] []
41
false
false
1
6
9
19
7
12
null
null
mettekou/ghc
compiler/simplStg/UnariseStg.hs
bsd-3-clause
unariseFunArgBinder :: UnariseEnv -> Id -> UniqSM (UnariseEnv, [Id]) -- Result list of binders is never empty unariseFunArgBinder rho x = case repType (idType x) of UnaryRep _ -> return (rho, [x]) MultiRep [] -> return (extendRho rho x (MultiVal []), [voidArgId]) -- NB: do ...
658
unariseFunArgBinder :: UnariseEnv -> Id -> UniqSM (UnariseEnv, [Id]) unariseFunArgBinder rho x = case repType (idType x) of UnaryRep _ -> return (rho, [x]) MultiRep [] -> return (extendRho rho x (MultiVal []), [voidArgId]) -- NB: do not remove void binders MultiRep slot...
617
unariseFunArgBinder rho x = case repType (idType x) of UnaryRep _ -> return (rho, [x]) MultiRep [] -> return (extendRho rho x (MultiVal []), [voidArgId]) -- NB: do not remove void binders MultiRep slots -> do xs <- mkIds (mkFastString "us") (map slotTyToType slots...
548
true
true
13
13
148
181
91
90
null
null
limansky/wbxml
src/Wbxml/Tables.hs
bsd-3-clause
drmrel10AttrTable :: WbxmlAttrTable drmrel10AttrTable = [ (0x00, [ (0x05, "xmlns:o-ex", "") , (0x06, "xmlns:o-dd", "") , (0x07, "xmlns:ds", "") ]) ]
195
drmrel10AttrTable :: WbxmlAttrTable drmrel10AttrTable = [ (0x00, [ (0x05, "xmlns:o-ex", "") , (0x06, "xmlns:o-dd", "") , (0x07, "xmlns:ds", "") ]) ]
195
drmrel10AttrTable = [ (0x00, [ (0x05, "xmlns:o-ex", "") , (0x06, "xmlns:o-dd", "") , (0x07, "xmlns:ds", "") ]) ]
159
false
true
0
8
67
56
36
20
null
null
keithodulaigh/Hets
HasCASL/AsUtils.hs
gpl-2.0
-- | try to extract tuple arguments getTupleArgs :: Term -> Maybe [Term] getTupleArgs t = case t of TypedTerm trm qt _ _ -> case qt of InType -> Nothing _ -> getTupleArgs trm TupleTerm ts _ -> Just ts _ -> Nothing {- | decompose an 'ApplTerm' into an application of an operation and a list ...
335
getTupleArgs :: Term -> Maybe [Term] getTupleArgs t = case t of TypedTerm trm qt _ _ -> case qt of InType -> Nothing _ -> getTupleArgs trm TupleTerm ts _ -> Just ts _ -> Nothing {- | decompose an 'ApplTerm' into an application of an operation and a list of arguments -}
299
getTupleArgs t = case t of TypedTerm trm qt _ _ -> case qt of InType -> Nothing _ -> getTupleArgs trm TupleTerm ts _ -> Just ts _ -> Nothing {- | decompose an 'ApplTerm' into an application of an operation and a list of arguments -}
262
true
true
0
11
90
89
42
47
null
null
thomaslecointre/Distributed-Haskell
web/haskell/SortMaster.hs
mit
relevanceToJSON ([occurrence, season, episode]:l) = "\"" ++ (show $ -season) ++ "_" ++ (show $ -episode) ++ "\" : " ++ (show $ occurrence) ++ ", " ++ (relevanceToJSON l)
173
relevanceToJSON ([occurrence, season, episode]:l) = "\"" ++ (show $ -season) ++ "_" ++ (show $ -episode) ++ "\" : " ++ (show $ occurrence) ++ ", " ++ (relevanceToJSON l)
173
relevanceToJSON ([occurrence, season, episode]:l) = "\"" ++ (show $ -season) ++ "_" ++ (show $ -episode) ++ "\" : " ++ (show $ occurrence) ++ ", " ++ (relevanceToJSON l)
173
false
false
2
13
33
87
45
42
null
null
Philonous/prototyper
src/Graphics/UI/Gtk/WidgetBuilder.hs
mit
contAdd :: WidgetClass w => w -> MkGUI c () contAdd w = do add <- MkGUI $ view widgetAdder liftIO $ add (toWidget w)
124
contAdd :: WidgetClass w => w -> MkGUI c () contAdd w = do add <- MkGUI $ view widgetAdder liftIO $ add (toWidget w)
124
contAdd w = do add <- MkGUI $ view widgetAdder liftIO $ add (toWidget w)
80
false
true
0
10
32
62
28
34
null
null
5outh/Haskell-Graphics-Projects
Project3/Types.hs
mit
--Safe making viewport mkViewport :: Int -> Int -> Int -> Int -> Maybe Viewport mkViewport minx miny maxx maxy | minx < maxx && miny < maxy = Just (Viewport minx miny maxx maxy) | otherwise = Nothing
204
mkViewport :: Int -> Int -> Int -> Int -> Maybe Viewport mkViewport minx miny maxx maxy | minx < maxx && miny < maxy = Just (Viewport minx miny maxx maxy) | otherwise = Nothing
181
mkViewport minx miny maxx maxy | minx < maxx && miny < maxy = Just (Viewport minx miny maxx maxy) | otherwise = Nothing
124
true
true
1
10
43
81
39
42
null
null
hirschenberger/RollingDirectory
src/MainTest.hs
gpl-3.0
tests:: [TF.Test] tests = [testCase "Directory scanner" directoryScannerTest, testCase "Watcher" watcherTest, testCase "Size parser" sizeParserTest ]
175
tests:: [TF.Test] tests = [testCase "Directory scanner" directoryScannerTest, testCase "Watcher" watcherTest, testCase "Size parser" sizeParserTest ]
175
tests = [testCase "Directory scanner" directoryScannerTest, testCase "Watcher" watcherTest, testCase "Size parser" sizeParserTest ]
157
false
true
0
8
41
48
22
26
null
null
mcschroeder/ghc
compiler/simplCore/SimplUtils.hs
bsd-3-clause
contHoleType (TickIt _ k) = contHoleType k
62
contHoleType (TickIt _ k) = contHoleType k
62
contHoleType (TickIt _ k) = contHoleType k
62
false
false
0
6
26
21
9
12
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'ArrayI.listArray' a_listArray = ArrayI.listArray
53
a_listArray = ArrayI.listArray
30
a_listArray = ArrayI.listArray
30
true
false
0
5
4
9
5
4
null
null
tolysz/keter
Keter/LabelMap.hs
mit
cleanup m@(Static t) = case Map.null (Map.filter p t) of True -> EmptyLabelMap False -> m where p (Unassigned EmptyLabelMap) = False p _ = True
184
cleanup m@(Static t) = case Map.null (Map.filter p t) of True -> EmptyLabelMap False -> m where p (Unassigned EmptyLabelMap) = False p _ = True
184
cleanup m@(Static t) = case Map.null (Map.filter p t) of True -> EmptyLabelMap False -> m where p (Unassigned EmptyLabelMap) = False p _ = True
184
false
false
1
9
66
74
36
38
null
null
koengit/induction-examples
List.hs
mit
-------------------------------------------------------------------------------- count :: Eq a => a -> [a] -> Integer count x [] = 0
149
count :: Eq a => a -> [a] -> Integer count x [] = 0
67
count x [] = 0
30
true
true
0
8
32
37
19
18
null
null
facebookarchive/lex-pass
src/Lang/Php/Ast/Lex.hs
bsd-3-clause
tokCategory = "category"
24
tokCategory = "category"
24
tokCategory = "category"
24
false
false
0
4
2
6
3
3
null
null
mdorman/couch-simple
src/lib/Database/Couch/Explicit/Configuration.hs
mit
delValue :: (FromJSON a, MonadIO m) => DocId -- ^ Section name -> DocId -- ^ Key name -> Context -> m (Result a) delValue s k = standardRequest request where request = do setMethod "DELETE" itemPath s k -- * Internal combinators -- | Base path for all config req...
325
delValue :: (FromJSON a, MonadIO m) => DocId -- ^ Section name -> DocId -- ^ Key name -> Context -> m (Result a) delValue s k = standardRequest request where request = do setMethod "DELETE" itemPath s k -- * Internal combinators -- | Base path for all config req...
325
delValue s k = standardRequest request where request = do setMethod "DELETE" itemPath s k -- * Internal combinators -- | Base path for all config requests
176
false
true
0
11
108
81
40
41
null
null
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/GamePhysics/Unitals.hs
bsd-2-clause
velA = velParam "A" lBodyA
34
velA = velParam "A" lBodyA
34
velA = velParam "A" lBodyA
34
false
false
1
5
12
14
5
9
null
null
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
mpl-2.0
-- | The number of months remaining in the reservation. For example, 2 is the -- second to the last month before the capacity reservation expires. psTerm :: Lens' PriceSchedule (Maybe Integer) psTerm = lens _psTerm (\s a -> s { _psTerm = a })
242
psTerm :: Lens' PriceSchedule (Maybe Integer) psTerm = lens _psTerm (\s a -> s { _psTerm = a })
95
psTerm = lens _psTerm (\s a -> s { _psTerm = a })
49
true
true
2
9
44
56
26
30
null
null
cjlarose/advent-2016
src/CubicleMaze.hs
bsd-3-clause
openSpaceNeighbors :: Maze -> (Int, Int) -> [(Int, Int)] openSpaceNeighbors m xy = filter m $ neighbors xy
106
openSpaceNeighbors :: Maze -> (Int, Int) -> [(Int, Int)] openSpaceNeighbors m xy = filter m $ neighbors xy
106
openSpaceNeighbors m xy = filter m $ neighbors xy
49
false
true
0
8
17
49
26
23
null
null
GaloisInc/elf
src/Data/ElfEdit.hs
bsd-3-clause
------------------------------------------------------------------------ -- Utilities -- | Returns null-terminated string at given index in bytestring. lookupStringL :: Int64 -> L.ByteString -> L.ByteString lookupStringL o b = L.takeWhile (/= 0) $ L.drop o b
259
lookupStringL :: Int64 -> L.ByteString -> L.ByteString lookupStringL o b = L.takeWhile (/= 0) $ L.drop o b
106
lookupStringL o b = L.takeWhile (/= 0) $ L.drop o b
51
true
true
0
7
31
51
27
24
null
null
markus1189/xmonad-contrib-710
XMonad/Hooks/DebugEvents.hs
bsd-3-clause
dumpEnum' :: [String] -> Atom -> Decoder Bool dumpEnum' ss fmt = guardType fmt $ getInt 32 $ \r -> case () of () | r < 0 -> "undefined value " ++ show r | r >= genericLength ss -> "undefined va...
466
dumpEnum' :: [String] -> Atom -> Decoder Bool dumpEnum' ss fmt = guardType fmt $ getInt 32 $ \r -> case () of () | r < 0 -> "undefined value " ++ show r | r >= genericLength ss -> "undefined va...
466
dumpEnum' ss fmt = guardType fmt $ getInt 32 $ \r -> case () of () | r < 0 -> "undefined value " ++ show r | r >= genericLength ss -> "undefined value " ++ show r | othe...
413
false
true
0
14
233
118
55
63
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F12.hs
bsd-3-clause
ptr_glGetProgramivNV :: FunPtr (GLuint -> GLenum -> Ptr GLint -> IO ()) ptr_glGetProgramivNV = unsafePerformIO $ getCommand "glGetProgramivNV"
142
ptr_glGetProgramivNV :: FunPtr (GLuint -> GLenum -> Ptr GLint -> IO ()) ptr_glGetProgramivNV = unsafePerformIO $ getCommand "glGetProgramivNV"
142
ptr_glGetProgramivNV = unsafePerformIO $ getCommand "glGetProgramivNV"
70
false
true
0
11
17
44
21
23
null
null
debug-ito/wild-bind
wild-bind/src/WildBind/Binding.hs
bsd-3-clause
-- | Non-monadic version of 'bindsF'. -- -- @since 0.1.1.0 bindingF :: Ord i => [(i, Action (ReaderT fs IO) r)] -> Binding' bs fs i bindingF = statelessBinding . M.fromList
172
bindingF :: Ord i => [(i, Action (ReaderT fs IO) r)] -> Binding' bs fs i bindingF = statelessBinding . M.fromList
113
bindingF = statelessBinding . M.fromList
40
true
true
1
12
30
67
33
34
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT32.hs
gpl-3.0
fac :: Nat -> Nat fac Z = S Z
29
fac :: Nat -> Nat fac Z = S Z
29
fac Z = S Z
11
false
true
0
5
9
25
11
14
null
null