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
abhin4v/hastron
src/Hastron/Game/Engine.hs
mit
leftTurn Right = Up
19
leftTurn Right = Up
19
leftTurn Right = Up
19
false
false
0
5
3
9
4
5
null
null
emc2/compiler-misc
src/Data/Position/DWARFPosition.hs
bsd-3-clause
basicPosition Def { defPos = Point { pointPos = pos } } = BasicPosition.Point { BasicPosition.pointPos = pos }
112
basicPosition Def { defPos = Point { pointPos = pos } } = BasicPosition.Point { BasicPosition.pointPos = pos }
112
basicPosition Def { defPos = Point { pointPos = pos } } = BasicPosition.Point { BasicPosition.pointPos = pos }
112
false
false
0
11
20
39
21
18
null
null
nightscape/platform
shared/tests/Unison/Test/Doc.hs
mit
main = defaultMain tests
24
main = defaultMain tests
24
main = defaultMain tests
24
false
false
0
5
3
9
4
5
null
null
gridaphobe/cabal
cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
usagePackages :: String -> String -> String usagePackages name pname = "Usage: " ++ pname ++ " " ++ name ++ " [PACKAGES]\n"
128
usagePackages :: String -> String -> String usagePackages name pname = "Usage: " ++ pname ++ " " ++ name ++ " [PACKAGES]\n"
128
usagePackages name pname = "Usage: " ++ pname ++ " " ++ name ++ " [PACKAGES]\n"
84
false
true
4
8
27
48
21
27
null
null
mslovy/barrelfish
hake/RuleDefs.hs
mit
libBuildArch af tf args arch = let -- Fiddle the options opts = libGetOptionsForArch arch args csrcs = Args.cFiles args cxxsrcs = Args.cxxFiles args in Rules ( flounderRules opts args csrcs ++ [ mackerelDependencies opts m csrcs | m <- Args.mackerelDevic...
631
libBuildArch af tf args arch = let -- Fiddle the options opts = libGetOptionsForArch arch args csrcs = Args.cFiles args cxxsrcs = Args.cxxFiles args in Rules ( flounderRules opts args csrcs ++ [ mackerelDependencies opts m csrcs | m <- Args.mackerelDevic...
631
libBuildArch af tf args arch = let -- Fiddle the options opts = libGetOptionsForArch arch args csrcs = Args.cFiles args cxxsrcs = Args.cxxFiles args in Rules ( flounderRules opts args csrcs ++ [ mackerelDependencies opts m csrcs | m <- Args.mackerelDevic...
631
false
false
0
15
233
162
79
83
null
null
snowleopard/shaking-up-ghc
src/Packages.hs
bsd-3-clause
-- | Construct a top-level program package, e.g. @ghc@. prg :: PackageName -> Package prg name = program name name
114
prg :: PackageName -> Package prg name = program name name
58
prg name = program name name
28
true
true
0
7
19
31
13
18
null
null
ezyang/ghc
hadrian/src/Settings.hs
bsd-3-clause
getLibraryWays :: Ways getLibraryWays = expr flavour >>= libraryWays
68
getLibraryWays :: Ways getLibraryWays = expr flavour >>= libraryWays
68
getLibraryWays = expr flavour >>= libraryWays
45
false
true
0
6
8
18
9
9
null
null
Lemmih/haskell-tc
src/Language/Haskell/TypeCheck/Monad.hs
mit
zonkTcVar (TcUniqueVar n) = T.TyVar (show n)
44
zonkTcVar (TcUniqueVar n) = T.TyVar (show n)
44
zonkTcVar (TcUniqueVar n) = T.TyVar (show n)
44
false
false
0
7
6
26
12
14
null
null
CalumMcCall/hokey
src/Hokey/Hand.hs
gpl-3.0
hasFullHouse cards | pair /= [] && trips /= [] = trips ++ pair | otherwise = [] where pair = hasPairInner (filter (`notElem` trips) cards) trips = hasTripsInner cards
213
hasFullHouse cards | pair /= [] && trips /= [] = trips ++ pair | otherwise = [] where pair = hasPairInner (filter (`notElem` trips) cards) trips = hasTripsInner cards
213
hasFullHouse cards | pair /= [] && trips /= [] = trips ++ pair | otherwise = [] where pair = hasPairInner (filter (`notElem` trips) cards) trips = hasTripsInner cards
213
false
false
0
11
76
78
39
39
null
null
ruslantalpa/postgrest
src/PostgREST/OpenAPI.hs
mit
escapeHostName "!6" = "0.0.0.0"
31
escapeHostName "!6" = "0.0.0.0"
31
escapeHostName "!6" = "0.0.0.0"
31
false
false
0
5
3
9
4
5
null
null
yuvallanger/threepenny-gui
samples/UseWords.hs
bsd-3-clause
templatevars = map (second Right . snd) vars ++ map (second Left) exts
70
templatevars = map (second Right . snd) vars ++ map (second Left) exts
70
templatevars = map (second Right . snd) vars ++ map (second Left) exts
70
false
false
1
9
12
40
17
23
null
null
joelwilliamson/modern-compilers-exercises
chap_01/straight-line-interpeter.hs
gpl-3.0
maxArgs (PrintStm es) = max (length es) (maximum $ map maxArgsE es)
67
maxArgs (PrintStm es) = max (length es) (maximum $ map maxArgsE es)
67
maxArgs (PrintStm es) = max (length es) (maximum $ map maxArgsE es)
67
false
false
0
8
11
40
18
22
null
null
slyrz/phantom
src/Phantom/Random.hs
mit
initRandom :: String -> State initRandom key = initRC4 . concat . drop (repeats defaultConfig) . hash $ BC.pack key
117
initRandom :: String -> State initRandom key = initRC4 . concat . drop (repeats defaultConfig) . hash $ BC.pack key
117
initRandom key = initRC4 . concat . drop (repeats defaultConfig) . hash $ BC.pack key
87
false
true
0
10
21
48
23
25
null
null
fffej/HS-Poker
SimpleEvaluator.hs
bsd-3-clause
maxOnePair :: Int maxOnePair = score (OnePair Ace Ace Ace Ace)
62
maxOnePair :: Int maxOnePair = score (OnePair Ace Ace Ace Ace)
62
maxOnePair = score (OnePair Ace Ace Ace Ace)
44
false
true
0
7
10
26
13
13
null
null
shlevy/ghc
compiler/types/Type.hs
bsd-3-clause
splitForAllTyVarBndrs :: Type -> ([TyVarBinder], Type) splitForAllTyVarBndrs ty = split ty ty [] where split orig_ty ty bs | Just ty' <- coreView ty = split orig_ty ty' bs split _ (ForAllTy b res) bs = split res res (b:bs) split orig_ty _ bs = (reverse bs, orig_ty) -- | Checks whet...
369
splitForAllTyVarBndrs :: Type -> ([TyVarBinder], Type) splitForAllTyVarBndrs ty = split ty ty [] where split orig_ty ty bs | Just ty' <- coreView ty = split orig_ty ty' bs split _ (ForAllTy b res) bs = split res res (b:bs) split orig_ty _ bs = (reverse bs, orig_ty) -- | Checks whet...
369
splitForAllTyVarBndrs ty = split ty ty [] where split orig_ty ty bs | Just ty' <- coreView ty = split orig_ty ty' bs split _ (ForAllTy b res) bs = split res res (b:bs) split orig_ty _ bs = (reverse bs, orig_ty) -- | Checks whether this is a proper forall (with a named binder)
314
false
true
3
9
98
137
64
73
null
null
jmct/IterativeCompiler
frontend/Compiler.hs
mit
showInstruction Eval = IStr "Eval"
44
showInstruction Eval = IStr "Eval"
44
showInstruction Eval = IStr "Eval"
44
false
false
0
5
14
13
5
8
null
null
mcschroeder/ghc
compiler/prelude/THNames.hs
bsd-3-clause
stringLName = libFun (fsLit "stringL") stringLIdKey
59
stringLName = libFun (fsLit "stringL") stringLIdKey
59
stringLName = libFun (fsLit "stringL") stringLIdKey
59
false
false
0
7
13
17
8
9
null
null
plancalculus/sloth
Test/Sloth/Generics.hs
bsd-3-clause
applyWithIndex :: (Int -> a -> b) -> State Int a -> State Int b applyWithIndex k cf = do f <- cf n <- get put (n+1) return (k n f) -- | Build a term from a list of subterms and a generic function for -- these subterms
234
applyWithIndex :: (Int -> a -> b) -> State Int a -> State Int b applyWithIndex k cf = do f <- cf n <- get put (n+1) return (k n f) -- | Build a term from a list of subterms and a generic function for -- these subterms
234
applyWithIndex k cf = do f <- cf n <- get put (n+1) return (k n f) -- | Build a term from a list of subterms and a generic function for -- these subterms
170
false
true
0
10
66
93
43
50
null
null
mzero/PlainChanges2
src/MidiUtil.hs
bsd-3-clause
-- | Return the channel of an event, if any. messageChannel :: M.Message -> Maybe M.Channel messageChannel m = if M.isChannelMessage m then Just (M.channel m) else Nothing
171
messageChannel :: M.Message -> Maybe M.Channel messageChannel m = if M.isChannelMessage m then Just (M.channel m) else Nothing
126
messageChannel m = if M.isChannelMessage m then Just (M.channel m) else Nothing
79
true
true
0
9
27
55
26
29
null
null
karamellpelle/grid
source/OpenGL/ES2/Values.hs
gpl-3.0
gl_INVERT :: GLenum gl_INVERT = 0x150A
60
gl_INVERT :: GLenum gl_INVERT = 0x150A
60
gl_INVERT = 0x150A
40
false
true
0
4
27
11
6
5
null
null
psandahl/big-engine
test/ModelTests.hs
mit
-- | Test assembly of a simple model to vert_P_Ns. assembleVertPN :: Assertion assembleVertPN = Just ([ Vert_P_N.Vertex { Vert_P_N.position = V3 1 1 0 , Vert_P_N.normal = V3 0 0 1 } , Vert_P_N.Vertex { Vert_P_N.position = V3 (-1) 1 0 ...
773
assembleVertPN :: Assertion assembleVertPN = Just ([ Vert_P_N.Vertex { Vert_P_N.position = V3 1 1 0 , Vert_P_N.normal = V3 0 0 1 } , Vert_P_N.Vertex { Vert_P_N.position = V3 (-1) 1 0 , Vert_P_N.normal = V3 0 0 1 ...
722
assembleVertPN = Just ([ Vert_P_N.Vertex { Vert_P_N.position = V3 1 1 0 , Vert_P_N.normal = V3 0 0 1 } , Vert_P_N.Vertex { Vert_P_N.position = V3 (-1) 1 0 , Vert_P_N.normal = V3 0 0 1 } ...
694
true
true
0
13
369
216
120
96
null
null
mgsloan/ghcjs-typescript
ghcjs-typescript-convert/GHCJS/TypeScript/Convert/Collect.hs
mit
collectAmbientDeclaration mn (AmbientClassDeclaration cp name typarams tyrefs1 tyrefs2 body) = --TODO: what are tyrefs1 / tyrefs2? [collectInterface mn $ Interface cp name typarams tyrefs1 (TypeBody (map (\(cp, cbe) -> (cp, classBodyElementToTypeMember cbe)) body))]
274
collectAmbientDeclaration mn (AmbientClassDeclaration cp name typarams tyrefs1 tyrefs2 body) = --TODO: what are tyrefs1 / tyrefs2? [collectInterface mn $ Interface cp name typarams tyrefs1 (TypeBody (map (\(cp, cbe) -> (cp, classBodyElementToTypeMember cbe)) body))]
274
collectAmbientDeclaration mn (AmbientClassDeclaration cp name typarams tyrefs1 tyrefs2 body) = --TODO: what are tyrefs1 / tyrefs2? [collectInterface mn $ Interface cp name typarams tyrefs1 (TypeBody (map (\(cp, cbe) -> (cp, classBodyElementToTypeMember cbe)) body))]
274
false
false
0
15
40
86
45
41
null
null
fffej/Keyword-Search
Search.hs
bsd-2-clause
getKeyValues :: Redis -> T.Text -> IO [T.Text] getKeyValues r key = do x <- zrevrange r key (0,99999999) True >>= fromRMultiBulk' let v = map head (splitEvery 2 x) :: [T.Text] mapM (\z -> get r z >>= fromRBulk') v
222
getKeyValues :: Redis -> T.Text -> IO [T.Text] getKeyValues r key = do x <- zrevrange r key (0,99999999) True >>= fromRMultiBulk' let v = map head (splitEvery 2 x) :: [T.Text] mapM (\z -> get r z >>= fromRBulk') v
222
getKeyValues r key = do x <- zrevrange r key (0,99999999) True >>= fromRMultiBulk' let v = map head (splitEvery 2 x) :: [T.Text] mapM (\z -> get r z >>= fromRBulk') v
175
false
true
0
12
49
115
57
58
null
null
fhsjaagshs/niagra
src/Data/Niagra/Selector/Tags.hs
mit
sub :: Selector sub = "sub"
27
sub :: Selector sub = "sub"
27
sub = "sub"
11
false
true
0
4
5
11
6
5
null
null
jaccokrijnen/leksah
src/IDE/Utils/GUIUtils.hs
gpl-2.0
getDarkState :: PaneMonad alpha => alpha Bool getDarkState = do ui <- getUIAction "ui/menubar/_View/_Use Dark Interface" castToToggleAction liftIO $toggleActionGetActive ui
180
getDarkState :: PaneMonad alpha => alpha Bool getDarkState = do ui <- getUIAction "ui/menubar/_View/_Use Dark Interface" castToToggleAction liftIO $toggleActionGetActive ui
180
getDarkState = do ui <- getUIAction "ui/menubar/_View/_Use Dark Interface" castToToggleAction liftIO $toggleActionGetActive ui
134
false
true
0
8
27
42
18
24
null
null
vTurbine/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
-- | Returns free variables of a bag of constraints as a deterministically -- odered list. See Note [Deterministic FV] in FV. tyCoVarsOfCtsList :: Cts -> [TcTyCoVar] tyCoVarsOfCtsList = fvVarList . tyCoFVsOfCts
210
tyCoVarsOfCtsList :: Cts -> [TcTyCoVar] tyCoVarsOfCtsList = fvVarList . tyCoFVsOfCts
84
tyCoVarsOfCtsList = fvVarList . tyCoFVsOfCts
44
true
true
0
6
31
24
14
10
null
null
ganeti-github-testing/ganeti-test-1
src/Ganeti/Constants.hs
bsd-2-clause
-- * SSCONF keys ssClusterName :: String ssClusterName = "cluster_name"
72
ssClusterName :: String ssClusterName = "cluster_name"
54
ssClusterName = "cluster_name"
30
true
true
0
4
10
12
7
5
null
null
cyrozap/OpenOCD
contrib/rpc_examples/ocdrpc.hs
gpl-2.0
ocdReply = manyTill anyChar (char '\x1a')
41
ocdReply = manyTill anyChar (char '\x1a')
41
ocdReply = manyTill anyChar (char '\x1a')
41
false
false
0
7
5
17
8
9
null
null
CindyLinz/Haskell-HVG
demo.hs
bsd-3-clause
sepSeries :: [Double] sepSeries = 0 : inners where inners = 0.5 : mix halfs (map (+ 0.5) halfs) halfs = map (/ 2) inners mix (a:as) (b:bs) = a : b : mix as bs
164
sepSeries :: [Double] sepSeries = 0 : inners where inners = 0.5 : mix halfs (map (+ 0.5) halfs) halfs = map (/ 2) inners mix (a:as) (b:bs) = a : b : mix as bs
164
sepSeries = 0 : inners where inners = 0.5 : mix halfs (map (+ 0.5) halfs) halfs = map (/ 2) inners mix (a:as) (b:bs) = a : b : mix as bs
142
false
true
3
9
41
110
53
57
null
null
plclub/lngen
src/CoqLNOutputDefinitions.hs
mit
processClose :: ASTAnalysis -> [NtRoot] -> M String processClose aa nts = do { s1 <- processCloseRecs aa nts ; s2 <- processCloseDefs aa nts ; return $ s1 ++ s2 }
187
processClose :: ASTAnalysis -> [NtRoot] -> M String processClose aa nts = do { s1 <- processCloseRecs aa nts ; s2 <- processCloseDefs aa nts ; return $ s1 ++ s2 }
187
processClose aa nts = do { s1 <- processCloseRecs aa nts ; s2 <- processCloseDefs aa nts ; return $ s1 ++ s2 }
135
false
true
0
8
56
69
34
35
null
null
mrd/geocode-google
Geography/Directions/Google.hs
bsd-3-clause
directionsURLFormat = "http://maps.googleapis.com/maps/api/directions/json?%s"
78
directionsURLFormat = "http://maps.googleapis.com/maps/api/directions/json?%s"
78
directionsURLFormat = "http://maps.googleapis.com/maps/api/directions/json?%s"
78
false
false
0
4
2
6
3
3
null
null
fmapfmapfmap/amazonka
amazonka-swf/gen/Network/AWS/SWF/Types/Product.hs
mpl-2.0
-- | If the event is of type 'ChildWorkflowExecutionFailed' then this member -- is set and provides detailed information about the event. It is not set -- for other event types. heChildWorkflowExecutionFailedEventAttributes :: Lens' HistoryEvent (Maybe ChildWorkflowExecutionFailedEventAttributes) heChildWorkflowExecuti...
462
heChildWorkflowExecutionFailedEventAttributes :: Lens' HistoryEvent (Maybe ChildWorkflowExecutionFailedEventAttributes) heChildWorkflowExecutionFailedEventAttributes = lens _heChildWorkflowExecutionFailedEventAttributes (\ s a -> s{_heChildWorkflowExecutionFailedEventAttributes = a})
284
heChildWorkflowExecutionFailedEventAttributes = lens _heChildWorkflowExecutionFailedEventAttributes (\ s a -> s{_heChildWorkflowExecutionFailedEventAttributes = a})
164
true
true
0
9
47
48
27
21
null
null
brendanhay/gogol
gogol-bigquery/gen/Network/Google/BigQuery/Types.hs
mpl-2.0
-- | See, edit, configure, and delete your Google Cloud Platform data cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"] cloudPlatformScope = Proxy
176
cloudPlatformScope :: Proxy '["https://www.googleapis.com/auth/cloud-platform"] cloudPlatformScope = Proxy
106
cloudPlatformScope = Proxy
26
true
true
0
7
18
20
11
9
null
null
csrhodes/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
hacek 'L' = "Ľ"
15
hacek 'L' = "Ľ"
15
hacek 'L' = "Ľ"
15
false
false
1
5
3
13
4
9
null
null
brendanhay/gogol
gogol-books/gen/Network/Google/Books/Types/Product.hs
mpl-2.0
vvirmImage :: Lens' VolumeVolumeInfoReadingModes (Maybe Bool) vvirmImage = lens _vvirmImage (\ s a -> s{_vvirmImage = a})
123
vvirmImage :: Lens' VolumeVolumeInfoReadingModes (Maybe Bool) vvirmImage = lens _vvirmImage (\ s a -> s{_vvirmImage = a})
123
vvirmImage = lens _vvirmImage (\ s a -> s{_vvirmImage = a})
61
false
true
0
9
18
47
24
23
null
null
ezyang/hoopl
testing/Eval.hs
bsd-3-clause
evalM (Store addr e) = do v_addr <- eval addr >>= toAddr v_e <- eval e -- StoreEvt recorded in set_heap set_heap v_addr v_e
143
evalM (Store addr e) = do v_addr <- eval addr >>= toAddr v_e <- eval e -- StoreEvt recorded in set_heap set_heap v_addr v_e
143
evalM (Store addr e) = do v_addr <- eval addr >>= toAddr v_e <- eval e -- StoreEvt recorded in set_heap set_heap v_addr v_e
143
false
false
0
9
43
50
22
28
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
-- FETCHPC for PIC on Darwin/x86 -- get the instruction pointer into a register -- (Terminology note: the IP is called Program Counter on PPC, -- and it's a good thing to use the same name on both platforms) pprInstr (FETCHPC reg) = vcat [ ptext (sLit "\tcall 1f"), hcat [ ptext (sLit "1:\tpo...
357
pprInstr (FETCHPC reg) = vcat [ ptext (sLit "\tcall 1f"), hcat [ ptext (sLit "1:\tpopl\t"), pprReg II32 reg ] ]
136
pprInstr (FETCHPC reg) = vcat [ ptext (sLit "\tcall 1f"), hcat [ ptext (sLit "1:\tpopl\t"), pprReg II32 reg ] ]
136
true
false
0
11
96
60
31
29
null
null
jethomas/WaveSim
src/WaveSim/Input.hs
bsd-3-clause
keyAct :: Key -> KeyState -> Position -> Int -> InputState -> InputState keyAct (MouseButton LeftButton) Down (Position posX posY) wh inputState = inputState {mouseInfo = mouseInfo'} where mouseInfo' = (mouseInfo inputState) { leftMouseDown = True,...
494
keyAct :: Key -> KeyState -> Position -> Int -> InputState -> InputState keyAct (MouseButton LeftButton) Down (Position posX posY) wh inputState = inputState {mouseInfo = mouseInfo'} where mouseInfo' = (mouseInfo inputState) { leftMouseDown = True,...
494
keyAct (MouseButton LeftButton) Down (Position posX posY) wh inputState = inputState {mouseInfo = mouseInfo'} where mouseInfo' = (mouseInfo inputState) { leftMouseDown = True, prevMouseXDown = fromIntegral posX, ...
421
false
true
0
13
214
117
59
58
null
null
gcampax/ghc
compiler/llvmGen/LlvmCodeGen/Data.hs
bsd-3-clause
genStaticLit (CmmBlock b) = genStaticLit $ CmmLabel $ infoTblLbl b
66
genStaticLit (CmmBlock b) = genStaticLit $ CmmLabel $ infoTblLbl b
66
genStaticLit (CmmBlock b) = genStaticLit $ CmmLabel $ infoTblLbl b
66
false
false
0
7
9
26
12
14
null
null
harrisi/on-being-better
list-expansion/Haskell/course/src/Course/List.hs
cc0-1.0
putStrLn :: Chars -> IO () putStrLn = P.putStrLn . hlist
62
putStrLn :: Chars -> IO () putStrLn = P.putStrLn . hlist
62
putStrLn = P.putStrLn . hlist
31
false
true
0
8
16
28
13
15
null
null
ilyasergey/GHC-XAppFix
compiler/main/HscMain.hs
bsd-3-clause
hscStmtWithLocation :: HscEnv -> String -- ^ The statement -> String -- ^ The source -> Int -- ^ Starting line -> IO (Maybe ([Id], HValue)) -- ^ 'Nothing' <==> empty statement -- (or comme...
1,364
hscStmtWithLocation :: HscEnv -> String -- ^ The statement -> String -- ^ The source -> Int -- ^ Starting line -> IO (Maybe ([Id], HValue)) hscStmtWithLocation hsc_env stmt source linenumber = runHsc hsc_env $ do maybe_stmt <- hscPar...
1,238
hscStmtWithLocation hsc_env stmt source linenumber = runHsc hsc_env $ do maybe_stmt <- hscParseStmtWithLocation source linenumber stmt case maybe_stmt of Nothing -> return Nothing -- The real stuff Just parsed_stmt -> do -- Rename and typecheck it let icontext =...
1,015
true
true
0
20
539
256
123
133
null
null
shlevy/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
-- ReadXXXoffAddr, which are identical, for our purposes, to IndexXXXoffAddr. emitPrimOp dflags res ReadOffAddrOp_Char args = doIndexOffAddrOp (Just (mo_u_8ToWord dflags)) b8 res args
198
emitPrimOp dflags res ReadOffAddrOp_Char args = doIndexOffAddrOp (Just (mo_u_8ToWord dflags)) b8 res args
119
emitPrimOp dflags res ReadOffAddrOp_Char args = doIndexOffAddrOp (Just (mo_u_8ToWord dflags)) b8 res args
119
true
false
0
9
37
41
18
23
null
null
DavidAlphaFox/darcs
src/Darcs/Repository/Job.hs
gpl-2.0
getUMask :: UMask -> Maybe String getUMask (YesUMask s) = Just s
64
getUMask :: UMask -> Maybe String getUMask (YesUMask s) = Just s
64
getUMask (YesUMask s) = Just s
30
false
true
0
7
11
30
14
16
null
null
NoxHarmonium/lithium-lang
src/Parser.hs
mit
impor :: Parser Expr impor = do reserved "import" name <- identifier reserved "from" path <- stringLiteral return $ Import name path
142
impor :: Parser Expr impor = do reserved "import" name <- identifier reserved "from" path <- stringLiteral return $ Import name path
142
impor = do reserved "import" name <- identifier reserved "from" path <- stringLiteral return $ Import name path
121
false
true
0
8
31
52
22
30
null
null
kawu/factorized-tag-parser
src/NLP/Partage/Earley/AutoAP.hs
bsd-2-clause
-------------------------------------------------- -- Parsing with automaton -------------------------------------------------- -- | See `recognize`. recognizeAuto :: (SOrd t, SOrd n) => Auto n t -- ^ Grammar automaton -> Input t -- ^ Input sentence -> IO Bool recognizeAuto auto x...
366
recognizeAuto :: (SOrd t, SOrd n) => Auto n t -- ^ Grammar automaton -> Input t -- ^ Input sentence -> IO Bool recognizeAuto auto xs = isRecognized xs <$> earleyAuto auto xs
214
recognizeAuto auto xs = isRecognized xs <$> earleyAuto auto xs
66
true
true
2
9
86
73
36
37
null
null
Helkafen/cabal
Cabal/Distribution/Simple/Utils.hs
bsd-3-clause
currentDir :: FilePath currentDir = "."
39
currentDir :: FilePath currentDir = "."
39
currentDir = "."
16
false
true
0
4
5
11
6
5
null
null
nevrenato/Hets_Fork
HasCASL/InteractiveTests.hs
gpl-2.0
printGE :: GlobalEnv -> String --printGE = show . pretty printGE = unlines . map f . Map.toList where f (s, ge) = show $ pretty s <> text ":" <+> infoEntry ge
162
printGE :: GlobalEnv -> String printGE = unlines . map f . Map.toList where f (s, ge) = show $ pretty s <> text ":" <+> infoEntry ge
136
printGE = unlines . map f . Map.toList where f (s, ge) = show $ pretty s <> text ":" <+> infoEntry ge
105
true
true
0
10
36
66
33
33
null
null
ezyang/binary
src/Data/Binary/Get/Internal.hs
bsd-3-clause
apG :: Get (a -> b) -> Get a -> Get b apG d e = do b <- d a <- e return (b a)
84
apG :: Get (a -> b) -> Get a -> Get b apG d e = do b <- d a <- e return (b a)
84
apG d e = do b <- d a <- e return (b a)
46
false
true
0
9
32
70
31
39
null
null
CulpaBS/wbBach
src/Futhark/Representation/Primitive.hs
bsd-3-clause
-- | The size of a value of a given primitive type in bites. primBitSize :: PrimType -> Int primBitSize = (*8) . primByteSize
125
primBitSize :: PrimType -> Int primBitSize = (*8) . primByteSize
64
primBitSize = (*8) . primByteSize
33
true
true
0
7
23
31
15
16
null
null
evancz/cli
src/CommandLine/Args/Internal.hs
bsd-3-clause
zeroOrMore :: Parser a -> Args [a] zeroOrMore parser = args id ... parser
79
zeroOrMore :: Parser a -> Args [a] zeroOrMore parser = args id ... parser
79
zeroOrMore parser = args id ... parser
44
false
true
1
7
19
37
17
20
null
null
laszlopandy/elm-compiler
src/Parse/Helpers.hs
bsd-3-clause
located :: IParser a -> IParser (R.Position, a, R.Position) located parser = do start <- getMyPosition value <- parser end <- getMyPosition return (start, value, end)
187
located :: IParser a -> IParser (R.Position, a, R.Position) located parser = do start <- getMyPosition value <- parser end <- getMyPosition return (start, value, end)
187
located parser = do start <- getMyPosition value <- parser end <- getMyPosition return (start, value, end)
127
false
true
0
8
46
73
36
37
null
null
mikegehard/haskellBookExercises
chapter6/doesItTypeCheck.hs
mit
mySort :: [Char] -> [Char] mySort = sort
42
mySort :: [Char] -> [Char] mySort = sort
40
mySort = sort
13
false
true
0
8
9
28
13
15
null
null
geraldus/transient
src/Transient/Internals.hs
mit
waitEvents' :: IO b -> TransIO b waitEvents' io= do mr <- parallel (SMore <$> io) case mr of SMore x -> return x SError e -> throw e -- | variant of `parallel` that execute the IO computation once, and kill the previous child threads
252
waitEvents' :: IO b -> TransIO b waitEvents' io= do mr <- parallel (SMore <$> io) case mr of SMore x -> return x SError e -> throw e -- | variant of `parallel` that execute the IO computation once, and kill the previous child threads
252
waitEvents' io= do mr <- parallel (SMore <$> io) case mr of SMore x -> return x SError e -> throw e -- | variant of `parallel` that execute the IO computation once, and kill the previous child threads
217
false
true
0
10
64
73
33
40
null
null
keithodulaigh/Hets
CSL/ReduceInterpreter.hs
gpl-2.0
redcDirect :: RITrans -> String -> IO String redcDirect rit s = do (res, _) <- runIOS (getRI rit) (PC.call 0.5 s) return res
128
redcDirect :: RITrans -> String -> IO String redcDirect rit s = do (res, _) <- runIOS (getRI rit) (PC.call 0.5 s) return res
128
redcDirect rit s = do (res, _) <- runIOS (getRI rit) (PC.call 0.5 s) return res
83
false
true
0
11
27
67
32
35
null
null
beni55/libmpd-haskell
src/Network/MPD/Applicative/StoredPlaylists.hs
mit
-- | Add a database path to the named playlist. playlistAdd :: PlaylistName -> Path -> Command () playlistAdd plName path = Command emptyResponse ["playlistadd" <@> plName <++> path]
186
playlistAdd :: PlaylistName -> Path -> Command () playlistAdd plName path = Command emptyResponse ["playlistadd" <@> plName <++> path]
138
playlistAdd plName path = Command emptyResponse ["playlistadd" <@> plName <++> path]
88
true
true
0
8
32
46
23
23
null
null
bhamrick/puzzlib
Cryptogram.hs
mit
getPattern :: ByteString -> [Symbol] getPattern s = getPattern_ s empty 0
73
getPattern :: ByteString -> [Symbol] getPattern s = getPattern_ s empty 0
73
getPattern s = getPattern_ s empty 0
36
false
true
0
6
11
28
14
14
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Core31/Tokens.hs
bsd-3-clause
gl_OR_INVERTED :: GLenum gl_OR_INVERTED = 0x150D
48
gl_OR_INVERTED :: GLenum gl_OR_INVERTED = 0x150D
48
gl_OR_INVERTED = 0x150D
23
false
true
0
4
5
11
6
5
null
null
wiryls/HomeworkCollectionOfMYLS
2018.ProjectV/src/IAFinance/Server.hs
mit
dispatch _ [] = badreq
27
dispatch _ [] = badreq
27
dispatch _ [] = badreq
27
false
false
0
6
9
13
6
7
null
null
osa1/fast-tags
src/FastTags.hs
bsd-3-clause
-- | Tags from foreign import. -- -- e.g. @foreign import ccall safe \"name\" c_name :: ...@ will produce a tag -- for @c_name@. foreignTags :: [Token] -> [Tag] foreignTags decl = case decl of Pos _ KWImport : decl' | Pos pos (T name) : _ <- dropBefore (\case { Pos _ DoubleColon -> True; _ -...
388
foreignTags :: [Token] -> [Tag] foreignTags decl = case decl of Pos _ KWImport : decl' | Pos pos (T name) : _ <- dropBefore (\case { Pos _ DoubleColon -> True; _ -> False}) decl' -> [mkTag pos name Function] _ -> []
259
foreignTags decl = case decl of Pos _ KWImport : decl' | Pos pos (T name) : _ <- dropBefore (\case { Pos _ DoubleColon -> True; _ -> False}) decl' -> [mkTag pos name Function] _ -> []
227
true
true
1
13
111
108
58
50
null
null
li-zhirui/JSAnalyzer
JSEvaluator.hs
mit
evalPrefixExpression _ JSIncrement expr = throwError $ BadSpecialForm "Unincreasable expression" expr
105
evalPrefixExpression _ JSIncrement expr = throwError $ BadSpecialForm "Unincreasable expression" expr
105
evalPrefixExpression _ JSIncrement expr = throwError $ BadSpecialForm "Unincreasable expression" expr
105
false
false
3
5
14
23
9
14
null
null
fmapfmapfmap/amazonka
amazonka-s3/gen/Network/AWS/S3/PutObject.hs
mpl-2.0
-- | The Server-side encryption algorithm used when storing this object in S3 -- (e.g., AES256, aws:kms). poServerSideEncryption :: Lens' PutObject (Maybe ServerSideEncryption) poServerSideEncryption = lens _poServerSideEncryption (\ s a -> s{_poServerSideEncryption = a})
272
poServerSideEncryption :: Lens' PutObject (Maybe ServerSideEncryption) poServerSideEncryption = lens _poServerSideEncryption (\ s a -> s{_poServerSideEncryption = a})
166
poServerSideEncryption = lens _poServerSideEncryption (\ s a -> s{_poServerSideEncryption = a})
95
true
true
0
9
33
47
26
21
null
null
diagrams/diagrams-input
src/Diagrams/SVG/Path.hs
bsd-3-clause
parse_q = do { AT.string "q"; t <- many' tuple4; return (Just $ map (Q Rel) t) }
80
parse_q = do { AT.string "q"; t <- many' tuple4; return (Just $ map (Q Rel) t) }
80
parse_q = do { AT.string "q"; t <- many' tuple4; return (Just $ map (Q Rel) t) }
80
false
false
1
13
17
56
25
31
null
null
adamse/mat-chalmers
app/Main.hs
mit
main :: IO () main = getArgs <&> getOpt Permute opts >>= \case (_ , _ , _ : _) -> usage (_ , _ : _, _ ) -> usage (!confs, _ , _ ) -> do let config = foldl (flip id) defaultConfig confs if view cHelp config then usage ...
1,837
main :: IO () main = getArgs <&> getOpt Permute opts >>= \case (_ , _ , _ : _) -> usage (_ , _ : _, _ ) -> usage (!confs, _ , _ ) -> do let config = foldl (flip id) defaultConfig confs if view cHelp config then usage ...
1,837
main = getArgs <&> getOpt Permute opts >>= \case (_ , _ , _ : _) -> usage (_ , _ : _, _ ) -> usage (!confs, _ , _ ) -> do let config = foldl (flip id) defaultConfig confs if view cHelp config then usage else ...
1,823
false
true
7
26
1,039
372
182
190
null
null
acowley/ghc
compiler/simplCore/CoreMonad.hs
bsd-3-clause
pprTickGroup :: [(Tick, Int)] -> SDoc pprTickGroup group@((tick1,_):_) = hang (int (sum [n | (_,n) <- group]) <+> text (tickString tick1)) 2 (vcat [ int n <+> pprTickCts tick -- flip as we want largest first | (tick,n) <- sortBy (flip (comparing snd)) group])
319
pprTickGroup :: [(Tick, Int)] -> SDoc pprTickGroup group@((tick1,_):_) = hang (int (sum [n | (_,n) <- group]) <+> text (tickString tick1)) 2 (vcat [ int n <+> pprTickCts tick -- flip as we want largest first | (tick,n) <- sortBy (flip (comparing snd)) group])
319
pprTickGroup group@((tick1,_):_) = hang (int (sum [n | (_,n) <- group]) <+> text (tickString tick1)) 2 (vcat [ int n <+> pprTickCts tick -- flip as we want largest first | (tick,n) <- sortBy (flip (comparing snd)) group])
281
false
true
7
14
103
146
77
69
null
null
tomahawkins/trs
attic/C/Compiler.hs
bsd-3-clause
primitives :: Word -> String primitives word = unlines [ "void trs_copy(int words, " ++ single ++ "* a, " ++ single ++ "* x)" , "{" , " int i;" , " for (i = 0; i < words; i++)" , " x[i] = a[i];" , "}" , "" , "void trs_mask(int words, " ++ single ++ " mask, " ++ single ++ "* x)" , "{" , " x[wor...
6,853
primitives :: Word -> String primitives word = unlines [ "void trs_copy(int words, " ++ single ++ "* a, " ++ single ++ "* x)" , "{" , " int i;" , " for (i = 0; i < words; i++)" , " x[i] = a[i];" , "}" , "" , "void trs_mask(int words, " ++ single ++ " mask, " ++ single ++ "* x)" , "{" , " x[wor...
6,853
primitives word = unlines [ "void trs_copy(int words, " ++ single ++ "* a, " ++ single ++ "* x)" , "{" , " int i;" , " for (i = 0; i < words; i++)" , " x[i] = a[i];" , "}" , "" , "void trs_mask(int words, " ++ single ++ " mask, " ++ single ++ "* x)" , "{" , " x[words - 1] = x[words - 1] & mask...
6,824
false
true
0
13
2,264
1,414
807
607
null
null
thomasjm/IHaskell
src/IHaskell/Flags.hs
mit
noArgs = flagArg unexpected "" where unexpected a = error $ "Unexpected argument: " ++ a
94
noArgs = flagArg unexpected "" where unexpected a = error $ "Unexpected argument: " ++ a
94
noArgs = flagArg unexpected "" where unexpected a = error $ "Unexpected argument: " ++ a
94
false
false
0
6
21
30
14
16
null
null
pgj/bead
test/Test/Property/Persistence.hs
bsd-3-clause
saveAndLoadSubmission = do ak <- groupAssignmentSaveAndLoad u <- pick Gen.users createOrLoadUser u sk <- saveAndLoadIdenpotent "Submission" (saveSubmission ak (u_username u)) (loadSubmission) (Gen.submissions startDate) return (ak,u,sk)
256
saveAndLoadSubmission = do ak <- groupAssignmentSaveAndLoad u <- pick Gen.users createOrLoadUser u sk <- saveAndLoadIdenpotent "Submission" (saveSubmission ak (u_username u)) (loadSubmission) (Gen.submissions startDate) return (ak,u,sk)
256
saveAndLoadSubmission = do ak <- groupAssignmentSaveAndLoad u <- pick Gen.users createOrLoadUser u sk <- saveAndLoadIdenpotent "Submission" (saveSubmission ak (u_username u)) (loadSubmission) (Gen.submissions startDate) return (ak,u,sk)
256
false
false
0
12
44
87
41
46
null
null
bravit/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reifyTTApp t [n, b, x] | t == reflm "Bind" = do n' <- reifyTTName n b' <- reifyTTBinder reifyTT (reflm "TT") b x' <- reifyTT x return $ Bind n' b' x'
268
reifyTTApp t [n, b, x] | t == reflm "Bind" = do n' <- reifyTTName n b' <- reifyTTBinder reifyTT (reflm "TT") b x' <- reifyTT x return $ Bind n' b' x'
268
reifyTTApp t [n, b, x] | t == reflm "Bind" = do n' <- reifyTTName n b' <- reifyTTBinder reifyTT (reflm "TT") b x' <- reifyTT x return $ Bind n' b' x'
268
false
false
0
11
151
89
39
50
null
null
23Skidoo/snap
test/suite/Snap/Snaplet/Auth/Handlers/Tests.hs
bsd-3-clause
isJustFailure _ _ = False
25
isJustFailure _ _ = False
25
isJustFailure _ _ = False
25
false
false
0
5
4
11
5
6
null
null
ComputationWithBoundedResources/jat
src/Jat/PState/Semantics.hs
bsd-3-clause
-- import Debug.Trace -- | Constructs the initial state for a given class name and method name. mkInitialState :: (Monad m, IntDomain i, MemoryModel a) => P.ClassId -> P.MethodId -> JatM m (PState i a) mkInitialState = initMem
227
mkInitialState :: (Monad m, IntDomain i, MemoryModel a) => P.ClassId -> P.MethodId -> JatM m (PState i a) mkInitialState = initMem
130
mkInitialState = initMem
24
true
true
0
10
38
59
31
28
null
null
wochinge/CacheSimulator
src/Lru/LruHash.hs
bsd-3-clause
to' :: C.File -> Lru -> Lru to' f@(fileID, fileSize) cache | f `C.biggerAsMax` cache = cache | C.fits f cache = cache {files = files', nextPrio = prio + 1, size = currentCacheSize + fileSize} | otherwise = to' f (removeLRU cache) where prio = nextPrio cache currentCacheSize = size cache ...
376
to' :: C.File -> Lru -> Lru to' f@(fileID, fileSize) cache | f `C.biggerAsMax` cache = cache | C.fits f cache = cache {files = files', nextPrio = prio + 1, size = currentCacheSize + fileSize} | otherwise = to' f (removeLRU cache) where prio = nextPrio cache currentCacheSize = size cache ...
376
to' f@(fileID, fileSize) cache | f `C.biggerAsMax` cache = cache | C.fits f cache = cache {files = files', nextPrio = prio + 1, size = currentCacheSize + fileSize} | otherwise = to' f (removeLRU cache) where prio = nextPrio cache currentCacheSize = size cache files' = H.insert fileID...
348
false
true
0
9
96
152
78
74
null
null
MaximKN/Haskell1
src/REPL.hs
gpl-3.0
readLine :: State -> IO String readLine st | hasCommands st = let cmd = head (commands st) in do putStrLn cmd return cmd | otherwise = getLine
238
readLine :: State -> IO String readLine st | hasCommands st = let cmd = head (commands st) in do putStrLn cmd return cmd | otherwise = getLine
238
readLine st | hasCommands st = let cmd = head (commands st) in do putStrLn cmd return cmd | otherwise = getLine
207
false
true
0
12
123
71
30
41
null
null
bordaigorl/jamesbound
src/Language/PiCalc/Analysis/Hierarchical.hs
gpl-2.0
inferTypesIncomplete :: PiTerm -> InferredTypes inferTypesIncomplete = inferTypes' solveBTConstrIncomplete
106
inferTypesIncomplete :: PiTerm -> InferredTypes inferTypesIncomplete = inferTypes' solveBTConstrIncomplete
106
inferTypesIncomplete = inferTypes' solveBTConstrIncomplete
58
false
true
0
5
8
18
9
9
null
null
zjhmale/Ntha
src/Untyped/Syntax.hs
bsd-3-clause
updateSymbolInParent :: forall m. MonadState Context m => String -> Expr -> m () updateSymbolInParent s eval_e = modify (\(Ctx sym_table parent_ctx) -> (Ctx sym_table (updatedCtx parent_ctx))) where updatedCtx (Just (Ctx sym_table ctx)) = Just (Ctx (M.insert s eval_e sy...
389
updateSymbolInParent :: forall m. MonadState Context m => String -> Expr -> m () updateSymbolInParent s eval_e = modify (\(Ctx sym_table parent_ctx) -> (Ctx sym_table (updatedCtx parent_ctx))) where updatedCtx (Just (Ctx sym_table ctx)) = Just (Ctx (M.insert s eval_e sy...
389
updateSymbolInParent s eval_e = modify (\(Ctx sym_table parent_ctx) -> (Ctx sym_table (updatedCtx parent_ctx))) where updatedCtx (Just (Ctx sym_table ctx)) = Just (Ctx (M.insert s eval_e sym_table) ctx) updatedCtx Nothing = Nothing
260
false
true
1
11
121
131
65
66
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/SVGFEDropShadowElement.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGFEDropShadowElement.dy Mozilla SVGFEDropShadowElement.dy documentation> getDy :: (MonadDOM m) => SVGFEDropShadowElement -> m SVGAnimatedNumber getDy self = liftDOM ((self ^. js "dy") >>= fromJSValUnchecked)
271
getDy :: (MonadDOM m) => SVGFEDropShadowElement -> m SVGAnimatedNumber getDy self = liftDOM ((self ^. js "dy") >>= fromJSValUnchecked)
140
getDy self = liftDOM ((self ^. js "dy") >>= fromJSValUnchecked)
63
true
true
0
10
31
55
27
28
null
null
smaccm/capDL-tool
CapDL/PrintDot.hs
bsd-2-clause
getCovered ms covers (x:xs) | hasCover x covers = x : getCovered ms covers xs | otherwise = getCovered ms covers xs
123
getCovered ms covers (x:xs) | hasCover x covers = x : getCovered ms covers xs | otherwise = getCovered ms covers xs
123
getCovered ms covers (x:xs) | hasCover x covers = x : getCovered ms covers xs | otherwise = getCovered ms covers xs
123
false
false
1
8
29
56
26
30
null
null
meditans/preprocessor
src/Language/C/Preprocessor/Remover/Internal/AddPadding.hs
mit
isLineMarker _ = False
48
isLineMarker _ = False
48
isLineMarker _ = False
48
false
false
0
5
29
9
4
5
null
null
Fermat/higher-rank
src/KindChecker.hs
bsd-3-clause
splitDecl (_:xs) = splitDecl xs
31
splitDecl (_:xs) = splitDecl xs
31
splitDecl (_:xs) = splitDecl xs
31
false
false
0
6
4
20
9
11
null
null
DougBurke/swish
tests/RDFDatatypeXsdIntegerTest.hs
lgpl-2.1
prod01bwd :: [[B.Builder]] prod01bwd = [ [ "_:a a xsd_integer:Prod . " , "_:a rdf:_1 \"666\"^^xsd:integer . " , "_:a rdf:_2 \"222\"^^xsd:integer . " ] , [ "_:a a xsd_integer:Prod . " , "_:a rdf:_1 \"666\"^^xsd:integer . " , "_:a rdf:_3 \"3\"^^xsd:integer . " ] ]
310
prod01bwd :: [[B.Builder]] prod01bwd = [ [ "_:a a xsd_integer:Prod . " , "_:a rdf:_1 \"666\"^^xsd:integer . " , "_:a rdf:_2 \"222\"^^xsd:integer . " ] , [ "_:a a xsd_integer:Prod . " , "_:a rdf:_1 \"666\"^^xsd:integer . " , "_:a rdf:_3 \"3\"^^xsd:integer . " ] ]
310
prod01bwd = [ [ "_:a a xsd_integer:Prod . " , "_:a rdf:_1 \"666\"^^xsd:integer . " , "_:a rdf:_2 \"222\"^^xsd:integer . " ] , [ "_:a a xsd_integer:Prod . " , "_:a rdf:_1 \"666\"^^xsd:integer . " , "_:a rdf:_3 \"3\"^^xsd:integer . " ] ]
283
false
true
0
9
93
50
28
22
null
null
dec9ue/jhc_copygc
src/FrontEnd/DeclsDepends.hs
gpl-2.0
expDeps (HsDo stmts) = do tell $ foldr (++) [] (map getStmtDeps stmts)
74
expDeps (HsDo stmts) = do tell $ foldr (++) [] (map getStmtDeps stmts)
74
expDeps (HsDo stmts) = do tell $ foldr (++) [] (map getStmtDeps stmts)
74
false
false
0
10
16
41
20
21
null
null
ocean0yohsuke/Simply-Typed-Lambda
src/Lambda/Evaluator/Eval.hs
bsd-3-clause
eval_ :: Term -> Lambda Term eval_ = eval >=> catchVoid
55
eval_ :: Term -> Lambda Term eval_ = eval >=> catchVoid
55
eval_ = eval >=> catchVoid
26
false
true
2
7
10
30
13
17
null
null
yuto-matsum/contest-util-hs
src/Euler/031.hs
mit
coins = [200,100,50,20,10,5,2,1]
32
coins = [200,100,50,20,10,5,2,1]
32
coins = [200,100,50,20,10,5,2,1]
32
false
false
0
5
2
30
19
11
null
null
Gabriel439/Haskell-Pipes-Library
src/Pipes/Prelude.hs
bsd-3-clause
-- | Determines whether all elements are 'True' and :: Monad m => Producer Bool m () -> m Bool and = all id
107
and :: Monad m => Producer Bool m () -> m Bool and = all id
59
and = all id
12
true
true
0
9
23
43
19
24
null
null
siddhanathan/ghc
compiler/utils/Outputable.hs
bsd-3-clause
pprDeeper :: SDoc -> SDoc pprDeeper d = SDoc $ \ctx -> case ctx of SDC{sdocStyle=PprUser _ (PartWay 0)} -> Pretty.text "..." SDC{sdocStyle=PprUser q (PartWay n)} -> runSDoc d ctx{sdocStyle = PprUser q (PartWay (n-1))} _ -> runSDoc d ctx
246
pprDeeper :: SDoc -> SDoc pprDeeper d = SDoc $ \ctx -> case ctx of SDC{sdocStyle=PprUser _ (PartWay 0)} -> Pretty.text "..." SDC{sdocStyle=PprUser q (PartWay n)} -> runSDoc d ctx{sdocStyle = PprUser q (PartWay (n-1))} _ -> runSDoc d ctx
246
pprDeeper d = SDoc $ \ctx -> case ctx of SDC{sdocStyle=PprUser _ (PartWay 0)} -> Pretty.text "..." SDC{sdocStyle=PprUser q (PartWay n)} -> runSDoc d ctx{sdocStyle = PprUser q (PartWay (n-1))} _ -> runSDoc d ctx
220
false
true
0
17
49
130
65
65
null
null
shlevy/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
gHC_IO = mkBaseModule (fsLit "GHC.IO")
47
gHC_IO = mkBaseModule (fsLit "GHC.IO")
47
gHC_IO = mkBaseModule (fsLit "GHC.IO")
47
false
false
0
7
13
15
7
8
null
null
chrisdone/bdo
src/Http.hs
bsd-3-clause
requestBody :: [Text] -> Text -> Maybe Text requestBody headers body = do len <- lookup "content-length:" (map (T.break (==' ') . T.map toLower) headers) case readDec (T.unpack (T.unwords (T.words len))) of [(l,"")] -> return (T.take l body) _ -> Nothing -- | Read up to the headers.
296
requestBody :: [Text] -> Text -> Maybe Text requestBody headers body = do len <- lookup "content-length:" (map (T.break (==' ') . T.map toLower) headers) case readDec (T.unpack (T.unwords (T.words len))) of [(l,"")] -> return (T.take l body) _ -> Nothing -- | Read up to the headers.
296
requestBody headers body = do len <- lookup "content-length:" (map (T.break (==' ') . T.map toLower) headers) case readDec (T.unpack (T.unwords (T.words len))) of [(l,"")] -> return (T.take l body) _ -> Nothing -- | Read up to the headers.
252
false
true
0
15
60
140
70
70
null
null
acowley/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
pure_RDR = nameRdrName pureAName
47
pure_RDR = nameRdrName pureAName
47
pure_RDR = nameRdrName pureAName
47
false
false
0
5
18
9
4
5
null
null
coolhacks/scripts-hacks
examples/shellcheck-master/ShellCheck/Analytics.hs
mit
prop_checkTr2a= verify checkTr "tr '[a-z]' '[A-Z]'"
51
prop_checkTr2a= verify checkTr "tr '[a-z]' '[A-Z]'"
51
prop_checkTr2a= verify checkTr "tr '[a-z]' '[A-Z]'"
51
false
false
0
5
5
11
5
6
null
null
atsukotakahashi/wi
src/library/Yi/Syntax/Haskell.hs
gpl-2.0
-- | @pModule@ parse a module pModule :: Parser TT (PModule TT) pModule = PModule <$> pComments <*> optional (pBlockOf' (ProgMod <$> pModuleDecl <*> pModBody <|> pBody))
203
pModule :: Parser TT (PModule TT) pModule = PModule <$> pComments <*> optional (pBlockOf' (ProgMod <$> pModuleDecl <*> pModBody <|> pBody))
173
pModule = PModule <$> pComments <*> optional (pBlockOf' (ProgMod <$> pModuleDecl <*> pModBody <|> pBody))
139
true
true
0
12
60
55
28
27
null
null
hesselink/haskell-opaleye
src/Opaleye/RunQuery.hs
bsd-3-clause
runQueryExplicit :: QueryRunner columns haskells -> PGS.Connection -> Query columns -> IO [haskells] runQueryExplicit qr conn q = maybe (return []) (PGS.queryWith_ parser conn) sql where (sql, parser) = prepareQuery qr q -- | @runQueryFold@ streams the results of a ...
519
runQueryExplicit :: QueryRunner columns haskells -> PGS.Connection -> Query columns -> IO [haskells] runQueryExplicit qr conn q = maybe (return []) (PGS.queryWith_ parser conn) sql where (sql, parser) = prepareQuery qr q -- | @runQueryFold@ streams the results of a ...
519
runQueryExplicit qr conn q = maybe (return []) (PGS.queryWith_ parser conn) sql where (sql, parser) = prepareQuery qr q -- | @runQueryFold@ streams the results of a query incrementally and consumes -- the results with a left fold. -- -- This fold is /not/ strict. The stream consumer is responsible for -- forcing the...
367
false
true
0
9
128
95
49
46
null
null
FranklinChen/twenty-four-days2015-of-hackage
src/MonadLoopsExample.hs
bsd-3-clause
logIn4 :: IO () logIn4 = do putStrLn "% Enter password:" whileM_ (liftM (\guess -> guess /= "secret") getLine) $ do putStrLn "% Wrong password!" putStrLn "% Try again:" putStrLn "$ Congratulations!" -- | With operator sectioning and <$>.
252
logIn4 :: IO () logIn4 = do putStrLn "% Enter password:" whileM_ (liftM (\guess -> guess /= "secret") getLine) $ do putStrLn "% Wrong password!" putStrLn "% Try again:" putStrLn "$ Congratulations!" -- | With operator sectioning and <$>.
252
logIn4 = do putStrLn "% Enter password:" whileM_ (liftM (\guess -> guess /= "secret") getLine) $ do putStrLn "% Wrong password!" putStrLn "% Try again:" putStrLn "$ Congratulations!" -- | With operator sectioning and <$>.
236
false
true
0
14
53
77
33
44
null
null
MichielDerhaeg/stack
src/Stack/IDE.hs
bsd-3-clause
listTargets :: HasEnvConfig env => RIO env () listTargets = do rawLocals <- lpProject <$> getLocalPackages logInfo (T.intercalate "\n" (map renderPkgComponent (concatMap toNameAndComponent ...
470
listTargets :: HasEnvConfig env => RIO env () listTargets = do rawLocals <- lpProject <$> getLocalPackages logInfo (T.intercalate "\n" (map renderPkgComponent (concatMap toNameAndComponent ...
470
listTargets = do rawLocals <- lpProject <$> getLocalPackages logInfo (T.intercalate "\n" (map renderPkgComponent (concatMap toNameAndComponent (Map.toList rawLocals)))) w...
424
false
true
0
16
196
124
58
66
null
null
spacekitteh/smcghc
compiler/utils/Binary.hs
bsd-3-clause
getByte :: BinHandle -> IO Word8 getByte = getWord8
51
getByte :: BinHandle -> IO Word8 getByte = getWord8
51
getByte = getWord8
18
false
true
0
7
8
24
10
14
null
null
rueshyna/gogol
gogol-games/gen/Network/Google/Games/Types/Product.hs
mpl-2.0
-- | The results reported for this match. tbmResults :: Lens' TurnBasedMatch [ParticipantResult] tbmResults = lens _tbmResults (\ s a -> s{_tbmResults = a}) . _Default . _Coerce
191
tbmResults :: Lens' TurnBasedMatch [ParticipantResult] tbmResults = lens _tbmResults (\ s a -> s{_tbmResults = a}) . _Default . _Coerce
149
tbmResults = lens _tbmResults (\ s a -> s{_tbmResults = a}) . _Default . _Coerce
94
true
true
0
11
41
53
28
25
null
null
facebookincubator/duckling
Duckling/Numeral/KN/Rules.hs
bsd-3-clause
ruleNumeralMap :: [(Text, Integer)] ruleNumeralMap = [ ("ಸೊನ್ನೆ", 0) , ("ಒಂದು", 1) , ("ಎರಡು", 2) , ("ಮೂರು", 3) , ("ನಾಲ್ಕು", 4) , ("ಐದು", 5) , ("ಆರು", 6) , ("ಏಳು", 7) , ("ಎಂಟು", 8) , ("ಒಂಬತ್ತು", 9) ]
220
ruleNumeralMap :: [(Text, Integer)] ruleNumeralMap = [ ("ಸೊನ್ನೆ", 0) , ("ಒಂದು", 1) , ("ಎರಡು", 2) , ("ಮೂರು", 3) , ("ನಾಲ್ಕು", 4) , ("ಐದು", 5) , ("ಆರು", 6) , ("ಏಳು", 7) , ("ಎಂಟು", 8) , ("ಒಂಬತ್ತು", 9) ]
220
ruleNumeralMap = [ ("ಸೊನ್ನೆ", 0) , ("ಒಂದು", 1) , ("ಎರಡು", 2) , ("ಮೂರು", 3) , ("ನಾಲ್ಕು", 4) , ("ಐದು", 5) , ("ಆರು", 6) , ("ಏಳು", 7) , ("ಎಂಟು", 8) , ("ಒಂಬತ್ತು", 9) ]
184
false
true
0
6
58
110
72
38
null
null
ocharles/virtual-dom
src/VirtualDom/HTML.hs
bsd-3-clause
keygen_ :: (Term arg result) => arg -> result keygen_ = term "keygen"
69
keygen_ :: (Term arg result) => arg -> result keygen_ = term "keygen"
69
keygen_ = term "keygen"
23
false
true
0
8
12
36
16
20
null
null
lostbean/sledge
src/File/EBSD.hs
gpl-3.0
angpoint2ctfpoint :: ANGpoint -> CTFpoint angpoint2ctfpoint p = let x = round $ 10 * A.ci p in CTFpoint { C.phase = A.phaseNum p , C.rotation = A.rotation p , C.xpos = A.xpos p , C.ypos = A.ypos p , C.bands = x , C.errorID = x , C.ang...
424
angpoint2ctfpoint :: ANGpoint -> CTFpoint angpoint2ctfpoint p = let x = round $ 10 * A.ci p in CTFpoint { C.phase = A.phaseNum p , C.rotation = A.rotation p , C.xpos = A.xpos p , C.ypos = A.ypos p , C.bands = x , C.errorID = x , C.ang...
424
angpoint2ctfpoint p = let x = round $ 10 * A.ci p in CTFpoint { C.phase = A.phaseNum p , C.rotation = A.rotation p , C.xpos = A.xpos p , C.ypos = A.ypos p , C.bands = x , C.errorID = x , C.angulardev = A.fit p , C.bandcontrast ...
382
false
true
0
11
172
161
84
77
null
null
danr/hipspec
testsuite/prod/zeno_version/PropT02.hs
gpl-3.0
_ <= Z = False
18
_ <= Z = False
18
_ <= Z = False
18
false
false
0
5
8
12
5
7
null
null
spechub/Hets
Isabelle/IsaConsts.hs
gpl-2.0
mkStrictSum :: Typ -> Typ -> Typ mkStrictSum = mkBinDomType lSumS
65
mkStrictSum :: Typ -> Typ -> Typ mkStrictSum = mkBinDomType lSumS
65
mkStrictSum = mkBinDomType lSumS
32
false
true
0
6
10
22
11
11
null
null
narumij/matrix-as-xyz
src/Data/Matrix/AsXYZ/ParseXYZ.hs
bsd-3-clause
one :: Num a => CharParser () Char -> ReadNum a -> CharParser () (Var a) one var numRead = do s <- optionMaybe sign option () spaces (n,l) <- elementBody var numRead return $ v l . minus s . fromMaybe 1 $ n
214
one :: Num a => CharParser () Char -> ReadNum a -> CharParser () (Var a) one var numRead = do s <- optionMaybe sign option () spaces (n,l) <- elementBody var numRead return $ v l . minus s . fromMaybe 1 $ n
214
one var numRead = do s <- optionMaybe sign option () spaces (n,l) <- elementBody var numRead return $ v l . minus s . fromMaybe 1 $ n
141
false
true
0
11
52
125
55
70
null
null