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
ksallberg/adventofcode
2015/src/Day19_2.hs
bsd-2-clause
trans "SiRnFYFAr" = "Ca"
24
trans "SiRnFYFAr" = "Ca"
24
trans "SiRnFYFAr" = "Ca"
24
false
false
0
5
3
9
4
5
null
null
pparkkin/eta
compiler/ETA/CodeGen/Monad.hs
bsd-3-clause
setClosureClass :: Text -> CodeGen () setClosureClass clName = do modClass <- getModClass let qClName = qualifiedName modClass clName modify $ \s -> s { cgClassName = qClName } -- NOTE: Changes made to class generation state are forgotten after -- the body is executed
281
setClosureClass :: Text -> CodeGen () setClosureClass clName = do modClass <- getModClass let qClName = qualifiedName modClass clName modify $ \s -> s { cgClassName = qClName } -- NOTE: Changes made to class generation state are forgotten after -- the body is executed
281
setClosureClass clName = do modClass <- getModClass let qClName = qualifiedName modClass clName modify $ \s -> s { cgClassName = qClName } -- NOTE: Changes made to class generation state are forgotten after -- the body is executed
243
false
true
0
11
57
70
34
36
null
null
locaweb/leela
src/warpdrive/src/Leela/Version.hs
apache-2.0
version :: String version = "5.11.0"
36
version :: String version = "5.11.0"
36
version = "5.11.0"
18
false
true
0
6
5
18
7
11
null
null
mrmonday/Idris-dev
src/Idris/ElabQuasiquote.hs
bsd-3-clause
extractUnquotes n (PElabError err) = fail "Can't quasiquote an error"
69
extractUnquotes n (PElabError err) = fail "Can't quasiquote an error"
69
extractUnquotes n (PElabError err) = fail "Can't quasiquote an error"
69
false
false
0
7
9
20
9
11
null
null
achirkin/BuildWrapper
test/Language/Haskell/BuildWrapper/UsagesTests.hs
bsd-3-clause
readJSONFile :: FilePath -> IO Value readJSONFile f= do ex<-doesFileExist f mv<-if ex then do bs<-BSS.readFile f return $ decode' $ BS.fromChunks [bs] else return Nothing return $ fromMaybe (object []) mv
311
readJSONFile :: FilePath -> IO Value readJSONFile f= do ex<-doesFileExist f mv<-if ex then do bs<-BSS.readFile f return $ decode' $ BS.fromChunks [bs] else return Nothing return $ fromMaybe (object []) mv
310
readJSONFile f= do ex<-doesFileExist f mv<-if ex then do bs<-BSS.readFile f return $ decode' $ BS.fromChunks [bs] else return Nothing return $ fromMaybe (object []) mv
273
false
true
0
13
138
100
46
54
null
null
Arguggi/heed
heed-backend/src/Heed/QueryTest.hs
bsd-3-clause
-- | Query 'DB.feedItemTable' checkFeedItemTable :: OT.Transaction [Int64] checkFeedItemTable = OT.query $ O.countRows (O.queryTable DB.feedItemTable)
150
checkFeedItemTable :: OT.Transaction [Int64] checkFeedItemTable = OT.query $ O.countRows (O.queryTable DB.feedItemTable)
120
checkFeedItemTable = OT.query $ O.countRows (O.queryTable DB.feedItemTable)
75
true
true
0
9
14
41
21
20
null
null
ghc-android/ghc
compiler/main/Packages.hs
bsd-3-clause
wired_in_pkgids :: [String] wired_in_pkgids = map packageKeyString wiredInPackageKeys
85
wired_in_pkgids :: [String] wired_in_pkgids = map packageKeyString wiredInPackageKeys
85
wired_in_pkgids = map packageKeyString wiredInPackageKeys
57
false
true
0
5
7
19
10
9
null
null
mzini/qlogic
Qlogic/Tseitin.hs
gpl-3.0
transformMinus fm@(And l) = maybeComputeNeg fm $ do cnfs <- mapM transformMinus l return $ toCnf [lit fm : [nlit e | e <- l]] +&+ fromCnfs cnfs
152
transformMinus fm@(And l) = maybeComputeNeg fm $ do cnfs <- mapM transformMinus l return $ toCnf [lit fm : [nlit e | e <- l]] +&+ fromCnfs cnfs
152
transformMinus fm@(And l) = maybeComputeNeg fm $ do cnfs <- mapM transformMinus l return $ toCnf [lit fm : [nlit e | e <- l]] +&+ fromCnfs cnfs
152
false
false
1
16
36
84
36
48
null
null
ownclo/jpeg-on-steroids
src/Graphics/JPG/Decoder.hs
bsd-3-clause
concatDUs :: [[DataUnit]] -> DataUnit concatDUs = joinVert . map joinHor where joinVert = foldl1' (<->) joinHor = foldl1' (<|>)
136
concatDUs :: [[DataUnit]] -> DataUnit concatDUs = joinVert . map joinHor where joinVert = foldl1' (<->) joinHor = foldl1' (<|>)
136
concatDUs = joinVert . map joinHor where joinVert = foldl1' (<->) joinHor = foldl1' (<|>)
98
false
true
0
7
28
50
28
22
null
null
mbg/monadic-state-hierarchies
Language/MSH/CodeGen/MiscInstances.hs
mit
genCastInstance :: StateDecl -> Q [Dec] genCastInstance s@(StateDecl { stateName = name, stateParams = vars, stateParent = mp }) = case mp of Nothing -> return [] (Just p) -> do body <- genDowncastClauses s let ct = ConT $ mkName "Cast" ty = appN (ConT $ mk...
475
genCastInstance :: StateDecl -> Q [Dec] genCastInstance s@(StateDecl { stateName = name, stateParams = vars, stateParent = mp }) = case mp of Nothing -> return [] (Just p) -> do body <- genDowncastClauses s let ct = ConT $ mkName "Cast" ty = appN (ConT $ mk...
475
genCastInstance s@(StateDecl { stateName = name, stateParams = vars, stateParent = mp }) = case mp of Nothing -> return [] (Just p) -> do body <- genDowncastClauses s let ct = ConT $ mkName "Cast" ty = appN (ConT $ mkName name) vars dwn = FunD (...
435
false
true
2
16
151
194
97
97
null
null
JackKiefer/herms
app/herms.hs
gpl-3.0
runWithOpts :: Command -> HermsReader IO () runWithOpts (List tags group nameOnly) = list tags group nameOnly
109
runWithOpts :: Command -> HermsReader IO () runWithOpts (List tags group nameOnly) = list tags group nameOnly
109
runWithOpts (List tags group nameOnly) = list tags group nameOnly
65
false
true
0
7
16
46
21
25
null
null
brendanhay/gogol
gogol-storage/gen/Network/Google/Resource/Storage/Buckets/Patch.hs
mpl-2.0
-- | The project to be billed for this request if the target bucket is -- requester-pays bucket. bpProvisionalUserProject :: Lens' BucketsPatch (Maybe Text) bpProvisionalUserProject = lens _bpProvisionalUserProject (\ s a -> s{_bpProvisionalUserProject = a})
266
bpProvisionalUserProject :: Lens' BucketsPatch (Maybe Text) bpProvisionalUserProject = lens _bpProvisionalUserProject (\ s a -> s{_bpProvisionalUserProject = a})
169
bpProvisionalUserProject = lens _bpProvisionalUserProject (\ s a -> s{_bpProvisionalUserProject = a})
109
true
true
0
9
42
49
26
23
null
null
isovector/iwmag
src/Main.hs
bsd-3-clause
initialize :: Sys () initialize = do void . newEntity $ defEntity { pos = Just $ V2 200 100 , gfx = Just . group $ drawPlayer (rgb 1 1 1) playerGeom , vel = Just $ V2 0 0 , xvel = Just $ V2 0 0 , gravity = Just () , collision = Just ...
663
initialize :: Sys () initialize = do void . newEntity $ defEntity { pos = Just $ V2 200 100 , gfx = Just . group $ drawPlayer (rgb 1 1 1) playerGeom , vel = Just $ V2 0 0 , xvel = Just $ V2 0 0 , gravity = Just () , collision = Just ...
663
initialize = do void . newEntity $ defEntity { pos = Just $ V2 200 100 , gfx = Just . group $ drawPlayer (rgb 1 1 1) playerGeom , vel = Just $ V2 0 0 , xvel = Just $ V2 0 0 , gravity = Just () , collision = Just $ playerGeom ,...
642
false
true
0
13
267
245
128
117
null
null
phischu/fragnix
builtins/base/System.IO.Error.hs
bsd-3-clause
isDoesNotExistErrorType _ = False
33
isDoesNotExistErrorType _ = False
33
isDoesNotExistErrorType _ = False
33
false
false
0
5
3
9
4
5
null
null
olorin/amazonka
amazonka-cloudhsm/gen/Network/AWS/CloudHSM/ListHSMs.hs
mpl-2.0
-- | Creates a value of 'ListHSMsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'lhsmrsNextToken' -- -- * 'lhsmrsHSMList' -- -- * 'lhsmrsResponseStatus' listHSMsResponse :: Int -- ^ 'lhsmrsResponseStatus' -> ListHSMs...
503
listHSMsResponse :: Int -- ^ 'lhsmrsResponseStatus' -> ListHSMsResponse listHSMsResponse pResponseStatus_ = ListHSMsResponse' { _lhsmrsNextToken = Nothing , _lhsmrsHSMList = Nothing , _lhsmrsResponseStatus = pResponseStatus_ }
254
listHSMsResponse pResponseStatus_ = ListHSMsResponse' { _lhsmrsNextToken = Nothing , _lhsmrsHSMList = Nothing , _lhsmrsResponseStatus = pResponseStatus_ }
174
true
true
0
7
94
57
34
23
null
null
PelleJuul/popl
src/TypeScope.hs
mit
isTypeRegistered :: Type -> TypeScope -> Bool isTypeRegistered t s = case filter ((==) t) $ typeScopeRegisteredTypes s of [] -> False _ -> True
154
isTypeRegistered :: Type -> TypeScope -> Bool isTypeRegistered t s = case filter ((==) t) $ typeScopeRegisteredTypes s of [] -> False _ -> True
154
isTypeRegistered t s = case filter ((==) t) $ typeScopeRegisteredTypes s of [] -> False _ -> True
108
false
true
0
9
35
66
31
35
null
null
phadej/denotational-frp
src/Reactive/Denotational/Events.hs
mit
toEvents :: [(Integer, a)] -> Events a toEvents = normalizeEvents . Events . map f where f (t, a) = (Time t, a)
113
toEvents :: [(Integer, a)] -> Events a toEvents = normalizeEvents . Events . map f where f (t, a) = (Time t, a)
113
toEvents = normalizeEvents . Events . map f where f (t, a) = (Time t, a)
74
false
true
1
8
24
72
35
37
null
null
alexander-at-github/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp ISraOp = _ILIT(35)
31
tagOf_PrimOp ISraOp = _ILIT(35)
31
tagOf_PrimOp ISraOp = _ILIT(35)
31
false
false
0
6
3
15
7
8
null
null
nushio3/Paraiso
attic/newexp/staging-rewrite.hs
bsd-3-clause
(%?) :: (Typeable a,Typeable b) => (b->b) -> (a->a) (%?) g = g %|||? id
71
(%?) :: (Typeable a,Typeable b) => (b->b) -> (a->a) (%?) g = g %|||? id
71
(%?) g = g %|||? id
19
false
true
0
8
14
55
31
24
null
null
ganeti/ganeti
src/Ganeti/HTools/Backend/Text.hs
bsd-2-clause
-- | Generate a spec data from a given ISpec object. serializeISpec :: ISpec -> String serializeISpec ispec = -- this needs to be kept in sync with the object definition let ISpec mem_s cpu_c disk_s disk_c nic_c su = ispec strings = [show mem_s, show cpu_c, show disk_s, show disk_c, show nic_c, ...
360
serializeISpec :: ISpec -> String serializeISpec ispec = -- this needs to be kept in sync with the object definition let ISpec mem_s cpu_c disk_s disk_c nic_c su = ispec strings = [show mem_s, show cpu_c, show disk_s, show disk_c, show nic_c, show su] in intercalate "," strings
307
serializeISpec ispec = -- this needs to be kept in sync with the object definition let ISpec mem_s cpu_c disk_s disk_c nic_c su = ispec strings = [show mem_s, show cpu_c, show disk_s, show disk_c, show nic_c, show su] in intercalate "," strings
273
true
true
0
10
87
91
45
46
null
null
eklavya/Idris-dev
src/Idris/Core/CaseTree.hs
bsd-3-clause
substSC n repl ImpossibleCase = ImpossibleCase
47
substSC n repl ImpossibleCase = ImpossibleCase
47
substSC n repl ImpossibleCase = ImpossibleCase
47
false
false
0
5
6
15
6
9
null
null
aartamonau/gossim
src/Gossim/Internal/Agent.hs
lgpl-3.0
getAgents :: Agent [AgentId] getAgents = Agent $ suspend (GetAgents return)
75
getAgents :: Agent [AgentId] getAgents = Agent $ suspend (GetAgents return)
75
getAgents = Agent $ suspend (GetAgents return)
46
false
true
0
8
10
30
15
15
null
null
rbermani/ib-api
src/IB/Client/Types.hs
gpl-3.0
defContractDetails :: ContractDetails defContractDetails = ContractDetails { ctd_summary = defContract , ctd_marketName = "" , ctd_minTick = 0.0 , ctd_orderTypes = "" , ctd_validExchanges = "" , ctd_priceMagnifier = 0 , ctd_underConId = int32max , ctd_longName = "" , ctd_contr...
988
defContractDetails :: ContractDetails defContractDetails = ContractDetails { ctd_summary = defContract , ctd_marketName = "" , ctd_minTick = 0.0 , ctd_orderTypes = "" , ctd_validExchanges = "" , ctd_priceMagnifier = 0 , ctd_underConId = int32max , ctd_longName = "" , ctd_contr...
988
defContractDetails = ContractDetails { ctd_summary = defContract , ctd_marketName = "" , ctd_minTick = 0.0 , ctd_orderTypes = "" , ctd_validExchanges = "" , ctd_priceMagnifier = 0 , ctd_underConId = int32max , ctd_longName = "" , ctd_contractMonth = "" , ctd_industry = "" ...
950
false
true
0
7
299
213
140
73
null
null
taojang/haskell-programming-book-exercise
src/ch22/Intermediate.hs
bsd-3-clause
tupled :: [Char] -> ([Char], [Char]) tupled = (,) <$> caps <*> rev
66
tupled :: [Char] -> ([Char], [Char]) tupled = (,) <$> caps <*> rev
66
tupled = (,) <$> caps <*> rev
29
false
true
0
7
12
41
24
17
null
null
brendanhay/gogol
gogol-apps-tasks/gen/Network/Google/Resource/Tasks/Tasks/Clear.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). tcUploadProtocol :: Lens' TasksClear (Maybe Text) tcUploadProtocol = lens _tcUploadProtocol (\ s a -> s{_tcUploadProtocol = a})
197
tcUploadProtocol :: Lens' TasksClear (Maybe Text) tcUploadProtocol = lens _tcUploadProtocol (\ s a -> s{_tcUploadProtocol = a})
135
tcUploadProtocol = lens _tcUploadProtocol (\ s a -> s{_tcUploadProtocol = a})
85
true
true
0
9
33
48
25
23
null
null
ducis/haAni
hs/common/Graphics/UI/GLUT/Menu.hs
gpl-2.0
getMenuTable :: IO MenuTable getMenuTable = readIORef theMenuTable
66
getMenuTable :: IO MenuTable getMenuTable = readIORef theMenuTable
66
getMenuTable = readIORef theMenuTable
37
false
true
0
5
7
17
8
9
null
null
slevin/experiements
haskell/snakehs/src/Main.hs
unlicense
updateFood' :: (Food, Randoms) -> (Food, Randoms) -- if no food then make it somewhere, and return rest of randoms updateFood' (Nothing, r1:r2:rs) = (Just (V2 r1 r2), rs)
170
updateFood' :: (Food, Randoms) -> (Food, Randoms) updateFood' (Nothing, r1:r2:rs) = (Just (V2 r1 r2), rs)
105
updateFood' (Nothing, r1:r2:rs) = (Just (V2 r1 r2), rs)
55
true
true
0
8
28
62
35
27
null
null
frantisekfarka/ghc-dsi
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprInstr (GITOF src dst) = pprInstr (GITOD src dst)
54
pprInstr (GITOF src dst) = pprInstr (GITOD src dst)
54
pprInstr (GITOF src dst) = pprInstr (GITOD src dst)
54
false
false
0
6
11
29
13
16
null
null
qpliu/esolang
blo/hs/Check.hs
gpl-3.0
astTypeFields AstTypeBit = []
29
astTypeFields AstTypeBit = []
29
astTypeFields AstTypeBit = []
29
false
false
1
6
3
15
5
10
null
null
choener/FormalGrammars
src/GrammarPP.hs
gpl-3.0
ptionHaskell = Haskell { inFile = "" , outFile = "" }
60
optionHaskell = Haskell { inFile = "" , outFile = "" }
60
optionHaskell = Haskell { inFile = "" , outFile = "" }
60
false
false
1
6
18
26
13
13
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 6786 = 5903
31
getValueFromProduct 6786 = 5903
31
getValueFromProduct 6786 = 5903
31
false
false
0
5
3
9
4
5
null
null
zachsully/hakaru
haskell/Language/Hakaru/Sample.hs
bsd-3-clause
evaluateVar :: Env -> Variable a -> Value a evaluateVar env v = case lookupVar v env of Nothing -> error "variable not found!" Just a -> a
151
evaluateVar :: Env -> Variable a -> Value a evaluateVar env v = case lookupVar v env of Nothing -> error "variable not found!" Just a -> a
151
evaluateVar env v = case lookupVar v env of Nothing -> error "variable not found!" Just a -> a
107
false
true
3
7
40
58
26
32
null
null
burz/gobot
reformat.hs
mit
parens = Token.parens lexer
31
parens = Token.parens lexer
31
parens = Token.parens lexer
31
false
false
0
6
7
11
5
6
null
null
d3zd3z/readsync
ReadSync.hs
bsd-3-clause
chopList :: Int -> [a] -> [[a]] chopList _ [] = []
50
chopList :: Int -> [a] -> [[a]] chopList _ [] = []
50
chopList _ [] = []
18
false
true
0
10
11
43
21
22
null
null
peterokagey/haskellOEIS
src/Helpers/Delahaye.hs
apache-2.0
delahayeList :: Integer -> a -> ExtensionCriteria a -> TableUpdate a -> [Integer] delahayeList k initialTable isValidExtension updateTable = thisList where thisList = k : recurse 1 initialTable where recurse n table = nextTerm : recurse (n+1) (updateTable nextTerm knownTerms table) where knownTerms = take n...
424
delahayeList :: Integer -> a -> ExtensionCriteria a -> TableUpdate a -> [Integer] delahayeList k initialTable isValidExtension updateTable = thisList where thisList = k : recurse 1 initialTable where recurse n table = nextTerm : recurse (n+1) (updateTable nextTerm knownTerms table) where knownTerms = take n...
424
delahayeList k initialTable isValidExtension updateTable = thisList where thisList = k : recurse 1 initialTable where recurse n table = nextTerm : recurse (n+1) (updateTable nextTerm knownTerms table) where knownTerms = take n thisList nextTerm = head $ filter (isValidExtension knownTerms table) [maxi...
342
false
true
0
15
77
144
72
72
null
null
quyse/flaw
flaw-font/Flaw/Graphics/Font/Script.hs
mit
fontScriptPahawhHmong :: FontScript fontScriptPahawhHmong = fontScript "Hmng"
96
fontScriptPahawhHmong :: FontScript fontScriptPahawhHmong = fontScript "Hmng"
96
fontScriptPahawhHmong = fontScript "Hmng"
51
false
true
0
5
25
14
7
7
null
null
bergmark/fclabels
src/Data/Label/Derive.hs
bsd-3-clause
------------------------------------------------------------------------------- -- Publicly exposed functions. -- | Derive labels including type signatures for all the record selectors for a -- collection of datatypes. The types will be polymorphic and can be used in an -- arbitrary context. mkLabels :: [Name] -> Q [...
406
mkLabels :: [Name] -> Q [Dec] mkLabels = liftM concat . mapM (mkLabelsWith defaultNaming True False False True)
111
mkLabels = liftM concat . mapM (mkLabelsWith defaultNaming True False False True)
81
true
true
0
8
56
53
29
24
null
null
supki/libstackexchange
src/Network/StackExchange/API.hs
mit
-- $relatedQuestions -- >>> checkLengthM $ askSE (relatedQuestions [394601] <> s <> k <> q) -- True -- | <https://api.stackexchange.com/docs/related-questions> relatedQuestions ∷ [Int] → Request a "relatedQuestions" [SE Question] relatedQuestions (T.intercalate ";" . map (toLazyText . decimal) → is) = path ("questio...
404
relatedQuestions ∷ [Int] → Request a "relatedQuestions" [SE Question] relatedQuestions (T.intercalate ";" . map (toLazyText . decimal) → is) = path ("questions/" <> is <> "/related") <> parse (attoparsec items ".questions/{ids}/related: ")
243
relatedQuestions (T.intercalate ";" . map (toLazyText . decimal) → is) = path ("questions/" <> is <> "/related") <> parse (attoparsec items ".questions/{ids}/related: ")
173
true
true
0
11
56
93
48
45
null
null
chemist/highlighter
src/Text/Highlighter/Lexers/ActionScript3.hs
bsd-3-clause
lexer :: Lexer lexer = Lexer { lName = "ActionScript 3" , lAliases = ["as3", "actionscript3"] , lExtensions = [".as"] , lMimetypes = ["application/x-actionscript", "text/x-actionscript", "text/actionscript"] , lStart = root' , lFlags = [multiline, dotall] }
285
lexer :: Lexer lexer = Lexer { lName = "ActionScript 3" , lAliases = ["as3", "actionscript3"] , lExtensions = [".as"] , lMimetypes = ["application/x-actionscript", "text/x-actionscript", "text/actionscript"] , lStart = root' , lFlags = [multiline, dotall] }
285
lexer = Lexer { lName = "ActionScript 3" , lAliases = ["as3", "actionscript3"] , lExtensions = [".as"] , lMimetypes = ["application/x-actionscript", "text/x-actionscript", "text/actionscript"] , lStart = root' , lFlags = [multiline, dotall] }
270
false
true
0
7
63
73
47
26
null
null
sw17ch/hsgcrypt
src/GCrypt/MPI/Basic.hs
lgpl-3.0
mpiSwap :: MPI -> MPI -> IO () mpiSwap = gcry_mpi_swap
54
mpiSwap :: MPI -> MPI -> IO () mpiSwap = gcry_mpi_swap
54
mpiSwap = gcry_mpi_swap
23
false
true
0
8
10
24
12
12
null
null
pharaun/alldice
src/Scheme/Primitives.hs
apache-2.0
equal badArgList = Left $ NumArgs 2 (map expand badArgList)
59
equal badArgList = Left $ NumArgs 2 (map expand badArgList)
59
equal badArgList = Left $ NumArgs 2 (map expand badArgList)
59
false
false
3
7
9
30
12
18
null
null
kkspeed/SICP-Practise
Interpreter/code/Eval.hs
lgpl-3.0
pair [DottedList _ _] = return $ Bool True
42
pair [DottedList _ _] = return $ Bool True
42
pair [DottedList _ _] = return $ Bool True
42
false
false
0
7
8
24
11
13
null
null
yobiya/jcc
json.hs
mit
sameBracketContentInBracket :: String -> Char -> Maybe String sameBracketContentInBracket ('\\':x:xs) c = (\y -> '\\':x:y) <$> sameBracketContentInBracket xs c
171
sameBracketContentInBracket :: String -> Char -> Maybe String sameBracketContentInBracket ('\\':x:xs) c = (\y -> '\\':x:y) <$> sameBracketContentInBracket xs c
171
sameBracketContentInBracket ('\\':x:xs) c = (\y -> '\\':x:y) <$> sameBracketContentInBracket xs c
109
false
true
0
9
30
63
32
31
null
null
leptonyu/mint
corn/src/Base/Validation.hs
bsd-3-clause
regxPassword = "[-.,*&%$#@!~<>/?0-9a-zA-Z]{8,64}"
49
regxPassword = "[-.,*&%$#@!~<>/?0-9a-zA-Z]{8,64}"
49
regxPassword = "[-.,*&%$#@!~<>/?0-9a-zA-Z]{8,64}"
49
false
false
0
4
2
6
3
3
null
null
bigs/7inch
src/Modules/Default.hs
mit
isEcho = isMsgMatchingRegex "^!echo .+"
39
isEcho = isMsgMatchingRegex "^!echo .+"
39
isEcho = isMsgMatchingRegex "^!echo .+"
39
false
false
1
5
4
12
4
8
null
null
opensuse-haskell/configuration
src/lib/UpdateChangesFile.hs
gpl-3.0
-- | Appropriate format parameter for 'formatTime' and 'parseTimeM'. changeLogDateFormat :: String changeLogDateFormat = "%a %b %e %H:%M:%S %Z %Y"
146
changeLogDateFormat :: String changeLogDateFormat = "%a %b %e %H:%M:%S %Z %Y"
77
changeLogDateFormat = "%a %b %e %H:%M:%S %Z %Y"
47
true
true
0
4
19
12
7
5
null
null
brendanhay/gogol
gogol-blogger/gen/Network/Google/Blogger/Types/Product.hs
mpl-2.0
-- | RFC 3339 date-time when this Post was published. posPublished :: Lens' Post' (Maybe Text) posPublished = lens _posPublished (\ s a -> s{_posPublished = a})
162
posPublished :: Lens' Post' (Maybe Text) posPublished = lens _posPublished (\ s a -> s{_posPublished = a})
108
posPublished = lens _posPublished (\ s a -> s{_posPublished = a})
67
true
true
2
9
28
55
25
30
null
null
HJvT/com
System/Win32/Com/Automation.hs
bsd-3-clause
propertyGet_2 name a1 a2 = propertyGet name [inVariant a1, inVariant a2] outVariant
90
propertyGet_2 name a1 a2 = propertyGet name [inVariant a1, inVariant a2] outVariant
90
propertyGet_2 name a1 a2 = propertyGet name [inVariant a1, inVariant a2] outVariant
90
false
false
0
7
18
32
15
17
null
null
mreid/papersite
src/exec/import.hs
mit
addSupps :: [String] -> BibTex.T -> BibTex.T addSupps suppFiles entry = case hasSupplementary suppFiles entry of (Just suppFile) -> addSupp suppFile entry Nothing -> entry
193
addSupps :: [String] -> BibTex.T -> BibTex.T addSupps suppFiles entry = case hasSupplementary suppFiles entry of (Just suppFile) -> addSupp suppFile entry Nothing -> entry
193
addSupps suppFiles entry = case hasSupplementary suppFiles entry of (Just suppFile) -> addSupp suppFile entry Nothing -> entry
148
false
true
0
9
46
63
31
32
null
null
ml9951/ghc
compiler/prelude/THNames.hs
bsd-3-clause
liftStringIdKey :: Unique liftStringIdKey = mkPreludeMiscIdUnique 230
73
liftStringIdKey :: Unique liftStringIdKey = mkPreludeMiscIdUnique 230
73
liftStringIdKey = mkPreludeMiscIdUnique 230
47
false
true
0
5
10
14
7
7
null
null
ml9951/ghc
compiler/main/HscMain.hs
bsd-3-clause
hscMaybeWriteIface :: DynFlags -> ModIface -> Bool -> ModSummary -> IO () hscMaybeWriteIface dflags iface changed summary = let force_write_interface = gopt Opt_WriteInterface dflags write_interface = case hscTarget dflags of HscNothing -> False H...
507
hscMaybeWriteIface :: DynFlags -> ModIface -> Bool -> ModSummary -> IO () hscMaybeWriteIface dflags iface changed summary = let force_write_interface = gopt Opt_WriteInterface dflags write_interface = case hscTarget dflags of HscNothing -> False H...
507
hscMaybeWriteIface dflags iface changed summary = let force_write_interface = gopt Opt_WriteInterface dflags write_interface = case hscTarget dflags of HscNothing -> False HscInterpreted -> False _ -> Tru...
433
false
true
0
11
181
110
53
57
null
null
iblumenfeld/saw-core
src/Verifier/SAW/PrettySExp.hs
bsd-3-clause
ppSharedTermSExpWith :: PPConfig -> SharedTerm s -> Doc ppSharedTermSExpWith cfg tm = doc where (_, doc) = ppN [] 0 Set.empty tm cutoffDepth = ppMinSharingDepth cfg maxDepth = ppMaxDepth cfg nodeInfos = collectNodeInfo tm Map.empty ppN :: [Doc] -> Int -> Visited -> SharedTerm ...
3,123
ppSharedTermSExpWith :: PPConfig -> SharedTerm s -> Doc ppSharedTermSExpWith cfg tm = doc where (_, doc) = ppN [] 0 Set.empty tm cutoffDepth = ppMinSharingDepth cfg maxDepth = ppMaxDepth cfg nodeInfos = collectNodeInfo tm Map.empty ppN :: [Doc] -> Int -> Visited -> SharedTerm ...
3,123
ppSharedTermSExpWith cfg tm = doc where (_, doc) = ppN [] 0 Set.empty tm cutoffDepth = ppMinSharingDepth cfg maxDepth = ppMaxDepth cfg nodeInfos = collectNodeInfo tm Map.empty ppN :: [Doc] -> Int -> Visited -> SharedTerm s -> (Visited, Doc) ppN lcls cdepth sofar (STApp i t...
3,067
false
true
87
12
1,303
1,126
585
541
null
null
avieth/postgresql-simple
src/Database/PostgreSQL/Simple/Transaction.hs
bsd-3-clause
releaseSavepoint :: Connection -> Savepoint -> IO () releaseSavepoint conn (Savepoint name) = execute_ conn ("RELEASE SAVEPOINT " <> name) >> return ()
155
releaseSavepoint :: Connection -> Savepoint -> IO () releaseSavepoint conn (Savepoint name) = execute_ conn ("RELEASE SAVEPOINT " <> name) >> return ()
155
releaseSavepoint conn (Savepoint name) = execute_ conn ("RELEASE SAVEPOINT " <> name) >> return ()
102
false
true
0
8
26
62
28
34
null
null
fpco/hlint
data/Default.hs
bsd-3-clause
error "Evaluate" = x - 0 ==> x
30
error "Evaluate" = x - 0 ==> x
30
error "Evaluate" = x - 0 ==> x
30
false
false
0
6
7
17
8
9
null
null
alexander-at-github/eta
compiler/ETA/StgSyn/StgLint.hs
bsd-3-clause
mkAltMsg1 :: Type -> MsgDoc mkAltMsg1 ty = ($$) (text "In a case expression, type of scrutinee does not match patterns") (ppr ty)
140
mkAltMsg1 :: Type -> MsgDoc mkAltMsg1 ty = ($$) (text "In a case expression, type of scrutinee does not match patterns") (ppr ty)
140
mkAltMsg1 ty = ($$) (text "In a case expression, type of scrutinee does not match patterns") (ppr ty)
112
false
true
0
7
33
44
20
24
null
null
rahulmutt/ghcvm
libraries/base/GHC/Enum.hs
bsd-3-clause
efdtInt :: Int# -> Int# -> Int# -> [Int] -- [x1,x2..y] efdtInt x1 x2 y | isTrue# (x2 >=# x1) = efdtIntUp x1 x2 y | otherwise = efdtIntDn x1 x2 y
156
efdtInt :: Int# -> Int# -> Int# -> [Int] efdtInt x1 x2 y | isTrue# (x2 >=# x1) = efdtIntUp x1 x2 y | otherwise = efdtIntDn x1 x2 y
142
efdtInt x1 x2 y | isTrue# (x2 >=# x1) = efdtIntUp x1 x2 y | otherwise = efdtIntDn x1 x2 y
101
true
true
1
10
43
71
35
36
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/LT_5.hs
mit
primCmpNat Zero (Succ y) = LT
29
primCmpNat Zero (Succ y) = LT
29
primCmpNat Zero (Succ y) = LT
29
false
false
0
6
5
19
8
11
null
null
DanielG/kvm-in-a-box
src/FlagTH.hs
agpl-3.0
flagCon (RecC (appendName "Flags" -> cn) vstys) = RecC cn (map flagTyVS vstys)
82
flagCon (RecC (appendName "Flags" -> cn) vstys) = RecC cn (map flagTyVS vstys)
82
flagCon (RecC (appendName "Flags" -> cn) vstys) = RecC cn (map flagTyVS vstys)
82
false
false
0
10
16
40
19
21
null
null
oldmanmike/ghc
compiler/basicTypes/Name.hs
bsd-3-clause
nameIsHomePackageImport :: Module -> Name -> Bool -- True if the Name is defined in module of this package -- /other than/ the this_mod nameIsHomePackageImport this_mod = \nm -> case nameModule_maybe nm of Nothing -> False Just nm_mod -> nm_mod /= this_mod && modu...
507
nameIsHomePackageImport :: Module -> Name -> Bool nameIsHomePackageImport this_mod = \nm -> case nameModule_maybe nm of Nothing -> False Just nm_mod -> nm_mod /= this_mod && moduleUnitId nm_mod == this_pkg where this_pkg = moduleUnitId this_mod -- | Returns...
421
nameIsHomePackageImport this_mod = \nm -> case nameModule_maybe nm of Nothing -> False Just nm_mod -> nm_mod /= this_mod && moduleUnitId nm_mod == this_pkg where this_pkg = moduleUnitId this_mod -- | Returns True if the Name comes from some other package: n...
371
true
true
1
11
134
88
41
47
null
null
christiaanb/ghc
compiler/main/DriverMkDepend.hs
bsd-3-clause
writeDependency :: FilePath -> Handle -> [FilePath] -> FilePath -> IO () -- (writeDependency r h [t1,t2] dep) writes to handle h the dependency -- t1 t2 : dep writeDependency root hdl targets dep = do let -- We need to avoid making deps on -- c:/foo/... -- on cygwin as make gets confuse...
641
writeDependency :: FilePath -> Handle -> [FilePath] -> FilePath -> IO () writeDependency root hdl targets dep = do let -- We need to avoid making deps on -- c:/foo/... -- on cygwin as make gets confused by the : -- Making relative deps avoids some instances of this. dep...
550
writeDependency root hdl targets dep = do let -- We need to avoid making deps on -- c:/foo/... -- on cygwin as make gets confused by the : -- Making relative deps avoids some instances of this. dep' = makeRelative root dep forOutput = escapeSpaces . reslash F...
477
true
true
0
14
180
116
59
57
null
null
DaMSL/K3
src/Language/K3/Core/Declaration.hs
apache-2.0
onDProperty :: (PropertyV -> a) -> PropertyD -> a onDProperty f (Left (n, lopt)) = f (n, lopt)
95
onDProperty :: (PropertyV -> a) -> PropertyD -> a onDProperty f (Left (n, lopt)) = f (n, lopt)
95
onDProperty f (Left (n, lopt)) = f (n, lopt)
45
false
true
0
7
18
57
29
28
null
null
nickspinale/euler
complete/005.hs
mit
sieve [] = []
13
sieve [] = []
13
sieve [] = []
13
false
false
1
6
3
17
6
11
null
null
dillonhuff/Folly
src/Folly/Formula.hs
bsd-3-clause
isConst (Constant _) = True
27
isConst (Constant _) = True
27
isConst (Constant _) = True
27
false
false
0
7
4
15
7
8
null
null
phischu/fragnix
tests/packages/scotty/Data.ByteString.hs
bsd-3-clause
-- | /O(1)/ Extract the head and tail of a ByteString, returning Nothing -- if it is empty. uncons :: ByteString -> Maybe (Word8, ByteString) uncons (PS x s l) | l <= 0 = Nothing | otherwise = Just (accursedUnutterablePerformIO $ withForeignPtr x $ \p -> p...
377
uncons :: ByteString -> Maybe (Word8, ByteString) uncons (PS x s l) | l <= 0 = Nothing | otherwise = Just (accursedUnutterablePerformIO $ withForeignPtr x $ \p -> peekByteOff p s, PS x (s+1) (l-1))
285
uncons (PS x s l) | l <= 0 = Nothing | otherwise = Just (accursedUnutterablePerformIO $ withForeignPtr x $ \p -> peekByteOff p s, PS x (s+1) (l-1))
235
true
true
1
9
141
107
55
52
null
null
5outh/wyas
Types.hs
gpl-2.0
showVal (Bool f) = "#f"
26
showVal (Bool f) = "#f"
26
showVal (Bool f) = "#f"
26
false
false
0
6
7
16
7
9
null
null
sordina/matasano-cryptopals
src/Set1/Challenge_6.hs
mit
crackXor :: BSL.ByteString -> Word8 crackXor s = fst $ minimumBy (comparing snd) $ map (id &&& fitxor s) setkc
110
crackXor :: BSL.ByteString -> Word8 crackXor s = fst $ minimumBy (comparing snd) $ map (id &&& fitxor s) setkc
110
crackXor s = fst $ minimumBy (comparing snd) $ map (id &&& fitxor s) setkc
74
false
true
2
9
19
58
26
32
null
null
tjakway/ghcjvm
compiler/typecheck/TcType.hs
bsd-3-clause
tcSplitPredFunTy_maybe _ = Nothing
36
tcSplitPredFunTy_maybe _ = Nothing
36
tcSplitPredFunTy_maybe _ = Nothing
36
false
false
0
5
5
9
4
5
null
null
hasufell/CGA
Test/Vector.hs
gpl-2.0
-- commutative getAngleProp6 :: Positive (V2 Double) -> Positive (V2 Double) -> Bool getAngleProp6 (Positive v1) (Positive v2) = getAngle v1 v2 == getAngle v2 v1
163
getAngleProp6 :: Positive (V2 Double) -> Positive (V2 Double) -> Bool getAngleProp6 (Positive v1) (Positive v2) = getAngle v1 v2 == getAngle v2 v1
148
getAngleProp6 (Positive v1) (Positive v2) = getAngle v1 v2 == getAngle v2 v1
78
true
true
0
9
27
69
33
36
null
null
vikraman/ghc
testsuite/tests/dependent/should_compile/dynamic-paper.hs
bsd-3-clause
fromDynInt _ = Nothing
30
fromDynInt _ = Nothing
30
fromDynInt _ = Nothing
30
false
false
0
5
11
9
4
5
null
null
dolio/irc-core
src/Client/Mask.hs
isc
translate ('\\' : '?' : xs) = '\\' : '?' : translate xs
57
translate ('\\' : '?' : xs) = '\\' : '?' : translate xs
57
translate ('\\' : '?' : xs) = '\\' : '?' : translate xs
57
false
false
0
8
14
31
15
16
null
null
tibbe/cassava
Data/Csv/Incremental.hs
bsd-3-clause
-- | Parse a CSV header in an incremental fashion. When done, the -- 'HeaderParser' returns any unconsumed input in the second field of -- the 'DoneH' constructor. decodeHeader :: HeaderParser B.ByteString decodeHeader = decodeHeaderWith defaultDecodeOptions
258
decodeHeader :: HeaderParser B.ByteString decodeHeader = decodeHeaderWith defaultDecodeOptions
94
decodeHeader = decodeHeaderWith defaultDecodeOptions
52
true
true
0
7
35
27
13
14
null
null
JacquesCarette/literate-scientific-software
code/drasil-gool/GOOL/Drasil/LanguageRenderer/CSharpRenderer.hs
bsd-2-clause
csInOut f s p ins [] [v] b = f s p (onStateValue variableType v) (map param $ v : ins) (on2StateValues (on2CodeValues appendToBody) b (returnState $ valueOf v))
166
csInOut f s p ins [] [v] b = f s p (onStateValue variableType v) (map param $ v : ins) (on2StateValues (on2CodeValues appendToBody) b (returnState $ valueOf v))
166
csInOut f s p ins [] [v] b = f s p (onStateValue variableType v) (map param $ v : ins) (on2StateValues (on2CodeValues appendToBody) b (returnState $ valueOf v))
166
false
false
0
10
34
87
42
45
null
null
micknelso/language-c
src/Language/CFamily/C/Syntax/Utils.hs
bsd-3-clause
-- XXX: This is should be generalized !!! -- Data.Generics sounds attractive, but we really need to control the evaluation order -- XXX: Expression statements (which are somewhat problematic anyway), aren't handled yet getSubStmts :: CStat -> [CStat] getSubStmts (CLabel _ s _ _) = [s]
295
getSubStmts :: CStat -> [CStat] getSubStmts (CLabel _ s _ _) = [s]
71
getSubStmts (CLabel _ s _ _) = [s]
39
true
true
0
7
55
39
22
17
null
null
ygale/yesod
yesod-core/Yesod/Core/Internal/Util.hs
mit
diffTimeScale :: DiffTime diffTimeScale = 1e12
46
diffTimeScale :: DiffTime diffTimeScale = 1e12
46
diffTimeScale = 1e12
20
false
true
0
6
5
18
7
11
null
null
shlevy/arithmoi
Math/NumberTheory/Powers/Cubes.hs
mit
integerCubeRoot n | n > 0 = integerCubeRoot' n | otherwise = let m = negate n r = if m < 0 then negate . fromInteger $ integerCubeRoot' (negate $ fromIntegral n) else negate (integerCubeRoot' m) in if r*r*r == n then r else (r-1)
295
integerCubeRoot n | n > 0 = integerCubeRoot' n | otherwise = let m = negate n r = if m < 0 then negate . fromInteger $ integerCubeRoot' (negate $ fromIntegral n) else negate (integerCubeRoot' m) in if r*r*r == n then r else (r-1)
295
integerCubeRoot n | n > 0 = integerCubeRoot' n | otherwise = let m = negate n r = if m < 0 then negate . fromInteger $ integerCubeRoot' (negate $ fromIntegral n) else negate (integerCubeRoot' m) in if r*r*r == n then r else (r-1)
295
false
false
0
15
111
119
58
61
null
null
reuleaux/pire
src/Pire/Parser/Telescope.hs
bsd-3-clause
eBinding_ :: (TokenParsing m -- , Fresh m , LookAheadParsing m , DeltaParsing m , MonadState PiState m ) => m (Telescope T.Text T.Text -> Telescope T.Text T.Text) teleBinding_ = annot_ <|> try imp_ <|> equal_ <?> "binding"
311
teleBinding_ :: (TokenParsing m -- , Fresh m , LookAheadParsing m , DeltaParsing m , MonadState PiState m ) => m (Telescope T.Text T.Text -> Telescope T.Text T.Text) teleBinding_ = annot_ <|> try imp_ <|> equal_ <?> "binding"
311
teleBinding_ = annot_ <|> try imp_ <|> equal_ <?> "binding"
65
false
true
6
10
126
90
46
44
null
null
karamellpelle/grid
source/Game/Values/Fancy.hs
gpl-3.0
valueSoundSceneNoiseTickMax :: Float valueSoundSceneNoiseTickMax = 20.0
71
valueSoundSceneNoiseTickMax :: Float valueSoundSceneNoiseTickMax = 20.0
71
valueSoundSceneNoiseTickMax = 20.0
34
false
true
0
4
5
11
6
5
null
null
JacquesCarette/literate-scientific-software
code/drasil-data/Data/Drasil/Concepts/Computation.hs
bsd-2-clause
dataType' = compoundNCPlPl datum type_
45
dataType' = compoundNCPlPl datum type_
45
dataType' = compoundNCPlPl datum type_
45
false
false
0
5
11
11
5
6
null
null
lambdageek/small
src/Language/Pho.hs
bsd-3-clause
showTerm' :: (Show (f Name), MonadName m) => Term' f Name -> m String showTerm' m = case m of VarM nm -> pure (show nm) LamM f -> showLam <$> scopeWithName (showTerm' . f) AppM m1 m2 -> showApp <$> showTerm' m1 <*> showTerm' m2 LetM m f -> showLet <$> showTerm' m <*> scopeWithName (showTerm' . f) wh...
506
showTerm' :: (Show (f Name), MonadName m) => Term' f Name -> m String showTerm' m = case m of VarM nm -> pure (show nm) LamM f -> showLam <$> scopeWithName (showTerm' . f) AppM m1 m2 -> showApp <$> showTerm' m1 <*> showTerm' m2 LetM m f -> showLet <$> showTerm' m <*> scopeWithName (showTerm' . f) wh...
506
showTerm' m = case m of VarM nm -> pure (show nm) LamM f -> showLam <$> scopeWithName (showTerm' . f) AppM m1 m2 -> showApp <$> showTerm' m1 <*> showTerm' m2 LetM m f -> showLet <$> showTerm' m <*> scopeWithName (showTerm' . f) where showLam (x,s) = "lam(" ++ show x ++ "." ++ s ++ ")" showAp...
436
false
true
16
20
137
222
114
108
null
null
phylake/avm3
vm/def.hs
mit
toBytes {- 0x0E -} (IfNotGreaterThan s24) = 1 + 3
49
toBytes {- 0x0E -} (IfNotGreaterThan s24) = 1 + 3
49
toBytes {- 0x0E -} (IfNotGreaterThan s24) = 1 + 3
49
false
false
0
6
9
21
10
11
null
null
ekr/tamarin-prover
lib/theory/src/Theory/Tools/IntruderRules.hs
gpl-3.0
-- | @constructionRules fSig@ returns the construction rules for the given -- function signature @fSig@ constructionRules :: NoEqFunSig -> [IntrRuleAC] constructionRules fSig = [ createRule s k | (s,(k,Public)) <- S.toList fSig ] where createRule s k = Rule (ConstrRule s) (map kuFact vars) [concfact] [concfac...
736
constructionRules :: NoEqFunSig -> [IntrRuleAC] constructionRules fSig = [ createRule s k | (s,(k,Public)) <- S.toList fSig ] where createRule s k = Rule (ConstrRule s) (map kuFact vars) [concfact] [concfact] where vars = take k [ varTerm (LVar "x" LSortMsg i) | i <- [0..] ] m = ...
632
constructionRules fSig = [ createRule s k | (s,(k,Public)) <- S.toList fSig ] where createRule s k = Rule (ConstrRule s) (map kuFact vars) [concfact] [concfact] where vars = take k [ varTerm (LVar "x" LSortMsg i) | i <- [0..] ] m = fAppNoEq (s,(k,Public)) vars concfac...
584
true
true
3
9
140
186
94
92
null
null
DaMSL/K3
src/Language/K3/Core/Constructor/Type.hs
apache-2.0
-- | Option type, based on the underlying type. option :: K3 Type -> K3 Type option t = Node (TOption :@: []) [t]
113
option :: K3 Type -> K3 Type option t = Node (TOption :@: []) [t]
65
option t = Node (TOption :@: []) [t]
36
true
true
0
7
23
47
22
25
null
null
k-bx/stack
src/Stack/Package.hs
bsd-3-clause
autogenDir :: Path Abs Dir -> Path Abs Dir autogenDir distDir = distDir </> $(mkRelDir "build/autogen")
103
autogenDir :: Path Abs Dir -> Path Abs Dir autogenDir distDir = distDir </> $(mkRelDir "build/autogen")
103
autogenDir distDir = distDir </> $(mkRelDir "build/autogen")
60
false
true
0
9
15
44
19
25
null
null
aisamanra/matterhorn
test/test_messages.hs
bsd-3-clause
lookupTests :: TestTree lookupTests = testGroup "Lookup" [ testProperty "getEarliestPostMsg" $ \(m1, m2, m3, m4, m5) -> let mlist = m1 : m2 : m3 : m4 : m5 : [] msgs = makeMsgs mlist postIds = fmap messagePostId ...
2,943
lookupTests :: TestTree lookupTests = testGroup "Lookup" [ testProperty "getEarliestPostMsg" $ \(m1, m2, m3, m4, m5) -> let mlist = m1 : m2 : m3 : m4 : m5 : [] msgs = makeMsgs mlist postIds = fmap messagePostId ...
2,943
lookupTests = testGroup "Lookup" [ testProperty "getEarliestPostMsg" $ \(m1, m2, m3, m4, m5) -> let mlist = m1 : m2 : m3 : m4 : m5 : [] msgs = makeMsgs mlist postIds = fmap messagePostId $ sortBy (compare...
2,919
false
true
0
24
1,379
887
456
431
null
null
nushio3/unittyped
src/UnitTyped/Type.hs
lgpl-2.1
(|>|) = wrapB (>)
17
(|>|) = wrapB (>)
17
(|>|) = wrapB (>)
17
false
false
1
5
3
17
8
9
null
null
jfranklin9000/urbit
pkg/hs/urbit-king/lib/Urbit/King/EventBrowser.hs
mit
showEffects :: Maybe FX -> RIO e () showEffects Nothing = putStrLn " [No collected effects]\n"
99
showEffects :: Maybe FX -> RIO e () showEffects Nothing = putStrLn " [No collected effects]\n"
99
showEffects Nothing = putStrLn " [No collected effects]\n"
63
false
true
0
7
20
31
14
17
null
null
urbanslug/ghc
libraries/bin-package-db/GHC/PackageDb.hs
bsd-3-clause
writePackageDb :: (Binary pkgs, BinaryStringRep a, BinaryStringRep b, BinaryStringRep c, BinaryStringRep d, BinaryStringRep e) => FilePath -> [InstalledPackageInfo a b c d e] -> pkgs -> IO () writePackageDb file ghcPkgs ghcPkgPart = writeFileAtomic file (runPut putDbForGhcPkg) ...
612
writePackageDb :: (Binary pkgs, BinaryStringRep a, BinaryStringRep b, BinaryStringRep c, BinaryStringRep d, BinaryStringRep e) => FilePath -> [InstalledPackageInfo a b c d e] -> pkgs -> IO () writePackageDb file ghcPkgs ghcPkgPart = writeFileAtomic file (runPut putDbForGhcPkg) ...
612
writePackageDb file ghcPkgs ghcPkgPart = writeFileAtomic file (runPut putDbForGhcPkg) where putDbForGhcPkg = do putHeader put ghcPartLen putLazyByteString ghcPart put ghcPkgPart where ghcPartLen :: Word32 ghcPartLen = fromIntegr...
383
false
true
2
10
200
162
77
85
null
null
ilyasergey/GHC-XAppFix
compiler/main/DynFlags.hs
bsd-3-clause
pgm_L :: DynFlags -> String pgm_L dflags = sPgm_L (settings dflags)
83
pgm_L :: DynFlags -> String pgm_L dflags = sPgm_L (settings dflags)
83
pgm_L dflags = sPgm_L (settings dflags)
39
false
true
0
7
26
27
13
14
null
null
bitemyapp/hoq
src/Semantics.hs
gpl-2.0
isInj Path{} = True
19
isInj Path{} = True
19
isInj Path{} = True
19
false
false
1
5
3
16
6
10
null
null
shlevy/ghc
compiler/basicTypes/PatSyn.hs
bsd-3-clause
-- | Print the type of a pattern synonym. The foralls are printed explicitly pprPatSynType :: PatSyn -> SDoc pprPatSynType (MkPatSyn { psUnivTyVars = univ_tvs, psReqTheta = req_theta , psExTyVars = ex_tvs, psProvTheta = prov_theta , psArgs = orig_args, psResu...
703
pprPatSynType :: PatSyn -> SDoc pprPatSynType (MkPatSyn { psUnivTyVars = univ_tvs, psReqTheta = req_theta , psExTyVars = ex_tvs, psProvTheta = prov_theta , psArgs = orig_args, psResultTy = orig_res_ty }) = sep [ pprForAll univ_tvs , pprThetaArrowTy ...
626
pprPatSynType (MkPatSyn { psUnivTyVars = univ_tvs, psReqTheta = req_theta , psExTyVars = ex_tvs, psProvTheta = prov_theta , psArgs = orig_args, psResultTy = orig_res_ty }) = sep [ pprForAll univ_tvs , pprThetaArrowTy req_theta , ppWhen inser...
594
true
true
0
9
213
154
80
74
null
null
codingSteve/fp101x
20151019/ex_02.hs
cc0-1.0
-- drop returns a list so the types are wrong last1 :: [a] -> [b] -> [b] last1 xs = drop (length(xs)-1)
103
last1 :: [a] -> [b] -> [b] last1 xs = drop (length(xs)-1)
57
last1 xs = drop (length(xs)-1)
30
true
true
0
9
21
48
26
22
null
null
bamboo/sneerkell
src/Sneer/Protocol.hs
lgpl-3.0
parseAccept :: T.KeyValuePairs -> Maybe FromServer parseAccept kvs = Accept <$> tryGetFromTransit sendKeyword kvs
113
parseAccept :: T.KeyValuePairs -> Maybe FromServer parseAccept kvs = Accept <$> tryGetFromTransit sendKeyword kvs
113
parseAccept kvs = Accept <$> tryGetFromTransit sendKeyword kvs
62
false
true
0
6
13
32
15
17
null
null
xJom/mbunit-v3
tools/Thrift/src/lib/hs/src/Thrift/Protocol.hs
apache-2.0
skip p T_BYTE = readByte p >> return ()
39
skip p T_BYTE = readByte p >> return ()
39
skip p T_BYTE = readByte p >> return ()
39
false
false
0
7
8
23
10
13
null
null
haskell-streaming/streaming
benchmarks/old/Stream/Interop.hs
bsd-3-clause
toStreamM :: Monad m => Folding_ (Of a) m r -> m ([a],r) toStreamM phi = phi construct join (\r -> return ([], r)) where construct (a :> mls) = do (as,r) <- mls return (a : as, r)
209
toStreamM :: Monad m => Folding_ (Of a) m r -> m ([a],r) toStreamM phi = phi construct join (\r -> return ([], r)) where construct (a :> mls) = do (as,r) <- mls return (a : as, r)
209
toStreamM phi = phi construct join (\r -> return ([], r)) where construct (a :> mls) = do (as,r) <- mls return (a : as, r)
152
false
true
0
10
68
129
64
65
null
null
higgsd/euler
hs/61.hs
bsd-2-clause
main = putStrLn $ show $ sumCycle kk
36
main = putStrLn $ show $ sumCycle kk
36
main = putStrLn $ show $ sumCycle kk
36
false
false
0
6
7
17
8
9
null
null
UU-ComputerScience/uulib
src/UU/PPrint.hs
bsd-3-clause
punctuate p [d] = [d]
25
punctuate p [d] = [d]
25
punctuate p [d] = [d]
25
false
false
0
6
8
17
9
8
null
null
coolhacks/scripts-hacks
examples/shellcheck-master/ShellCheck/ASTLib.hs
mit
-- Get all flags in a BSD way, up until first non-flag argument getLeadingFlags = getFlagsUntil (not . ("-" `isPrefixOf`))
122
getLeadingFlags = getFlagsUntil (not . ("-" `isPrefixOf`))
58
getLeadingFlags = getFlagsUntil (not . ("-" `isPrefixOf`))
58
true
false
0
8
19
23
14
9
null
null
MetaMemoryT/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
showCImp ppo (PWith _ n l ws r pn w) = prettyImp ppo l <+> showWs ws <+> text "with" <+> prettyImp ppo r <+> braces (text (show w)) where showWs [] = empty showWs (x : xs) = text "|" <+> prettyImp ppo x <+> showWs xs
244
showCImp ppo (PWith _ n l ws r pn w) = prettyImp ppo l <+> showWs ws <+> text "with" <+> prettyImp ppo r <+> braces (text (show w)) where showWs [] = empty showWs (x : xs) = text "|" <+> prettyImp ppo x <+> showWs xs
244
showCImp ppo (PWith _ n l ws r pn w) = prettyImp ppo l <+> showWs ws <+> text "with" <+> prettyImp ppo r <+> braces (text (show w)) where showWs [] = empty showWs (x : xs) = text "|" <+> prettyImp ppo x <+> showWs xs
244
false
false
0
10
75
123
57
66
null
null
10sr/scheme_hs
main.hs
mit
primitives :: [(String, [LispVal] -> ThrowsError LispVal)] primitives = [("+", numericBinop (+)), ("-", numericBinop (-)), ("*", numericBinop (*)), ("/", numericBinop div), ("mod", numericBinop mod), ("quotient", numericBinop quot), ("r...
349
primitives :: [(String, [LispVal] -> ThrowsError LispVal)] primitives = [("+", numericBinop (+)), ("-", numericBinop (-)), ("*", numericBinop (*)), ("/", numericBinop div), ("mod", numericBinop mod), ("quotient", numericBinop quot), ("r...
349
primitives = [("+", numericBinop (+)), ("-", numericBinop (-)), ("*", numericBinop (*)), ("/", numericBinop div), ("mod", numericBinop mod), ("quotient", numericBinop quot), ("remainder", numericBinop rem)]
290
false
true
0
10
113
127
73
54
null
null
Softsapiens/mini-complete-servant
src/Models.hs
mit
usersToUser :: Users -> User usersToUser Users{..} = User { ident = usersIdent , firstName = usersFirstName , lastName = usersLastName , email = usersEmail }
244
usersToUser :: Users -> User usersToUser Users{..} = User { ident = usersIdent , firstName = usersFirstName , lastName = usersLastName , email = usersEmail }
244
usersToUser Users{..} = User { ident = usersIdent , firstName = usersFirstName , lastName = usersLastName , email = usersEmail }
215
false
true
13
5
112
58
30
28
null
null