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
sebadoom/mpvguihs
MpvPlayer/Frontend/GUITemplates.hs
gpl-3.0
getHandlesExp :: Q Exp -> Q Exp getHandlesExp builder = do (TyConI (DataD _ _ _ [RecC _ vars] _)) <- reify ''Handles objs <- forM vars $ \(n,_,t) -> do let widgetName' = (toUpper $ head $ nameBase n):(tail $ nameBase n) let tStr = reverse $ takeWhile (/= '.') $ reverse $ show t l...
810
getHandlesExp :: Q Exp -> Q Exp getHandlesExp builder = do (TyConI (DataD _ _ _ [RecC _ vars] _)) <- reify ''Handles objs <- forM vars $ \(n,_,t) -> do let widgetName' = (toUpper $ head $ nameBase n):(tail $ nameBase n) let tStr = reverse $ takeWhile (/= '.') $ reverse $ show t l...
810
getHandlesExp builder = do (TyConI (DataD _ _ _ [RecC _ vars] _)) <- reify ''Handles objs <- forM vars $ \(n,_,t) -> do let widgetName' = (toUpper $ head $ nameBase n):(tail $ nameBase n) let tStr = reverse $ takeWhile (/= '.') $ reverse $ show t let castStr = "castTo" ++ tStr ...
778
false
true
1
18
262
354
183
171
null
null
yliu120/K3
src/Language/K3/Analysis/Provenance/Constructors.hs
apache-2.0
pindirect :: K3 Provenance -> K3 Provenance pindirect p = sing p $ PIndirection
79
pindirect :: K3 Provenance -> K3 Provenance pindirect p = sing p $ PIndirection
79
pindirect p = sing p $ PIndirection
35
false
true
0
6
13
31
14
17
null
null
denisshevchenko/control-groups
src/Invalid.hs
mit
reportAboutEmptyPOSTRequest :: CGI CGIResult reportAboutEmptyPOSTRequest = do setHeader "Content-type" "text/html" setStatus 400 "Bad Request" output $ unlines [ "<div style=\"text-align: center; padding-top: 30px;\">" , "<h2>Empty POST-request</h2>" , "Your POST-re...
381
reportAboutEmptyPOSTRequest :: CGI CGIResult reportAboutEmptyPOSTRequest = do setHeader "Content-type" "text/html" setStatus 400 "Bad Request" output $ unlines [ "<div style=\"text-align: center; padding-top: 30px;\">" , "<h2>Empty POST-request</h2>" , "Your POST-re...
381
reportAboutEmptyPOSTRequest = do setHeader "Content-type" "text/html" setStatus 400 "Bad Request" output $ unlines [ "<div style=\"text-align: center; padding-top: 30px;\">" , "<h2>Empty POST-request</h2>" , "Your POST-request doesn't contain any data.</div>" ...
336
false
true
0
9
108
49
23
26
null
null
psibi/cabal2nix
src/Distribution/Nixpkgs/Haskell/FromCabal/PostProcess.hs
bsd-3-clause
cabalInstallPostInstall :: String cabalInstallPostInstall = unlines [ "postInstall = ''" , " mkdir $out/etc" , " mv bash-completion $out/etc/bash_completion.d" , "'';" ]
181
cabalInstallPostInstall :: String cabalInstallPostInstall = unlines [ "postInstall = ''" , " mkdir $out/etc" , " mv bash-completion $out/etc/bash_completion.d" , "'';" ]
181
cabalInstallPostInstall = unlines [ "postInstall = ''" , " mkdir $out/etc" , " mv bash-completion $out/etc/bash_completion.d" , "'';" ]
147
false
true
0
5
33
26
15
11
null
null
Hrothen/Hubert
src/Style.hs
mit
-- if name exists, return its specified value value :: StyledNode -> T.Text -> Maybe Value value (NTree node _) name = HM.lookup name (snd node)
144
value :: StyledNode -> T.Text -> Maybe Value value (NTree node _) name = HM.lookup name (snd node)
98
value (NTree node _) name = HM.lookup name (snd node)
53
true
true
0
7
25
51
25
26
null
null
AlexanderPankiv/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
shouldInlinePrimOp dflags CloneMutableArrayOp [src, src_off, (CmmLit (CmmInt n w))] | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) = Just $ \ [res] -> emitCloneArray mkMAP_DIRTY_infoLabel res src src_off (fromInteger n)
263
shouldInlinePrimOp dflags CloneMutableArrayOp [src, src_off, (CmmLit (CmmInt n w))] | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) = Just $ \ [res] -> emitCloneArray mkMAP_DIRTY_infoLabel res src src_off (fromInteger n)
263
shouldInlinePrimOp dflags CloneMutableArrayOp [src, src_off, (CmmLit (CmmInt n w))] | wordsToBytes dflags (asUnsigned w n) <= fromIntegral (maxInlineAllocSize dflags) = Just $ \ [res] -> emitCloneArray mkMAP_DIRTY_infoLabel res src src_off (fromInteger n)
263
false
false
0
11
39
97
48
49
null
null
FranklinChen/hugs98-plus-Sep2006
packages/network/Network/URI.hs
bsd-3-clause
elimDots ( '.':'.':[] ) rs = elimDots [] (dropHead rs)
60
elimDots ( '.':'.':[] ) rs = elimDots [] (dropHead rs)
60
elimDots ( '.':'.':[] ) rs = elimDots [] (dropHead rs)
60
false
false
0
9
15
37
18
19
null
null
gsdlab/clafer
src/Language/Clafer/Front/PrintClafer.hs
mit
parenth :: Doc -> Doc parenth ss = doc (showChar '(') . ss . doc (showChar ')')
79
parenth :: Doc -> Doc parenth ss = doc (showChar '(') . ss . doc (showChar ')')
79
parenth ss = doc (showChar '(') . ss . doc (showChar ')')
57
false
true
0
9
16
44
21
23
null
null
mauriciofierrom/cis194-homework
homework02/lecture.hs
mit
ex02 = OK 3.4
13
ex02 = OK 3.4
13
ex02 = OK 3.4
13
false
false
0
5
3
9
4
5
null
null
reiddraper/cauterize
src/Cauterize/Common/Types.hs
bsd-3-clause
builtInSize BIf32 = 4
26
builtInSize BIf32 = 4
26
builtInSize BIf32 = 4
26
false
false
0
5
8
9
4
5
null
null
begriffs/hasql-postgres
library/Hasql/Postgres/ErrorCode.hs
mit
fdw_table_not_found :: ErrorCode = "HV00R"
75
fdw_table_not_found :: ErrorCode = "HV00R"
75
fdw_table_not_found :: ErrorCode = "HV00R"
75
false
false
0
5
37
11
5
6
null
null
GaloisInc/saw-script
saw-core/src/Verifier/SAW/Module.hs
bsd-3-clause
-- | Get all datatypes in all modules in a module map allModuleDataTypes :: ModuleMap -> [DataType] allModuleDataTypes modmap = concatMap moduleDataTypes (HMap.elems modmap)
173
allModuleDataTypes :: ModuleMap -> [DataType] allModuleDataTypes modmap = concatMap moduleDataTypes (HMap.elems modmap)
119
allModuleDataTypes modmap = concatMap moduleDataTypes (HMap.elems modmap)
73
true
true
0
8
23
40
19
21
null
null
alasconnect/auth0
src/Auth0/Management/Tickets.hs
apache-2.0
ticketEmailVerifcationCreate :<|> ticketPasswordChange = client ticketsApi
78
ticketEmailVerifcationCreate :<|> ticketPasswordChange = client ticketsApi
78
ticketEmailVerifcationCreate :<|> ticketPasswordChange = client ticketsApi
78
false
false
4
5
9
20
8
12
null
null
imeckler/mote
SearchTest.hs
bsd-3-clause
-- naive algorithm for now listViews :: [a] -> [ListView a] listViews = go [] where go pre l@(x:xs) = (pre, l) : listViews (x:pre) xs go pre [] = [(pre, [])] -- Really should do something special when they're equal.
228
listViews :: [a] -> [ListView a] listViews = go [] where go pre l@(x:xs) = (pre, l) : listViews (x:pre) xs go pre [] = [(pre, [])] -- Really should do something special when they're equal.
200
listViews = go [] where go pre l@(x:xs) = (pre, l) : listViews (x:pre) xs go pre [] = [(pre, [])] -- Really should do something special when they're equal.
167
true
true
2
9
53
115
55
60
null
null
bitemyapp/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
ssNodeSecondaryIps :: String ssNodeSecondaryIps = "node_secondary_ips"
70
ssNodeSecondaryIps :: String ssNodeSecondaryIps = "node_secondary_ips"
70
ssNodeSecondaryIps = "node_secondary_ips"
41
false
true
0
6
5
18
7
11
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/ForwardingRules/Patch.hs
mpl-2.0
-- | Name of the ForwardingRule resource to patch. frpForwardingRule :: Lens' ForwardingRulesPatch Text frpForwardingRule = lens _frpForwardingRule (\ s a -> s{_frpForwardingRule = a})
192
frpForwardingRule :: Lens' ForwardingRulesPatch Text frpForwardingRule = lens _frpForwardingRule (\ s a -> s{_frpForwardingRule = a})
141
frpForwardingRule = lens _frpForwardingRule (\ s a -> s{_frpForwardingRule = a})
88
true
true
0
9
32
42
22
20
null
null
a143753/AOJ
2944.hs
apache-2.0
main = do c <- getContents let i = map (map read) $ map words $ lines c :: [[Int]] o = ans i mapM_ print o
118
main = do c <- getContents let i = map (map read) $ map words $ lines c :: [[Int]] o = ans i mapM_ print o
118
main = do c <- getContents let i = map (map read) $ map words $ lines c :: [[Int]] o = ans i mapM_ print o
118
false
false
1
15
38
74
33
41
null
null
jhartikainen/hwo2014bot
Main.hs
apache-2.0
handleChoice :: ActionChoice -> BotM IO (Maybe ActionChoice) handleChoice c = do b <- get let rs = leaderboard (b^.bCars) turboMsg <- if c /= NoChoice && b^.bTurboAvailable then handleTurbo else return Nothing if isJust turboMsg then return turboMsg else case c of ...
1,289
handleChoice :: ActionChoice -> BotM IO (Maybe ActionChoice) handleChoice c = do b <- get let rs = leaderboard (b^.bCars) turboMsg <- if c /= NoChoice && b^.bTurboAvailable then handleTurbo else return Nothing if isJust turboMsg then return turboMsg else case c of ...
1,289
handleChoice c = do b <- get let rs = leaderboard (b^.bCars) turboMsg <- if c /= NoChoice && b^.bTurboAvailable then handleTurbo else return Nothing if isJust turboMsg then return turboMsg else case c of BrakeChoice -> if ca...
1,228
false
true
0
20
585
342
165
177
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/ARB/Compatibility/Tokens.hs
bsd-3-clause
gl_COMBINE_RGB :: GLenum gl_COMBINE_RGB = 0x8571
48
gl_COMBINE_RGB :: GLenum gl_COMBINE_RGB = 0x8571
48
gl_COMBINE_RGB = 0x8571
23
false
true
0
4
5
11
6
5
null
null
ozgurakgun/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
constDocs (B32 w) = "The thirty-two-bit value 0x" ++ showIntAtBase 16 intToDigit w ""
155
constDocs (B32 w) = "The thirty-two-bit value 0x" ++ showIntAtBase 16 intToDigit w ""
155
constDocs (B32 w) = "The thirty-two-bit value 0x" ++ showIntAtBase 16 intToDigit w ""
155
false
false
0
6
83
29
13
16
null
null
wjt/bustle
Bustle/UI.hs
lgpl-2.1
aChallengerAppears :: WindowInfo -> RendererResult a -> IO () aChallengerAppears wi rr = do updateDisplayedLog wi rr canvasScrollToBottom (wiCanvas wi) setPage wi CanvasPage
223
aChallengerAppears :: WindowInfo -> RendererResult a -> IO () aChallengerAppears wi rr = do updateDisplayedLog wi rr canvasScrollToBottom (wiCanvas wi) setPage wi CanvasPage
223
aChallengerAppears wi rr = do updateDisplayedLog wi rr canvasScrollToBottom (wiCanvas wi) setPage wi CanvasPage
123
false
true
0
10
72
65
27
38
null
null
johnjcamilleri/maltese-functional-morphology
lib-1.1/General.hs
lgpl-3.0
-- could be used for morpheme boundary (+/) :: String -> String -> String s +/ t = s ++ t
89
(+/) :: String -> String -> String s +/ t = s ++ t
50
s +/ t = s ++ t
15
true
true
2
9
20
38
18
20
null
null
lambdageek/emile
src/Language/Example/MiniCore/Errors.hs
bsd-2-clause
raiseUnboundTyVar :: MonadError CoreErr m => TyVar -> m a raiseUnboundTyVar = throwError . UnboundTyVar
103
raiseUnboundTyVar :: MonadError CoreErr m => TyVar -> m a raiseUnboundTyVar = throwError . UnboundTyVar
103
raiseUnboundTyVar = throwError . UnboundTyVar
45
false
true
0
7
14
31
15
16
null
null
nna774/term
Testing/Term.hs
gpl-3.0
toInt (S t) = (+1) <$> toInt t
30
toInt (S t) = (+1) <$> toInt t
30
toInt (S t) = (+1) <$> toInt t
30
false
false
0
6
7
27
13
14
null
null
tismith/tlisp
write-yourself-a-scheme/listings/listing7.hs
mit
car :: [LispVal] -> ThrowsError LispVal car [List (x : xs)] = return x
70
car :: [LispVal] -> ThrowsError LispVal car [List (x : xs)] = return x
70
car [List (x : xs)] = return x
30
false
true
0
11
13
44
21
23
null
null
Tatsuki-I/Vihs
src/ParseCmd.hs
apache-2.0
parseIntList :: Parser [Int] parseIntList = parseInt `P.sepBy1` P.char ','
75
parseIntList :: Parser [Int] parseIntList = parseInt `P.sepBy1` P.char ','
75
parseIntList = parseInt `P.sepBy1` P.char ','
46
false
true
0
7
10
30
16
14
null
null
da-x/lamdu
Lamdu/GUI/ExpressionGui.hs
gpl-3.0
grammarLabel :: Monad m => String -> AnimId -> ExprGuiM m (ExpressionGui f) grammarLabel text animId = do config <- ExprGuiM.readConfig makeLabel text animId & ExprGuiM.localEnv (WE.setTextColor (Config.grammarColor config))
256
grammarLabel :: Monad m => String -> AnimId -> ExprGuiM m (ExpressionGui f) grammarLabel text animId = do config <- ExprGuiM.readConfig makeLabel text animId & ExprGuiM.localEnv (WE.setTextColor (Config.grammarColor config))
256
grammarLabel text animId = do config <- ExprGuiM.readConfig makeLabel text animId & ExprGuiM.localEnv (WE.setTextColor (Config.grammarColor config))
180
false
true
0
13
60
84
39
45
null
null
forste/haReFork
tools/interp/examples.hs
bsd-3-clause
ddeven = Let [(Pvar "even",evenDef),(Pvar "odd",oddDef)] (App (Var "even") (Const 3))
86
oddeven = Let [(Pvar "even",evenDef),(Pvar "odd",oddDef)] (App (Var "even") (Const 3))
86
oddeven = Let [(Pvar "even",evenDef),(Pvar "odd",oddDef)] (App (Var "even") (Const 3))
86
false
false
1
9
11
59
29
30
null
null
chadbrewbaker/shellcheck
ShellCheck/Parser.hs
gpl-3.0
g_LESSGREAT = tryToken "<>" T_LESSGREAT
39
g_LESSGREAT = tryToken "<>" T_LESSGREAT
39
g_LESSGREAT = tryToken "<>" T_LESSGREAT
39
false
false
1
5
4
15
5
10
null
null
bgold-cosmos/Tidal
src/Sound/Tidal/Params.hs
gpl-3.0
pitch3Take :: String -> [Double] -> ControlPattern pitch3Take name xs = pStateListF "pitch3" name xs
100
pitch3Take :: String -> [Double] -> ControlPattern pitch3Take name xs = pStateListF "pitch3" name xs
100
pitch3Take name xs = pStateListF "pitch3" name xs
49
false
true
0
8
14
42
18
24
null
null
hferreiro/replay
testsuite/tests/typecheck/should_compile/tc229.hs
bsd-3-clause
_hPrefix :: HPrefix l => l -> () t_hPrefix = undefined
55
t_hPrefix :: HPrefix l => l -> () t_hPrefix = undefined
55
t_hPrefix = undefined
21
false
true
0
7
11
24
12
12
null
null
jutaro/rdf4h
src/Data/RDF/Types.hs
bsd-3-clause
compareNode (LNode (TypedL bsType1 bs1)) (LNode (TypedL bsType2 bs2)) = case compare bs1 bs2 of EQ -> compare bsType1 bsType2 LT -> LT GT -> GT
173
compareNode (LNode (TypedL bsType1 bs1)) (LNode (TypedL bsType2 bs2)) = case compare bs1 bs2 of EQ -> compare bsType1 bsType2 LT -> LT GT -> GT
173
compareNode (LNode (TypedL bsType1 bs1)) (LNode (TypedL bsType2 bs2)) = case compare bs1 bs2 of EQ -> compare bsType1 bsType2 LT -> LT GT -> GT
173
false
false
0
9
55
71
34
37
null
null
bitrauser/aoc
src/AOC2015/Day06.hs
bsd-3-clause
turnOff :: Bool -> Bool turnOff _ = False
41
turnOff :: Bool -> Bool turnOff _ = False
41
turnOff _ = False
17
false
true
0
7
8
24
10
14
null
null
nobsun/oi
src/Data/OI/Combinator.hs
bsd-3-clause
zipWithOI f (b:bs) os = case deList os of Just (x,xs) -> f b x : zipWithOI f bs xs _ -> []
104
zipWithOI f (b:bs) os = case deList os of Just (x,xs) -> f b x : zipWithOI f bs xs _ -> []
104
zipWithOI f (b:bs) os = case deList os of Just (x,xs) -> f b x : zipWithOI f bs xs _ -> []
104
false
false
3
7
36
68
32
36
null
null
mtolly/dtab
src/Data/DTA/PrettyPrint.hs
bsd-3-clause
-- | Automatically chooses between horizontal and vertical arrangements, -- depending on what kind of chunks are in the tree. ppTree :: Tree -> PP.Doc ppTree (Tree _ chks) | all simpleChunk chks = PP.hsep $ map ppChunk chks | otherwise = PP.vcat $ map ppChunk chks where simpleChunk c = case c of ...
543
ppTree :: Tree -> PP.Doc ppTree (Tree _ chks) | all simpleChunk chks = PP.hsep $ map ppChunk chks | otherwise = PP.vcat $ map ppChunk chks where simpleChunk c = case c of Int _ -> True Float _ -> True Var _ -> True Sym _ -> True Unhandled ...
417
ppTree (Tree _ chks) | all simpleChunk chks = PP.hsep $ map ppChunk chks | otherwise = PP.vcat $ map ppChunk chks where simpleChunk c = case c of Int _ -> True Float _ -> True Var _ -> True Sym _ -> True Unhandled -> True _ ...
392
true
true
1
8
185
134
64
70
null
null
ghc-android/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
hsPatSynBinders :: HsValBinds RdrName -> [Located RdrName] -- Collect pattern-synonym binders only, not Ids -- See Note [SrcSpan for binders] hsPatSynBinders (ValBindsIn binds _) = foldrBag addPatSynBndr [] binds
212
hsPatSynBinders :: HsValBinds RdrName -> [Located RdrName] hsPatSynBinders (ValBindsIn binds _) = foldrBag addPatSynBndr [] binds
129
hsPatSynBinders (ValBindsIn binds _) = foldrBag addPatSynBndr [] binds
70
true
true
0
7
28
50
24
26
null
null
texodus/forml
src/hs/lib/Forml/TypeCheck.hs
bsd-3-clause
js_type :: Type js_type = Type (TypeConst "JS" (KindFunction Star Star))
72
js_type :: Type js_type = Type (TypeConst "JS" (KindFunction Star Star))
72
js_type = Type (TypeConst "JS" (KindFunction Star Star))
56
false
true
0
9
10
30
15
15
null
null
vikraman/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
isUserTypeErrorCt :: Ct -> Bool isUserTypeErrorCt ct = case getUserTypeErrorMsg ct of Just _ -> True _ -> False
166
isUserTypeErrorCt :: Ct -> Bool isUserTypeErrorCt ct = case getUserTypeErrorMsg ct of Just _ -> True _ -> False
166
isUserTypeErrorCt ct = case getUserTypeErrorMsg ct of Just _ -> True _ -> False
134
false
true
0
8
73
46
20
26
null
null
SKA-ScienceDataProcessor/RC
MS4/dna-programs/Vector.hs
apache-2.0
-- | Returns the size of the vector in bytes. Note that this will -- return @0@ for the result of "offsetVector". vectorByteSize :: forall a. Storable a => Vector a -> Int vectorByteSize v = (vectorSize v) * sizeOf (undefined :: a)
231
vectorByteSize :: forall a. Storable a => Vector a -> Int vectorByteSize v = (vectorSize v) * sizeOf (undefined :: a)
117
vectorByteSize v = (vectorSize v) * sizeOf (undefined :: a)
59
true
true
0
9
42
59
29
30
null
null
tadeuzagallo/verve-lang
src/Typing/Subtyping.hs
mit
(Forall xs p) \/ (Forall ys q) | xs == ys = Forall xs (p \/ q)
64
(Forall xs p) \/ (Forall ys q) | xs == ys = Forall xs (p \/ q)
64
(Forall xs p) \/ (Forall ys q) | xs == ys = Forall xs (p \/ q)
64
false
false
0
8
18
50
23
27
null
null
ghcjs/ghcjs-base
test/Tests/Properties/Numeric.hs
mit
j_decimal_word16 (a::Word16) = j_decimal a
42
j_decimal_word16 (a::Word16) = j_decimal a
42
j_decimal_word16 (a::Word16) = j_decimal a
42
false
false
0
7
4
19
9
10
null
null
ocramz/petsc-hs
src/Numerical/PETSc/Internal/Sized.hs
gpl-3.0
gvect :: forall n t . (Show t, KnownNat n, Num t) => [t] -> V n t gvect xs' | ok = mkV v | not (null rest) && null (tail rest) = abort (show xs') | not (null rest) = abort (init (show (xs++take 1 rest))++", ... ]") | otherwise = abort (show xs) where (xs,rest) = splitAt d xs' ok = V.length v =...
754
gvect :: forall n t . (Show t, KnownNat n, Num t) => [t] -> V n t gvect xs' | ok = mkV v | not (null rest) && null (tail rest) = abort (show xs') | not (null rest) = abort (init (show (xs++take 1 rest))++", ... ]") | otherwise = abort (show xs) where (xs,rest) = splitAt d xs' ok = V.length v =...
754
gvect xs' | ok = mkV v | not (null rest) && null (tail rest) = abort (show xs') | not (null rest) = abort (init (show (xs++take 1 rest))++", ... ]") | otherwise = abort (show xs) where (xs,rest) = splitAt d xs' ok = V.length v == d && null rest v = V.fromList xs d = fromIntegral . natV...
688
false
true
1
14
258
279
140
139
null
null
kovach/web
res0/Interpreter.hs
gpl-2.0
e2v p (ERef r) = (ERef r, p)
28
e2v p (ERef r) = (ERef r, p)
28
e2v p (ERef r) = (ERef r, p)
28
false
false
0
6
7
28
13
15
null
null
ezrakilty/narc
QCUtils.hs
bsd-2-clause
vecTor :: Int -> Gen a -> Gen [a] vecTor n _ | n < 0 = error "vector with negative # of elements"
97
vecTor :: Int -> Gen a -> Gen [a] vecTor n _ | n < 0 = error "vector with negative # of elements"
97
vecTor n _ | n < 0 = error "vector with negative # of elements"
63
false
true
0
9
23
50
22
28
null
null
fmapfmapfmap/amazonka
amazonka-cloudhsm/gen/Network/AWS/CloudHSM/CreateHSM.hs
mpl-2.0
-- | The IP address to assign to the HSM\'s ENI. chEniIP :: Lens' CreateHSM (Maybe Text) chEniIP = lens _chEniIP (\ s a -> s{_chEniIP = a})
139
chEniIP :: Lens' CreateHSM (Maybe Text) chEniIP = lens _chEniIP (\ s a -> s{_chEniIP = a})
90
chEniIP = lens _chEniIP (\ s a -> s{_chEniIP = a})
50
true
true
1
9
27
51
25
26
null
null
bergmark/http2
Network/HTTP2/Types.hs
bsd-3-clause
toErrorCodeId 0x1 = ProtocolError
33
toErrorCodeId 0x1 = ProtocolError
33
toErrorCodeId 0x1 = ProtocolError
33
false
false
1
5
3
13
4
9
null
null
gereeter/bounded-intmap
src/Data/IntMap/Bounded/Base.hs
mit
{- | /O(n+m)/. The expression (@'isSubmapOfBy' f m1 m2@) returns 'True' if all keys in @m1@ are in @m2@, and when @f@ returns 'True' when applied to their respective values. For example, the following expressions are all 'True': > isSubmapOfBy (==) (fromList [(1,1)]) (fromList [(1,1),(2,2)]) > isSubmapOfBy (<=...
804
isSubmapOfBy :: (a -> b -> Bool) -> IntMap a -> IntMap b -> Bool isSubmapOfBy f (IntMap m1) (IntMap m2) = W.isSubmapOfBy f m1 m2
128
isSubmapOfBy f (IntMap m1) (IntMap m2) = W.isSubmapOfBy f m1 m2
63
true
true
0
8
132
69
34
35
null
null
dougmvieira/MTSParser
MTS/LOB.hs
apache-2.0
validateNewOrder Sell p q p' = validateNewOrder Sell p 0 p' || (askQty p' == askQty p && bidQty p' == q && isActive p' && askPrice p' == askPrice p)
161
validateNewOrder Sell p q p' = validateNewOrder Sell p 0 p' || (askQty p' == askQty p && bidQty p' == q && isActive p' && askPrice p' == askPrice p)
161
validateNewOrder Sell p q p' = validateNewOrder Sell p 0 p' || (askQty p' == askQty p && bidQty p' == q && isActive p' && askPrice p' == askPrice p)
161
false
false
0
13
43
73
33
40
null
null
keera-studios/hssdl
Examples/NeHe/lesson02/lesson2.glut.hs
bsd-3-clause
--quadsPoint :: (GLfloat,GLfloat,GLfloat) quadsPoints :: [(GLfloat,GLfloat,GLfloat)] quadsPoints = [(-1,1,0) ,(1,1,0) ,(1,-1,0) ,(-1,-1,0)]
141
quadsPoints :: [(GLfloat,GLfloat,GLfloat)] quadsPoints = [(-1,1,0) ,(1,1,0) ,(1,-1,0) ,(-1,-1,0)]
99
quadsPoints = [(-1,1,0) ,(1,1,0) ,(1,-1,0) ,(-1,-1,0)]
56
true
true
0
8
13
87
52
35
null
null
ekmett/ghc
ghc/Main.hs
bsd-3-clause
isLinkMode _ = False
38
isLinkMode _ = False
38
isLinkMode _ = False
38
false
false
0
5
21
9
4
5
null
null
isheff/hetcons
src/Hetcons/Quorums.hs
mit
-- | Remove all (safe, live) pairs from an edge which are just supersets of those found in some other pair in that edge. -- These represent redundant information under upward closure. reduce :: Observer_Graph_Edge -> Observer_Graph_Edge reduce e = HashSet.filter (\(safe,live) -> (all (\(s,l) -> (((s,l) == (safe,live)...
389
reduce :: Observer_Graph_Edge -> Observer_Graph_Edge reduce e = HashSet.filter (\(safe,live) -> (all (\(s,l) -> (((s,l) == (safe,live)) || (s /= intersection safe s) || (l /= intersection live l))) e)) e
203
reduce e = HashSet.filter (\(safe,live) -> (all (\(s,l) -> (((s,l) == (safe,live)) || (s /= intersection safe s) || (l /= intersection live l))) e)) e
150
true
true
0
17
64
123
67
56
null
null
JoseD92/EasyGL
src/EasyGL/Obj/Obj2IM.hs
bsd-3-clause
defaultNormal Nothing = Vector3 0 0 0
38
defaultNormal Nothing = Vector3 0 0 0
38
defaultNormal Nothing = Vector3 0 0 0
38
false
false
0
5
7
16
7
9
null
null
fmthoma/ghc
compiler/rename/RnTypes.hs
bsd-3-clause
badKindBndrs :: HsDocContext -> [RdrName] -> SDoc badKindBndrs doc kvs = vcat [ hang (ptext (sLit "Unexpected kind variable") <> plural kvs <+> pprQuotedList kvs) 2 (ptext (sLit "Perhaps you intended to use PolyKinds")) , docOfHsDocContext doc ]
287
badKindBndrs :: HsDocContext -> [RdrName] -> SDoc badKindBndrs doc kvs = vcat [ hang (ptext (sLit "Unexpected kind variable") <> plural kvs <+> pprQuotedList kvs) 2 (ptext (sLit "Perhaps you intended to use PolyKinds")) , docOfHsDocContext doc ]
287
badKindBndrs doc kvs = vcat [ hang (ptext (sLit "Unexpected kind variable") <> plural kvs <+> pprQuotedList kvs) 2 (ptext (sLit "Perhaps you intended to use PolyKinds")) , docOfHsDocContext doc ]
237
false
true
0
13
79
84
41
43
null
null
jthornber/XMonadContrib
XMonad/Hooks/DebugEvents.hs
bsd-3-clause
guardSize' :: Int -> Decoder a -> Decoder a -> Decoder a guardSize' l n y = gets value >>= \vs -> fi (length vs >= l) n y
128
guardSize' :: Int -> Decoder a -> Decoder a -> Decoder a guardSize' l n y = gets value >>= \vs -> fi (length vs >= l) n y
128
guardSize' l n y = gets value >>= \vs -> fi (length vs >= l) n y
65
false
true
0
10
35
72
33
39
null
null
ezyang/ghc
compiler/nativeGen/X86/Instr.hs
bsd-3-clause
interesting _ (RegReal (RealRegPair{})) = panic "X86.interesting: no reg pairs on this arch"
101
interesting _ (RegReal (RealRegPair{})) = panic "X86.interesting: no reg pairs on this arch"
101
interesting _ (RegReal (RealRegPair{})) = panic "X86.interesting: no reg pairs on this arch"
101
false
false
1
8
21
29
13
16
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
getVesselPartsStream :: KRPCHS.SpaceCenter.Vessel -> RPCContext (KRPCStream (KRPCHS.SpaceCenter.Parts)) getVesselPartsStream thisArg = requestStream $ getVesselPartsStreamReq thisArg
182
getVesselPartsStream :: KRPCHS.SpaceCenter.Vessel -> RPCContext (KRPCStream (KRPCHS.SpaceCenter.Parts)) getVesselPartsStream thisArg = requestStream $ getVesselPartsStreamReq thisArg
182
getVesselPartsStream thisArg = requestStream $ getVesselPartsStreamReq thisArg
78
false
true
0
11
13
47
23
24
null
null
oden-lang/oden
src/Oden/Go/Importer.hs
mit
importer :: ForeignImporter importer pkgPath = do cs <- newCString pkgPath pkg' <- decodeResponse pkgPath <$> (c_GetPackage cs >>= peekCString) return (convertPackage <$> pkg')
182
importer :: ForeignImporter importer pkgPath = do cs <- newCString pkgPath pkg' <- decodeResponse pkgPath <$> (c_GetPackage cs >>= peekCString) return (convertPackage <$> pkg')
182
importer pkgPath = do cs <- newCString pkgPath pkg' <- decodeResponse pkgPath <$> (c_GetPackage cs >>= peekCString) return (convertPackage <$> pkg')
154
false
true
0
11
29
61
28
33
null
null
qpliu/esolang
blo/hs/Check.hs
gpl-3.0
astTypeName :: AstType -> String astTypeName (AstType _ name _ _ _) = name
74
astTypeName :: AstType -> String astTypeName (AstType _ name _ _ _) = name
74
astTypeName (AstType _ name _ _ _) = name
41
false
true
0
9
13
38
17
21
null
null
shlevy/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
ctEvOrigin :: CtEvidence -> CtOrigin ctEvOrigin = ctLocOrigin . ctEvLoc
71
ctEvOrigin :: CtEvidence -> CtOrigin ctEvOrigin = ctLocOrigin . ctEvLoc
71
ctEvOrigin = ctLocOrigin . ctEvLoc
34
false
true
1
7
9
27
11
16
null
null
forste/haReFork
tools/base/tests/GhcLibraries/Concurrent.hs
bsd-3-clause
--isEmptyChan :: isEmptyChan = undefined
40
isEmptyChan = undefined
23
isEmptyChan = undefined
23
true
false
1
5
4
11
4
7
null
null
zmeadows/zwerg
lib/Zwerg/Game.hs
mit
processUserInput' (MainScreen :| _) (LeftArrow) = processPlayerDirectionInput $ Cardinal West
95
processUserInput' (MainScreen :| _) (LeftArrow) = processPlayerDirectionInput $ Cardinal West
95
processUserInput' (MainScreen :| _) (LeftArrow) = processPlayerDirectionInput $ Cardinal West
95
false
false
0
7
11
28
14
14
null
null
Helkafen/haddock
haddock-api/src/Haddock/Backends/Hyperlinker/Renderer.hs
bsd-2-clause
richToken :: TokenDetails -> Token -> Html richToken det tok = tokenSpan tok ! [ multiclass style ] where style = (tokenStyle . tkType) tok ++ richTokenStyle det
171
richToken :: TokenDetails -> Token -> Html richToken det tok = tokenSpan tok ! [ multiclass style ] where style = (tokenStyle . tkType) tok ++ richTokenStyle det
171
richToken det tok = tokenSpan tok ! [ multiclass style ] where style = (tokenStyle . tkType) tok ++ richTokenStyle det
128
false
true
0
8
37
62
30
32
null
null
JacquesCarette/literate-scientific-software
code/drasil-docLang/Drasil/DocLang/SRS.hs
bsd-2-clause
specSysDes cs ss = section' (titleize Doc.specificsystemdescription) cs ss "SpecSystDesc"
90
specSysDes cs ss = section' (titleize Doc.specificsystemdescription) cs ss "SpecSystDesc"
90
specSysDes cs ss = section' (titleize Doc.specificsystemdescription) cs ss "SpecSystDesc"
90
false
false
0
8
10
28
13
15
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/ECSService.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-ecs-service.html#cfn-ecs-service-healthcheckgraceperiodseconds ecssHealthCheckGracePeriodSeconds :: Lens' ECSService (Maybe (Val Integer)) ecssHealthCheckGracePeriodSeconds = lens _eCSServiceHealthCheckGracePeriodSeconds (\s a -> s { _eCSSe...
361
ecssHealthCheckGracePeriodSeconds :: Lens' ECSService (Maybe (Val Integer)) ecssHealthCheckGracePeriodSeconds = lens _eCSServiceHealthCheckGracePeriodSeconds (\s a -> s { _eCSServiceHealthCheckGracePeriodSeconds = a })
218
ecssHealthCheckGracePeriodSeconds = lens _eCSServiceHealthCheckGracePeriodSeconds (\s a -> s { _eCSServiceHealthCheckGracePeriodSeconds = a })
142
true
true
0
9
22
52
28
24
null
null
cmoresid/lightning-haskell
src/Web/Lightning/Utilities.hs
bsd-3-clause
createPayLoad :: T.Text -- ^ The name of the type of plot to create -> Value -- ^ The plot creation request record in JSON Value format -> Value -- ^ The properly encoded payload object createPayLoad t p = object [("type", toJSON t), ("data"...
325
createPayLoad :: T.Text -- ^ The name of the type of plot to create -> Value -- ^ The plot creation request record in JSON Value format -> Value createPayLoad t p = object [("type", toJSON t), ("data", p)]
267
createPayLoad t p = object [("type", toJSON t), ("data", p)]
60
true
true
0
8
124
53
30
23
null
null
frantisekfarka/ghc-dsi
libraries/base/GHC/Foreign.hs
bsd-3-clause
-- | Marshal a Haskell string into a C string (ie, character array) with -- explicit length information. -- -- * new storage is allocated for the C string and must be -- explicitly freed using 'Foreign.Marshal.Alloc.free' or -- 'Foreign.Marshal.Alloc.finalizerFree'. -- newCStringLen :: TextEncoding -> String ->...
382
newCStringLen :: TextEncoding -> String -> IO CStringLen newCStringLen enc = newEncodedCString enc False
108
newCStringLen enc = newEncodedCString enc False
47
true
true
0
8
62
42
22
20
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Text/Greek/Script/Token.hs
mit
divideLetter L_κ = Left C_κ
27
divideLetter L_κ = Left C_κ
27
divideLetter L_κ = Left C_κ
27
false
false
0
5
4
16
7
9
null
null
genos/online_problems
advent_of_code_2019/day03/src/Main.hs
mit
step L = (& _x -~ 1)
20
step L = (& _x -~ 1)
20
step L = (& _x -~ 1)
20
false
false
0
6
6
17
9
8
null
null
svenkeidel/hsynth
src/Language/CodeGen/LLVM.hs
bsd-3-clause
fresh :: Gen L.Name fresh = state (\cgs -> let i = nextVariable cgs in (L.UnName i, cgs {nextVariable = i+1}))
110
fresh :: Gen L.Name fresh = state (\cgs -> let i = nextVariable cgs in (L.UnName i, cgs {nextVariable = i+1}))
110
fresh = state (\cgs -> let i = nextVariable cgs in (L.UnName i, cgs {nextVariable = i+1}))
90
false
true
1
13
20
67
33
34
null
null
jefdaj/todotree
old/TaskTree/Cli.hs
gpl-3.0
usage :: IO () usage = putStrLn "Usage: tt <filename>"
54
usage :: IO () usage = putStrLn "Usage: tt <filename>"
54
usage = putStrLn "Usage: tt <filename>"
39
false
true
1
6
9
22
9
13
null
null
mathologist/CTYCrypto
Ciphers.hs
gpl-3.0
genVigenere :: String -> String -> Cipher genVigenere alpha key = Cipher (vigenEncrypt alpha key) (vigenDecrypt alpha key) key (VigenKey key)
141
genVigenere :: String -> String -> Cipher genVigenere alpha key = Cipher (vigenEncrypt alpha key) (vigenDecrypt alpha key) key (VigenKey key)
141
genVigenere alpha key = Cipher (vigenEncrypt alpha key) (vigenDecrypt alpha key) key (VigenKey key)
99
false
true
0
7
20
55
27
28
null
null
brendanhay/gogol
gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs
mpl-2.0
-- | The directory on the VM to store logs. trsLogDir :: Lens' TaskRunnerSettings (Maybe Text) trsLogDir = lens _trsLogDir (\ s a -> s{_trsLogDir = a})
153
trsLogDir :: Lens' TaskRunnerSettings (Maybe Text) trsLogDir = lens _trsLogDir (\ s a -> s{_trsLogDir = a})
109
trsLogDir = lens _trsLogDir (\ s a -> s{_trsLogDir = a})
58
true
true
0
9
28
48
25
23
null
null
oldmanmike/ghc
compiler/types/Type.hs
bsd-3-clause
-- | Like mkForAllTys, but assumes all variables are dependent and invisible, -- a common case mkInvForAllTys :: [TyVar] -> Type -> Type mkInvForAllTys tvs = ASSERT( all isTyVar tvs ) mkForAllTys (map (flip Named Invisible) tvs)
249
mkInvForAllTys :: [TyVar] -> Type -> Type mkInvForAllTys tvs = ASSERT( all isTyVar tvs ) mkForAllTys (map (flip Named Invisible) tvs)
154
mkInvForAllTys tvs = ASSERT( all isTyVar tvs ) mkForAllTys (map (flip Named Invisible) tvs)
112
true
true
0
9
57
63
31
32
null
null
monsanto/hie
Hie/Language/Haskell/Exts/Annotated/Syntax.hs
gpl-3.0
tuple_tycon_name :: l -> Boxed -> Int -> QName l tuple_tycon_name l b i = tuple_con_name l b i
94
tuple_tycon_name :: l -> Boxed -> Int -> QName l tuple_tycon_name l b i = tuple_con_name l b i
94
tuple_tycon_name l b i = tuple_con_name l b i
45
false
true
0
8
18
40
19
21
null
null
ublubu/tile-rider
src/Utils/Utils.hs
mit
takeIfAll p (x:xs) | p x = fmap (x:) (takeIfAll p xs) | otherwise = Nothing
79
takeIfAll p (x:xs) | p x = fmap (x:) (takeIfAll p xs) | otherwise = Nothing
79
takeIfAll p (x:xs) | p x = fmap (x:) (takeIfAll p xs) | otherwise = Nothing
79
false
false
0
8
19
59
26
33
null
null
osa1/toylisp
src/Prim.hs
bsd-3-clause
numericBinop :: (Int -> Int -> Int) -> [TVal] -> IOThrowsError TVal numericBinop op params = if length params /= 2 then throwError $ NumArgs 2 (length params) else mapM unpackNum params >>= return . Int . foldl1 op
297
numericBinop :: (Int -> Int -> Int) -> [TVal] -> IOThrowsError TVal numericBinop op params = if length params /= 2 then throwError $ NumArgs 2 (length params) else mapM unpackNum params >>= return . Int . foldl1 op
297
numericBinop op params = if length params /= 2 then throwError $ NumArgs 2 (length params) else mapM unpackNum params >>= return . Int . foldl1 op
229
false
true
0
9
121
95
46
49
null
null
ulrikrasmussen/BoxProver
src/TwelfInterface.hs
mit
isDefn _ = True
15
isDefn _ = True
15
isDefn _ = True
15
false
false
0
5
3
9
4
5
null
null
philopon/bytestring-read
bench/main.hs
mit
checkConsumed _ = error "not consumed"
44
checkConsumed _ = error "not consumed"
44
checkConsumed _ = error "not consumed"
44
false
false
0
5
11
12
5
7
null
null
ctford/Idris-Elba-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
expl_param = Exp [] Dynamic "" True
35
expl_param = Exp [] Dynamic "" True
35
expl_param = Exp [] Dynamic "" True
35
false
false
0
6
6
17
8
9
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/book/2014-Alejandro_Serrano_Mena-Beginning_Haskell/old/code/src/C06/Main.hs
unlicense
kMeansS' :: (Vector v, Vectorizable e v) => [e] -> MyState (KMeansStateS v) [v] kMeansS' points' = (\s -> (centroidsS s,s)) `thenDoS` (\prevCentrs -> (\s -> (clusterAssignmentsS prevCentrs points', s)) `thenDoS` (\assignments -> (\s -> (newCentroidsS assignments, s)) ...
793
kMeansS' :: (Vector v, Vectorizable e v) => [e] -> MyState (KMeansStateS v) [v] kMeansS' points' = (\s -> (centroidsS s,s)) `thenDoS` (\prevCentrs -> (\s -> (clusterAssignmentsS prevCentrs points', s)) `thenDoS` (\assignments -> (\s -> (newCentroidsS assignments, s)) ...
793
kMeansS' points' = (\s -> (centroidsS s,s)) `thenDoS` (\prevCentrs -> (\s -> (clusterAssignmentsS prevCentrs points', s)) `thenDoS` (\assignments -> (\s -> (newCentroidsS assignments, s)) `thenDoS` (\newCentrs -> (\s -> ((), s { centroidsS = newC...
713
false
true
0
29
290
332
197
135
null
null
keithodulaigh/Hets
RDF/StaticAnalysis.hs
gpl-2.0
-- | static analysis of document with incoming sign. basicRDFAnalysis :: (TurtleDocument, Sign, GlobalAnnos) -> Result (TurtleDocument, ExtSign Sign RDFEntity, [Named Axiom]) basicRDFAnalysis (doc, inSign, _) = do let syms = Set.difference (symOf accSign) $ symOf inSign accSign = execState (createSign d...
426
basicRDFAnalysis :: (TurtleDocument, Sign, GlobalAnnos) -> Result (TurtleDocument, ExtSign Sign RDFEntity, [Named Axiom]) basicRDFAnalysis (doc, inSign, _) = do let syms = Set.difference (symOf accSign) $ symOf inSign accSign = execState (createSign doc) inSign axioms = map anaAxiom $ createAxio...
373
basicRDFAnalysis (doc, inSign, _) = do let syms = Set.difference (symOf accSign) $ symOf inSign accSign = execState (createSign doc) inSign axioms = map anaAxiom $ createAxioms doc return (doc, ExtSign accSign syms, axioms)
247
true
true
0
13
83
139
71
68
null
null
lshift/hc2prosody
src/Data/Machine/Tar.hs
bsd-2-clause
parseOctal :: ByteString -> Int parseOctal = foldlOf' bytes (\prev nextChar -> prev * 8 + parseOctalDigit nextChar) 0
117
parseOctal :: ByteString -> Int parseOctal = foldlOf' bytes (\prev nextChar -> prev * 8 + parseOctalDigit nextChar) 0
117
parseOctal = foldlOf' bytes (\prev nextChar -> prev * 8 + parseOctalDigit nextChar) 0
85
false
true
0
9
18
43
22
21
null
null
tonyday567/hdcharts
src/Web/Socket.hs
mit
stdinClient :: WS.ClientApp () stdinClient conn = do putStrLn "echoClient Connected!" -- Fork a thread that writes WS data to stdout _ <- forkIO $ forever $ do msg <- WS.receiveData conn liftIO $ Text.putStrLn msg -- Read from stdin and write to WS let loop' = do line...
458
stdinClient :: WS.ClientApp () stdinClient conn = do putStrLn "echoClient Connected!" -- Fork a thread that writes WS data to stdout _ <- forkIO $ forever $ do msg <- WS.receiveData conn liftIO $ Text.putStrLn msg -- Read from stdin and write to WS let loop' = do line...
458
stdinClient conn = do putStrLn "echoClient Connected!" -- Fork a thread that writes WS data to stdout _ <- forkIO $ forever $ do msg <- WS.receiveData conn liftIO $ Text.putStrLn msg -- Read from stdin and write to WS let loop' = do line <- Text.getLine un...
427
false
true
0
18
137
139
62
77
null
null
cgroza/HsRegex
HsRegex.hs
gpl-3.0
withRegexState (r:rs) st = do put st pos <- getPos len <- getTextLength if pos < len then do m <- regexGuard r s <- get if m then if length (getMatches s) > 1 then do newSts <- sortMatches $ map (withRegexState rs) (genStates s) if ...
607
withRegexState (r:rs) st = do put st pos <- getPos len <- getTextLength if pos < len then do m <- regexGuard r s <- get if m then if length (getMatches s) > 1 then do newSts <- sortMatches $ map (withRegexState rs) (genStates s) if ...
607
withRegexState (r:rs) st = do put st pos <- getPos len <- getTextLength if pos < len then do m <- regexGuard r s <- get if m then if length (getMatches s) > 1 then do newSts <- sortMatches $ map (withRegexState rs) (genStates s) if ...
607
false
false
1
20
245
201
92
109
null
null
piyush-kurur/yesod
yesod/Scaffolding/Scaffolder.hs
mit
backendBS Postgresql = $(embedFile "hsfiles/postgres.hsfiles")
62
backendBS Postgresql = $(embedFile "hsfiles/postgres.hsfiles")
62
backendBS Postgresql = $(embedFile "hsfiles/postgres.hsfiles")
62
false
false
0
7
4
16
7
9
null
null
conal/functor-combo
src/FunctorCombo/Pair.hs
bsd-3-clause
uncurryP :: (a -> a -> b) -> (Pair a -> b) uncurryP f = uncurry f . fromP
73
uncurryP :: (a -> a -> b) -> (Pair a -> b) uncurryP f = uncurry f . fromP
73
uncurryP f = uncurry f . fromP
30
false
true
0
8
18
46
23
23
null
null
ckaestne/CIDE
CIDE_Language_Haskell/test/WSP/Webserver/Response.hs
gpl-3.0
responseDescription 411 = "Length Required"
43
responseDescription 411 = "Length Required"
43
responseDescription 411 = "Length Required"
43
false
false
0
5
4
9
4
5
null
null
dgvncsz0f/nws
test/Jerimum/Tests/Unit/PostgreSQL/Types/Helpers.hs
bsd-3-clause
sign :: Integral a => a -> a sign n | n >= 0 = 1 | otherwise = -1
69
sign :: Integral a => a -> a sign n | n >= 0 = 1 | otherwise = -1
69
sign n | n >= 0 = 1 | otherwise = -1
40
false
true
1
8
23
49
22
27
null
null
ledyba/java.js
lib/Java2js/Java/ClassPath.hs
gpl-3.0
glob :: FilePath -> [FilePath] -> IO [FilePath] glob dir patterns = do (matches, _) <- globDir (map compile patterns) dir return $ concat matches -- | Append one file to ClassPath forest
191
glob :: FilePath -> [FilePath] -> IO [FilePath] glob dir patterns = do (matches, _) <- globDir (map compile patterns) dir return $ concat matches -- | Append one file to ClassPath forest
191
glob dir patterns = do (matches, _) <- globDir (map compile patterns) dir return $ concat matches -- | Append one file to ClassPath forest
143
false
true
0
11
37
75
36
39
null
null
owickstrom/dotfiles
src/Dotfiles/Packages.hs
mit
packages (Linux Yum) = ["git", "tmux", "curl", "wget", "vim-enhanced", "irssi", "ctags", "pandoc"]
98
packages (Linux Yum) = ["git", "tmux", "curl", "wget", "vim-enhanced", "irssi", "ctags", "pandoc"]
98
packages (Linux Yum) = ["git", "tmux", "curl", "wget", "vim-enhanced", "irssi", "ctags", "pandoc"]
98
false
false
0
7
11
39
23
16
null
null
ndmitchell/hlint
src/Hint/Fixities.hs
bsd-3-clause
redundantInfixBracket :: Map String Fixity -> Int -> LHsExpr GhcPs -> LHsExpr GhcPs -> Bool redundantInfixBracket fixities i parent child | L _ (OpApp _ _ (L _ (HsVar _ (L _ (Unqual p)))) _) <- parent , L _ (OpApp _ _ (L _ (HsVar _ (L _ (Unqual c)))) (L _ cr)) <- child = let (lop, rop) | i == 0 ...
619
redundantInfixBracket :: Map String Fixity -> Int -> LHsExpr GhcPs -> LHsExpr GhcPs -> Bool redundantInfixBracket fixities i parent child | L _ (OpApp _ _ (L _ (HsVar _ (L _ (Unqual p)))) _) <- parent , L _ (OpApp _ _ (L _ (HsVar _ (L _ (Unqual c)))) (L _ cr)) <- child = let (lop, rop) | i == 0 ...
619
redundantInfixBracket fixities i parent child | L _ (OpApp _ _ (L _ (HsVar _ (L _ (Unqual p)))) _) <- parent , L _ (OpApp _ _ (L _ (HsVar _ (L _ (Unqual c)))) (L _ cr)) <- child = let (lop, rop) | i == 0 = (c, p) | otherwise = (p, c) in case compareFixity <$> (fixities Data.M...
527
false
true
0
19
181
321
155
166
null
null
rahulmutt/ghcvm
compiler/Eta/Types/TyCon.hs
bsd-3-clause
okParent tc_name (AssocFamilyTyCon cls) = tc_name `elem` map tyConName (classATs cls)
90
okParent tc_name (AssocFamilyTyCon cls) = tc_name `elem` map tyConName (classATs cls)
90
okParent tc_name (AssocFamilyTyCon cls) = tc_name `elem` map tyConName (classATs cls)
90
false
false
0
8
15
36
17
19
null
null
raboof/xmobar
src/Parsers.hs
bsd-3-clause
colorParser :: Parser [(String, String)] colorParser = do c <- between (string "<fc=") (string ">") colors s <- manyTill (textParser c <|> colorParser) (try $ string "</fc>") return (concat s) -- | Parses a color specification (hex or named)
248
colorParser :: Parser [(String, String)] colorParser = do c <- between (string "<fc=") (string ">") colors s <- manyTill (textParser c <|> colorParser) (try $ string "</fc>") return (concat s) -- | Parses a color specification (hex or named)
248
colorParser = do c <- between (string "<fc=") (string ">") colors s <- manyTill (textParser c <|> colorParser) (try $ string "</fc>") return (concat s) -- | Parses a color specification (hex or named)
207
false
true
0
12
45
100
47
53
null
null
haroldcarr/learn-haskell-coq-ml-etc
math-and-functional-programming/2004-Haskell_Road_to_Logic_Maths_and_Programming/The_Haskell_Road_to_Logic_Maths_and_Programming.hs
unlicense
fld :: (t1 -> t -> t1) -> t1 -> [t] -> t1 fld f v l = fld' f v l where fld' f acc [] = acc fld' f acc (x:xs) = fld' f (f acc x) xs -- fld (\acc x -> acc + x) 0 [2,3,4,5] -- fld (\acc x -> acc + 1) 0 [2,3,4,5] -- foldl (\acc x -> acc + x) 0 [2,3,4,5] -- foldl (\acc x -> acc + 1) 0 [2,3,4,5] -- Exerci...
327
fld :: (t1 -> t -> t1) -> t1 -> [t] -> t1 fld f v l = fld' f v l where fld' f acc [] = acc fld' f acc (x:xs) = fld' f (f acc x) xs -- fld (\acc x -> acc + x) 0 [2,3,4,5] -- fld (\acc x -> acc + 1) 0 [2,3,4,5] -- foldl (\acc x -> acc + x) 0 [2,3,4,5] -- foldl (\acc x -> acc + 1) 0 [2,3,4,5] -- Exerci...
327
fld f v l = fld' f v l where fld' f acc [] = acc fld' f acc (x:xs) = fld' f (f acc x) xs -- fld (\acc x -> acc + x) 0 [2,3,4,5] -- fld (\acc x -> acc + 1) 0 [2,3,4,5] -- foldl (\acc x -> acc + x) 0 [2,3,4,5] -- foldl (\acc x -> acc + 1) 0 [2,3,4,5] -- Exercise 1.13
285
false
true
1
9
102
123
57
66
null
null
CulpaBS/wbBach
src/Language/Futhark/Parser.hs
bsd-3-clause
-- | Parse any Futhark value from the given 'String', using the 'FilePath' -- as the source name for error messages. parseValue :: FilePath -> T.Text -> Either ParseError Value parseValue = parse anyValue
215
parseValue :: FilePath -> T.Text -> Either ParseError Value parseValue = parse anyValue
98
parseValue = parse anyValue
27
true
true
0
7
44
31
16
15
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/GHC/Misc.hs
bsd-3-clause
addContext m = getContext >>= setContext . (m:)
47
addContext m = getContext >>= setContext . (m:)
47
addContext m = getContext >>= setContext . (m:)
47
false
false
0
6
7
21
11
10
null
null
urbanslug/ghc
libraries/base/GHC/ForeignPtr.hs
bsd-3-clause
insertCFinalizer :: IORef Finalizers -> Addr# -> Int# -> Addr# -> Addr# -> IO () insertCFinalizer r fp flag ep p = do MyWeak w <- ensureCFinalizerWeak r IO $ \s -> case addCFinalizerToWeak# fp p flag ep w s of (# s1, 1# #) -> (# s1, () #) -- Failed to add the finalizer because some other thread ...
583
insertCFinalizer :: IORef Finalizers -> Addr# -> Int# -> Addr# -> Addr# -> IO () insertCFinalizer r fp flag ep p = do MyWeak w <- ensureCFinalizerWeak r IO $ \s -> case addCFinalizerToWeak# fp p flag ep w s of (# s1, 1# #) -> (# s1, () #) -- Failed to add the finalizer because some other thread ...
583
insertCFinalizer r fp flag ep p = do MyWeak w <- ensureCFinalizerWeak r IO $ \s -> case addCFinalizerToWeak# fp p flag ep w s of (# s1, 1# #) -> (# s1, () #) -- Failed to add the finalizer because some other thread -- has finalized w by calling foreignPtrFinalizer. We retry now. -- This won...
500
false
true
0
14
146
144
72
72
null
null
CRogers/stack
src/Stack/Types/Version.hs
bsd-3-clause
parseVersionFromString :: MonadThrow m => String -> m Version parseVersionFromString = parseVersion . S8.pack
111
parseVersionFromString :: MonadThrow m => String -> m Version parseVersionFromString = parseVersion . S8.pack
111
parseVersionFromString = parseVersion . S8.pack
49
false
true
0
7
15
31
15
16
null
null
np/ling
Ling/Fmt/Albert/Layout.hs
bsd-3-clause
-- | Insert a number of tokens at the begninning of a list of tokens. addTokens :: Position -- ^ Position of the first new token. -> [String] -- ^ Token symbols. -> [Token] -- ^ The rest of the tokens. These will have their -- positions updated to make room for the new token...
389
addTokens :: Position -- ^ Position of the first new token. -> [String] -- ^ Token symbols. -> [Token] -- ^ The rest of the tokens. These will have their -- positions updated to make room for the new tokens . -> [Token] addTokens p ss ts = foldr (addToken p) ts ss
319
addTokens p ss ts = foldr (addToken p) ts ss
44
true
true
0
8
122
57
32
25
null
null
AndreasVoellmy/nettle-openflow
src/Network/Data/Ethernet/EthernetFrame.hs
bsd-3-clause
getMagellanP4Packet :: Get MagellanP4Packet getMagellanP4Packet = do typ <- getWord8 ingress <- getWord8 -- ingress egr <- getWord8 -- egress mc <- getWord16be -- mcgroup frame <- getEthernetFrame if typ == 1 then return $ MagellanP4PacketIn ingress frame else if typ == 2 then let out = i...
533
getMagellanP4Packet :: Get MagellanP4Packet getMagellanP4Packet = do typ <- getWord8 ingress <- getWord8 -- ingress egr <- getWord8 -- egress mc <- getWord16be -- mcgroup frame <- getEthernetFrame if typ == 1 then return $ MagellanP4PacketIn ingress frame else if typ == 2 then let out = i...
533
getMagellanP4Packet = do typ <- getWord8 ingress <- getWord8 -- ingress egr <- getWord8 -- egress mc <- getWord16be -- mcgroup frame <- getEthernetFrame if typ == 1 then return $ MagellanP4PacketIn ingress frame else if typ == 2 then let out = if mc == 0 then Left ...
489
false
true
0
14
175
137
67
70
null
null