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
hvr/vector
Data/Vector/Fusion/Stream/Monadic.hs
bsd-3-clause
foldrM f z (Stream step s) = foldrM_loop SPEC s where foldrM_loop !sPEC s = do r <- step s case r of Yield x s' -> f x =<< foldrM_loop SPEC s' Skip s' -> foldrM_loop SPEC s' Done -> return z -- | Right fold over a non-empty stream
308
foldrM f z (Stream step s) = foldrM_loop SPEC s where foldrM_loop !sPEC s = do r <- step s case r of Yield x s' -> f x =<< foldrM_loop SPEC s' Skip s' -> foldrM_loop SPEC s' Done -> return z -- | Right fold over a non-empty stream
308
foldrM f z (Stream step s) = foldrM_loop SPEC s where foldrM_loop !sPEC s = do r <- step s case r of Yield x s' -> f x =<< foldrM_loop SPEC s' Skip s' -> foldrM_loop SPEC s' Done -> return z -- | Right fold over a non-empty stream
308
false
false
1
12
128
108
46
62
null
null
pepeiborra/yices
Math/SMT/Yices/Syntax.hs
bsd-3-clause
showTypY (VarT tname) = showString tname
40
showTypY (VarT tname) = showString tname
40
showTypY (VarT tname) = showString tname
40
false
false
0
7
5
18
8
10
null
null
GaloisInc/verification-game
web-prover/src/Path.hs
bsd-3-clause
pathTerminator :: Integer pathTerminator = 1
44
pathTerminator :: Integer pathTerminator = 1
44
pathTerminator = 1
18
false
true
0
6
5
18
7
11
null
null
ekmett/ermine
src/Ermine/Pretty/Term.hs
bsd-2-clause
prettyHardTerm Hole = text "?{}"
41
prettyHardTerm Hole = text "?{}"
41
prettyHardTerm Hole = text "?{}"
41
false
false
1
5
13
15
5
10
null
null
ssaavedra/liquidhaskell
benchmarks/vector-0.10.0.1/Data/Vector.hs
bsd-3-clause
unsafeHead = G.unsafeHead
25
unsafeHead = G.unsafeHead
25
unsafeHead = G.unsafeHead
25
false
false
0
5
2
8
4
4
null
null
jmgimeno/haskell-playground
src/Zippers/comonadic-life-in-a-torus.hs
unlicense
loopWrite :: a -> LoopZipper a -> LoopZipper a loopWrite x (LZ _ rs) = LZ x rs
79
loopWrite :: a -> LoopZipper a -> LoopZipper a loopWrite x (LZ _ rs) = LZ x rs
78
loopWrite x (LZ _ rs) = LZ x rs
31
false
true
0
7
18
43
20
23
null
null
andorp/bead
src/Bead/Controller/UserStories.hs
bsd-3-clause
createCourseAdmin :: Username -> CourseKey -> UserStory () createCourseAdmin user ck = logAction INFO "sets user to course admin" $ do authorize P_Create P_CourseAdmin authorize P_Open P_User persistence $ do cas <- Persist.courseAdmins ck Persist.createCourseAdmin user ck c <- Persist.loadCourse ck...
937
createCourseAdmin :: Username -> CourseKey -> UserStory () createCourseAdmin user ck = logAction INFO "sets user to course admin" $ do authorize P_Create P_CourseAdmin authorize P_Open P_User persistence $ do cas <- Persist.courseAdmins ck Persist.createCourseAdmin user ck c <- Persist.loadCourse ck...
937
createCourseAdmin user ck = logAction INFO "sets user to course admin" $ do authorize P_Create P_CourseAdmin authorize P_Open P_User persistence $ do cas <- Persist.courseAdmins ck Persist.createCourseAdmin user ck c <- Persist.loadCourse ck now <- liftIO getCurrentTime let msg = Notificatio...
878
false
true
3
10
160
230
110
120
null
null
input-output-hk/rscoin-haskell
src/PureScript/PSTypes.hs
gpl-3.0
psIntMap :: MonadReader BridgeData m => m PSType psIntMap = do -- NOTE: this is safe because we expect IntMap to be haskells IntMap which -- has one type paramater, thus it should typecheck -- TODO: add typePackage and typeModule checkers t <- head <$> psTypeParameters pure $ TypeInfo "purescript-pr...
498
psIntMap :: MonadReader BridgeData m => m PSType psIntMap = do -- NOTE: this is safe because we expect IntMap to be haskells IntMap which -- has one type paramater, thus it should typecheck -- TODO: add typePackage and typeModule checkers t <- head <$> psTypeParameters pure $ TypeInfo "purescript-pr...
498
psIntMap = do -- NOTE: this is safe because we expect IntMap to be haskells IntMap which -- has one type paramater, thus it should typecheck -- TODO: add typePackage and typeModule checkers t <- head <$> psTypeParameters pure $ TypeInfo "purescript-prim" "Prim" "Array" [ TypeInfo "purescript...
449
false
true
0
14
141
88
42
46
null
null
fibsifan/pandoc
src/Text/Pandoc/Readers/HTML.hs
gpl-2.0
pBulletList :: TagParser Blocks pBulletList = try $ do pSatisfy (~== TagOpen "ul" []) let nonItem = pSatisfy (\t -> not (tagOpen (`elem` ["li","ol","ul","dl"]) (const True) t) && not (t ~== TagClose "ul")) -- note: if they have an <ol> or <ul> not in scope of a <li>, -- treat...
497
pBulletList :: TagParser Blocks pBulletList = try $ do pSatisfy (~== TagOpen "ul" []) let nonItem = pSatisfy (\t -> not (tagOpen (`elem` ["li","ol","ul","dl"]) (const True) t) && not (t ~== TagClose "ul")) -- note: if they have an <ol> or <ul> not in scope of a <li>, -- treat...
497
pBulletList = try $ do pSatisfy (~== TagOpen "ul" []) let nonItem = pSatisfy (\t -> not (tagOpen (`elem` ["li","ol","ul","dl"]) (const True) t) && not (t ~== TagClose "ul")) -- note: if they have an <ol> or <ul> not in scope of a <li>, -- treat it as a list item, though it's ...
465
false
true
3
19
126
170
83
87
null
null
Noeda/Megaman
src/Terminal/Terminal.hs
mit
bgToColor 47 = Just White
25
bgToColor 47 = Just White
25
bgToColor 47 = Just White
25
false
false
0
5
4
12
5
7
null
null
Soares/Storyteller.hs
src/Storyteller/Transformer.hs
mit
tell :: (Renderer r, Builder b) => r -> File -> IO (String, b) tell conf file = runStateT (runReaderT (transform file) conf) Builder.new
136
tell :: (Renderer r, Builder b) => r -> File -> IO (String, b) tell conf file = runStateT (runReaderT (transform file) conf) Builder.new
136
tell conf file = runStateT (runReaderT (transform file) conf) Builder.new
73
false
true
0
9
23
69
35
34
null
null
tjakway/ghcjvm
compiler/deSugar/DsBinds.hs
bsd-3-clause
{-********************************************************************** * * Desugaring a MonoBinds * * *******************************************************************...
580
dsTopLHsBinds :: LHsBinds Id -> DsM (OrdList (Id,CoreExpr)) dsTopLHsBinds binds = fmap (toOL . snd) (ds_lhs_binds binds)
120
dsTopLHsBinds binds = fmap (toOL . snd) (ds_lhs_binds binds)
60
true
true
0
9
200
57
30
27
null
null
jjingram/satori
src/Codegen.hs
bsd-3-clause
unit :: AST.Type unit = T.ptr $ T.StructureType False []
56
unit :: AST.Type unit = T.ptr $ T.StructureType False []
56
unit = T.ptr $ T.StructureType False []
39
false
true
0
7
9
28
14
14
null
null
katychuang/raw-pixels
src/Web/App/Users.hs
gpl-2.0
rResourceActions :: [a] rResourceActions = []
45
rResourceActions :: [a] rResourceActions = []
45
rResourceActions = []
21
false
true
0
5
5
16
9
7
null
null
pparkkin/eta
compiler/ETA/CodeGen/Prim.hs
bsd-3-clause
mkRtsPrimOp NumSparks = (parGroup, "numSparks")
61
mkRtsPrimOp NumSparks = (parGroup, "numSparks")
61
mkRtsPrimOp NumSparks = (parGroup, "numSparks")
61
false
false
0
5
18
15
8
7
null
null
rvion/lamdu
Lamdu/Builtins/Anchors.hs
gpl-3.0
consTag :: Tag consTag = "BI:cons"
34
consTag :: Tag consTag = "BI:cons"
34
consTag = "BI:cons"
19
false
true
0
4
5
11
6
5
null
null
holmisen/glbrix
src/ModelRender.hs
gpl-3.0
-------------------------------------------------------------------------------- toGLColor :: Color -> Color3 GLfloat toGLColor Black = GLColor.black
154
toGLColor :: Color -> Color3 GLfloat toGLColor Black = GLColor.black
72
toGLColor Black = GLColor.black
35
true
true
0
6
15
24
12
12
null
null
FranklinChen/music-score
sketch/NewReactive.hs
bsd-3-clause
initial :: Reactive a -> a initial (Reactive z xs) = z
54
initial :: Reactive a -> a initial (Reactive z xs) = z
54
initial (Reactive z xs) = z
27
false
true
0
6
11
33
15
18
null
null
rfranek/duckling
Duckling/Volume/GA/Corpus.hs
bsd-3-clause
corpus :: Corpus corpus = (testContext {lang = GA}, allExamples)
64
corpus :: Corpus corpus = (testContext {lang = GA}, allExamples)
64
corpus = (testContext {lang = GA}, allExamples)
47
false
true
0
7
9
25
15
10
null
null
jwiegley/ghc-release
utils/haddock/src/Haddock/Backends/LaTeX.hs
gpl-3.0
latexMunge '&' s = "{\\char '46}" ++ s
39
latexMunge '&' s = "{\\char '46}" ++ s
39
latexMunge '&' s = "{\\char '46}" ++ s
39
false
false
0
5
8
15
7
8
null
null
dbueno/funsat
etc/fiblib/Data/SequenceZipper.hs
bsd-3-clause
nsertLast x (Z ls f rs) = Z (ls |> x) f rs
43
insertLast x (Z ls f rs) = Z (ls |> x) f rs
43
insertLast x (Z ls f rs) = Z (ls |> x) f rs
43
false
false
0
7
13
35
17
18
null
null
agrafix/HSmarty
src/Text/HSmarty/Render/Engine.hs
bsd-3-clause
lookupStr :: Monad m => T.Text -> T.Text -> [(T.Text, A.Value)] -> EvalM m T.Text lookupStr funName key env = ifExists (T.concat ["Param for `", funName, "`"]) key env (str key)
181
lookupStr :: Monad m => T.Text -> T.Text -> [(T.Text, A.Value)] -> EvalM m T.Text lookupStr funName key env = ifExists (T.concat ["Param for `", funName, "`"]) key env (str key)
181
lookupStr funName key env = ifExists (T.concat ["Param for `", funName, "`"]) key env (str key)
99
false
true
0
11
34
93
48
45
null
null
puffnfresh/language-scala
src/Language/Scala.hs
mit
prettyPat (PatExtractInfix lhs op rhs) = ScalaDoc (PatGroupPattern3 op) (pretty lhs <+> pretty op <+> tupled (pretty <$> rhs))
128
prettyPat (PatExtractInfix lhs op rhs) = ScalaDoc (PatGroupPattern3 op) (pretty lhs <+> pretty op <+> tupled (pretty <$> rhs))
128
prettyPat (PatExtractInfix lhs op rhs) = ScalaDoc (PatGroupPattern3 op) (pretty lhs <+> pretty op <+> tupled (pretty <$> rhs))
128
false
false
0
10
20
57
27
30
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Xml.hs
gpl-2.0
regex_'2d'28'2d'28'3f'21'2d'3e'29'29'2b = compileRegex True "-(-(?!->))+"
73
regex_'2d'28'2d'28'3f'21'2d'3e'29'29'2b = compileRegex True "-(-(?!->))+"
73
regex_'2d'28'2d'28'3f'21'2d'3e'29'29'2b = compileRegex True "-(-(?!->))+"
73
false
false
0
5
4
11
5
6
null
null
igraves/while_language
Language/While/Interpreter.hs
lgpl-3.0
eval sto (Ident i) = eval sto (sto i)
39
eval sto (Ident i) = eval sto (sto i)
39
eval sto (Ident i) = eval sto (sto i)
39
false
false
0
7
10
30
13
17
null
null
nikai3d/ce-challenges
moderate/sudoku.hs
bsd-3-clause
sudoku :: [String] -> String sudoku [xs, ys] | sudok (read xs) (map read $ splitOn "," ys) = "True" | otherwise = "False"
179
sudoku :: [String] -> String sudoku [xs, ys] | sudok (read xs) (map read $ splitOn "," ys) = "True" | otherwise = "False"
179
sudoku [xs, ys] | sudok (read xs) (map read $ splitOn "," ys) = "True" | otherwise = "False"
142
false
true
1
11
81
71
34
37
null
null
portnov/yaledger
YaLedger/Parser/CoA.hs
bsd-3-clause
pAllAttributes :: Parser (Bool, BalanceChecks, Attributes) pAllAttributes = do redirect <- option False $ do reserved "redirect" semicolon return True infoC <- optionMaybe (bcheck "info") warningC <- optionMaybe (bcheck "warning") errorC <- optionMaybe (bchec...
417
pAllAttributes :: Parser (Bool, BalanceChecks, Attributes) pAllAttributes = do redirect <- option False $ do reserved "redirect" semicolon return True infoC <- optionMaybe (bcheck "info") warningC <- optionMaybe (bcheck "warning") errorC <- optionMaybe (bchec...
417
pAllAttributes = do redirect <- option False $ do reserved "redirect" semicolon return True infoC <- optionMaybe (bcheck "info") warningC <- optionMaybe (bcheck "warning") errorC <- optionMaybe (bcheck "error") attrs <- pAttributes return (redirect, Balan...
358
false
true
0
11
109
129
59
70
null
null
rickynils/kdmswitch
KDMSwitch.hs
bsd-3-clause
helpUsage = "<CMD>\n\n Prints help text for the given command"
63
helpUsage = "<CMD>\n\n Prints help text for the given command"
63
helpUsage = "<CMD>\n\n Prints help text for the given command"
63
false
false
0
4
10
6
3
3
null
null
ribag/ganeti-experiments
src/Ganeti/Utils/Validate.hs
gpl-2.0
-- | An utility function that runs a monadic validation action -- and returns the list of errors. execValidateT :: (Monad m) => ValidationMonadT m () -> m [String] execValidateT = liftM F.toList . execWriterT . runValidationMonad
229
execValidateT :: (Monad m) => ValidationMonadT m () -> m [String] execValidateT = liftM F.toList . execWriterT . runValidationMonad
131
execValidateT = liftM F.toList . execWriterT . runValidationMonad
65
true
true
0
9
36
58
28
30
null
null
spechub/Hets
TPTP/Parser.hs
gpl-2.0
-- <alpha_numeric> ::: (<lower_alpha>|<upper_alpha>|<numeric>|[_]) alpha_numeric :: CharParser st Char alpha_numeric = satisfy (\ c -> isAlphaNum c || c == '_') <?> "alpha_numeric"
187
alpha_numeric :: CharParser st Char alpha_numeric = satisfy (\ c -> isAlphaNum c || c == '_') <?> "alpha_numeric"
113
alpha_numeric = satisfy (\ c -> isAlphaNum c || c == '_') <?> "alpha_numeric"
77
true
true
0
11
29
43
22
21
null
null
simonmichael/hledger
hledger-lib/Hledger/Data/Dates.hs
gpl-3.0
-- | Calculate the union of two datespans. spanUnion (DateSpan b1 e1) (DateSpan b2 e2) = DateSpan b e where b = earliest b1 b2 e = latest e1 e2
159
spanUnion (DateSpan b1 e1) (DateSpan b2 e2) = DateSpan b e where b = earliest b1 b2 e = latest e1 e2
116
spanUnion (DateSpan b1 e1) (DateSpan b2 e2) = DateSpan b e where b = earliest b1 b2 e = latest e1 e2
116
true
false
0
7
45
55
27
28
null
null
damoxc/ganeti
src/Ganeti/HTools/Program/Hcheck.hs
gpl-2.0
prepareKey level@(GroupLvl idx) phase suffix = printf "%s_%s_%s_%s" (phasePrefix phase) (levelPrefix level) idx suffix
120
prepareKey level@(GroupLvl idx) phase suffix = printf "%s_%s_%s_%s" (phasePrefix phase) (levelPrefix level) idx suffix
120
prepareKey level@(GroupLvl idx) phase suffix = printf "%s_%s_%s_%s" (phasePrefix phase) (levelPrefix level) idx suffix
120
false
false
0
8
15
45
22
23
null
null
xmonad/xmonad-contrib
XMonad/Layout/Mosaic.hs
bsd-3-clause
makeTree :: (Num a1, Ord a1) => (a -> a1) -> [a] -> Tree a makeTree _ [] = Empty
81
makeTree :: (Num a1, Ord a1) => (a -> a1) -> [a] -> Tree a makeTree _ [] = Empty
81
makeTree _ [] = Empty
21
false
true
0
10
20
59
29
30
null
null
ezrakilty/narc
Database/Narc/Example.hs
bsd-2-clause
example6 = let employees = table "employees" [ ("salary", TNum) , ("name", TString) , ("manager", TString) , ("startdate", TNum) ] in let teamOf emp = foreach employees $...
1,120
example6 = let employees = table "employees" [ ("salary", TNum) , ("name", TString) , ("manager", TString) , ("startdate", TNum) ] in let teamOf emp = foreach employees $...
1,120
example6 = let employees = table "employees" [ ("salary", TNum) , ("name", TString) , ("manager", TString) , ("startdate", TNum) ] in let teamOf emp = foreach employees $...
1,120
false
false
0
23
492
313
164
149
null
null
antalsz/hs-to-coq
src/lib/HsToCoq/Util/List.hs
mit
splitCommonPrefix :: (Traversable t, Eq a) => t [a] -> ([a], t [a]) splitCommonPrefix = splitCommonPrefixOf id
110
splitCommonPrefix :: (Traversable t, Eq a) => t [a] -> ([a], t [a]) splitCommonPrefix = splitCommonPrefixOf id
110
splitCommonPrefix = splitCommonPrefixOf id
42
false
true
0
9
16
54
29
25
null
null
RaphaelJ/friday
src/Vision/Image/Filter/Internal.hs
lgpl-3.0
erode :: Ord pix => Int -> Morphological pix erode radius = Filter (ix2 size size) KernelAnchorCenter (SeparableKernel kernel kernel) (\_ _ -> ()) FilterFold1 (\_ _ _ !acc -> acc) BorderReplicate where !size = radius * 2 + 1 kernel _ _ = min
268
erode :: Ord pix => Int -> Morphological pix erode radius = Filter (ix2 size size) KernelAnchorCenter (SeparableKernel kernel kernel) (\_ _ -> ()) FilterFold1 (\_ _ _ !acc -> acc) BorderReplicate where !size = radius * 2 + 1 kernel _ _ = min
268
erode radius = Filter (ix2 size size) KernelAnchorCenter (SeparableKernel kernel kernel) (\_ _ -> ()) FilterFold1 (\_ _ _ !acc -> acc) BorderReplicate where !size = radius * 2 + 1 kernel _ _ = min
223
false
true
1
8
71
114
56
58
null
null
dterei/Scraps
haskell/weakptrs/WeakPtrs.hs
bsd-3-clause
mkW :: String -> String -> IO (Weak V) mkW ks vs = do let k = K ks v = V vs mkWeak k v Nothing
104
mkW :: String -> String -> IO (Weak V) mkW ks vs = do let k = K ks v = V vs mkWeak k v Nothing
104
mkW ks vs = do let k = K ks v = V vs mkWeak k v Nothing
65
false
true
0
11
36
68
30
38
null
null
Shadytel/Computer
Emulator/MachineInteger.hs
bsd-3-clause
awTomi (AssembledInstr i) = MachineInteger i
44
awTomi (AssembledInstr i) = MachineInteger i
44
awTomi (AssembledInstr i) = MachineInteger i
44
false
false
0
7
5
18
8
10
null
null
socrata-platform/ssync
src/main/haskell/SSync/SignatureComputer.hs
apache-2.0
signatureTableSize :: HashAlgorithm -> HashAlgorithm -> BlockSize -> Integer -> Integer signatureTableSize checksumAlg strongHashAlg (blockSizeWord -> blockSz) fileLen = let hashedPart = do produceVarInt blockSz produceShortString . T.unpack $ name strongHashAlg produceVarInt (signatureBlockSi...
1,318
signatureTableSize :: HashAlgorithm -> HashAlgorithm -> BlockSize -> Integer -> Integer signatureTableSize checksumAlg strongHashAlg (blockSizeWord -> blockSz) fileLen = let hashedPart = do produceVarInt blockSz produceShortString . T.unpack $ name strongHashAlg produceVarInt (signatureBlockSi...
1,318
signatureTableSize checksumAlg strongHashAlg (blockSizeWord -> blockSz) fileLen = let hashedPart = do produceVarInt blockSz produceShortString . T.unpack $ name strongHashAlg produceVarInt (signatureBlockSizeForBlockSize blockSz) headerFooter = do produceShortString . T.unpack $ ...
1,230
false
true
0
18
277
347
171
176
null
null
brendanhay/gogol
gogol-videointelligence/gen/Network/Google/VideoIntelligence/Types/Product.hs
mpl-2.0
-- | Feature version. g1Version :: Lens' GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation (Maybe Text) g1Version = lens _g1Version (\ s a -> s{_g1Version = a})
174
g1Version :: Lens' GoogleCloudVideointelligenceV1p1beta1_FaceDetectionAnnotation (Maybe Text) g1Version = lens _g1Version (\ s a -> s{_g1Version = a})
152
g1Version = lens _g1Version (\ s a -> s{_g1Version = a})
58
true
true
0
9
22
48
25
23
null
null
ctford/Idris-Elba-dev
src/Idris/Core/ProofState.hs
bsd-3-clause
prep_fill f as ctxt env t = fail $ "Can't prepare fill at " ++ show t
69
prep_fill f as ctxt env t = fail $ "Can't prepare fill at " ++ show t
69
prep_fill f as ctxt env t = fail $ "Can't prepare fill at " ++ show t
69
false
false
1
6
16
35
13
22
null
null
eigengrau/stylish-haskell
src/Language/Haskell/Stylish/Block.hs
bsd-3-clause
-------------------------------------------------------------------------------- spanFromSrcSpan :: H.SrcSpanInfo -> SpanBlock spanFromSrcSpan = H.srcInfoSpan >>> H.srcSpanStartColumn &&& H.srcSpanEndColumn >>> arr (uncurry Block)
238
spanFromSrcSpan :: H.SrcSpanInfo -> SpanBlock spanFromSrcSpan = H.srcInfoSpan >>> H.srcSpanStartColumn &&& H.srcSpanEndColumn >>> arr (uncurry Block)
157
spanFromSrcSpan = H.srcInfoSpan >>> H.srcSpanStartColumn &&& H.srcSpanEndColumn >>> arr (uncurry Block)
111
true
true
0
8
24
45
23
22
null
null
karamellpelle/grid
source/Game/Grid/Helpers/Path.hs
gpl-3.0
pathClearEvents :: Path -> Path pathClearEvents path = path { pathEvents = [] }
83
pathClearEvents :: Path -> Path pathClearEvents path = path { pathEvents = [] }
83
pathClearEvents path = path { pathEvents = [] }
51
false
true
0
8
17
37
17
20
null
null
TOSPIO/yi
src/library/Yi/Command.hs
gpl-2.0
configureExit _ = return ()
27
configureExit _ = return ()
27
configureExit _ = return ()
27
false
false
0
5
4
15
6
9
null
null
Mahdi89/eTeak
src/Sim.hs
bsd-3-clause
simCmd (SelectState (Just index) guardStates) (SelectCmd _ False guards) = do let state = guardStates !! index guard = guards !! index (_, (done, guardState')) <- simChanGuard state guard let guardStates' = replaceAt guardStates index guardState' case done of ...
456
simCmd (SelectState (Just index) guardStates) (SelectCmd _ False guards) = do let state = guardStates !! index guard = guards !! index (_, (done, guardState')) <- simChanGuard state guard let guardStates' = replaceAt guardStates index guardState' case done of ...
456
simCmd (SelectState (Just index) guardStates) (SelectCmd _ False guards) = do let state = guardStates !! index guard = guards !! index (_, (done, guardState')) <- simChanGuard state guard let guardStates' = replaceAt guardStates index guardState' case done of ...
456
false
false
0
14
133
150
74
76
null
null
nicball/orlin
src/Orlin/Frontend/CodeGen.hs
mit
closureType :: [IR.Type] -> IR.Type -> AST.Type closureType argTys retTy = AST.StructureType False [ AST.ptr (AST.FunctionType (fromIRType retTy) ((AST.ptr AST.i8) : (map fromIRType argTys)) False) , AST.ptr AST.i8 ]
232
closureType :: [IR.Type] -> IR.Type -> AST.Type closureType argTys retTy = AST.StructureType False [ AST.ptr (AST.FunctionType (fromIRType retTy) ((AST.ptr AST.i8) : (map fromIRType argTys)) False) , AST.ptr AST.i8 ]
232
closureType argTys retTy = AST.StructureType False [ AST.ptr (AST.FunctionType (fromIRType retTy) ((AST.ptr AST.i8) : (map fromIRType argTys)) False) , AST.ptr AST.i8 ]
184
false
true
0
14
44
108
52
56
null
null
pascal-knodel/haskell-craft
_/links/E'7'24.hs
mit
qSort' :: [Integer] -> [Integer] qSort' [] = []
47
qSort' :: [Integer] -> [Integer] qSort' [] = []
47
qSort' [] = []
14
false
true
0
6
8
28
15
13
null
null
leksah/ltk
src/Graphics/UI/Editor/MakeEditor.hs
gpl-2.0
flattenFieldDescription (NFD descrp) = concatMap (flattenFieldDescription.snd) descrp
94
flattenFieldDescription (NFD descrp) = concatMap (flattenFieldDescription.snd) descrp
94
flattenFieldDescription (NFD descrp) = concatMap (flattenFieldDescription.snd) descrp
94
false
false
0
7
15
25
12
13
null
null
christiaanb/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
from_RDR = varQual_RDR gHC_GENERICS (fsLit "from")
51
from_RDR = varQual_RDR gHC_GENERICS (fsLit "from")
51
from_RDR = varQual_RDR gHC_GENERICS (fsLit "from")
51
false
false
0
7
6
17
8
9
null
null
tjakway/ghcjvm
compiler/prelude/THNames.hs
bsd-3-clause
strTyLitIdKey = mkPreludeMiscIdUnique 401
41
strTyLitIdKey = mkPreludeMiscIdUnique 401
41
strTyLitIdKey = mkPreludeMiscIdUnique 401
41
false
false
1
5
3
12
4
8
null
null
jannschu/bitlove-ui
Handler/Thumbnails.hs
bsd-2-clause
noThumbnail :: Handler a noThumbnail = redirect $ StaticR $ StaticRoute ["stub.png"] []
87
noThumbnail :: Handler a noThumbnail = redirect $ StaticR $ StaticRoute ["stub.png"] []
87
noThumbnail = redirect $ StaticR $ StaticRoute ["stub.png"] []
62
false
true
0
7
12
32
16
16
null
null
DavidAlphaFox/darcs
src/Darcs/UI/Options/All.hs
gpl-2.0
extDiffCmd :: PrimDarcsOption (Maybe String) extDiffCmd = singleStrArg [] ["diff-command"] F.DiffCmd arg "COMMAND" "specify diff command (ignores --diff-opts)" where arg (F.DiffCmd s) = Just s arg _ = Nothing
222
extDiffCmd :: PrimDarcsOption (Maybe String) extDiffCmd = singleStrArg [] ["diff-command"] F.DiffCmd arg "COMMAND" "specify diff command (ignores --diff-opts)" where arg (F.DiffCmd s) = Just s arg _ = Nothing
222
extDiffCmd = singleStrArg [] ["diff-command"] F.DiffCmd arg "COMMAND" "specify diff command (ignores --diff-opts)" where arg (F.DiffCmd s) = Just s arg _ = Nothing
177
false
true
1
8
42
69
34
35
null
null
joris-r/labaskel
Test.hs
apache-2.0
toy s = case runBParser "B file" s of Right c -> putStrLn $ show $ prettyBComponent c Left e -> putStrLn $ show e
131
toy s = case runBParser "B file" s of Right c -> putStrLn $ show $ prettyBComponent c Left e -> putStrLn $ show e
131
toy s = case runBParser "B file" s of Right c -> putStrLn $ show $ prettyBComponent c Left e -> putStrLn $ show e
131
false
false
0
9
42
54
24
30
null
null
gizmo-mk0/kartofwar-server
src/Common.hs
unlicense
readUnitTypeCh 'C' = Cavalry
28
readUnitTypeCh 'C' = Cavalry
28
readUnitTypeCh 'C' = Cavalry
28
false
false
0
5
3
9
4
5
null
null
locaweb/leela
src/warpdrive/src/Leela/Data/Endpoint.hs
apache-2.0
loadEndpointStr :: String -> Maybe Endpoint loadEndpointStr = loadEndpoint . B8.pack
84
loadEndpointStr :: String -> Maybe Endpoint loadEndpointStr = loadEndpoint . B8.pack
84
loadEndpointStr = loadEndpoint . B8.pack
40
false
true
0
6
10
24
12
12
null
null
sgillespie/ghc
compiler/main/HscMain.hs
bsd-3-clause
handleWarnings :: Hsc () handleWarnings = do dflags <- getDynFlags w <- getWarnings liftIO $ printOrThrowWarnings dflags w clearWarnings -- | log warning in the monad, and if there are errors then -- throw a SourceError exception.
247
handleWarnings :: Hsc () handleWarnings = do dflags <- getDynFlags w <- getWarnings liftIO $ printOrThrowWarnings dflags w clearWarnings -- | log warning in the monad, and if there are errors then -- throw a SourceError exception.
247
handleWarnings = do dflags <- getDynFlags w <- getWarnings liftIO $ printOrThrowWarnings dflags w clearWarnings -- | log warning in the monad, and if there are errors then -- throw a SourceError exception.
222
false
true
0
8
53
47
22
25
null
null
brendanhay/gogol
gogol-books/gen/Network/Google/Resource/Books/MyLibrary/Annotations/List.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). mlalUploadType :: Lens' MyLibraryAnnotationsList (Maybe Text) mlalUploadType = lens _mlalUploadType (\ s a -> s{_mlalUploadType = a})
212
mlalUploadType :: Lens' MyLibraryAnnotationsList (Maybe Text) mlalUploadType = lens _mlalUploadType (\ s a -> s{_mlalUploadType = a})
141
mlalUploadType = lens _mlalUploadType (\ s a -> s{_mlalUploadType = a})
79
true
true
0
9
34
48
25
23
null
null
Dronte/Operads
Math/Operad/OperadGB.hs
bsd-3-clause
operadicBuchberger :: (Ord a, Show a, TreeOrdering t, Fractional n, Eq n, Show n) => [OperadElement a n t] -> [OperadElement a n t] operadicBuchberger gb = nub $ streamOperadicBuchberger maxBound (reduceBasis [] gb)
215
operadicBuchberger :: (Ord a, Show a, TreeOrdering t, Fractional n, Eq n, Show n) => [OperadElement a n t] -> [OperadElement a n t] operadicBuchberger gb = nub $ streamOperadicBuchberger maxBound (reduceBasis [] gb)
215
operadicBuchberger gb = nub $ streamOperadicBuchberger maxBound (reduceBasis [] gb)
83
false
true
0
9
33
96
48
48
null
null
UCSD-PL/nano-js
Language/Nano/Typecheck/TCMonad.hs
bsd-3-clause
unifyTypes :: (IsLocated l) => l -> String -> [Type] -> [Type] -> TCM Subst ---------------------------------------------------------------------------------- unifyTypes l msg t1s t2s | length t1s /= length t2s = tcError l errorArgMismatch | otherwise = do θ <- getSubst ...
498
unifyTypes :: (IsLocated l) => l -> String -> [Type] -> [Type] -> TCM Subst unifyTypes l msg t1s t2s | length t1s /= length t2s = tcError l errorArgMismatch | otherwise = do θ <- getSubst case unifys θ t1s t2s of Left msg' -> tcE...
415
unifyTypes l msg t1s t2s | length t1s /= length t2s = tcError l errorArgMismatch | otherwise = do θ <- getSubst case unifys θ t1s t2s of Left msg' -> tcError l $ msg ++ msg' Right θ' -> setSub...
339
true
true
1
13
189
149
68
81
null
null
Concomitant/LambdaHack
GameDefinition/Content/ItemKind.hs
bsd-3-clause
-- * Non-periodic jewelry sightSharpening = ItemKind { isymbol = symbolRing , iname = "Sharp Monocle" , ifreq = [("treasure", 100)] , iflavour = zipPlain [White] , icount = 1 , irarity = [(7, 3), (10, 3)] -- medium weak, medium shallow , iverbHit = "rap" , iweight = 50 , iaspects = [Uniqu...
558
sightSharpening = ItemKind { isymbol = symbolRing , iname = "Sharp Monocle" , ifreq = [("treasure", 100)] , iflavour = zipPlain [White] , icount = 1 , irarity = [(7, 3), (10, 3)] -- medium weak, medium shallow , iverbHit = "rap" , iweight = 50 , iaspects = [Unique, AddSight $ 1 + d 2, AddH...
531
sightSharpening = ItemKind { isymbol = symbolRing , iname = "Sharp Monocle" , ifreq = [("treasure", 100)] , iflavour = zipPlain [White] , icount = 1 , irarity = [(7, 3), (10, 3)] -- medium weak, medium shallow , iverbHit = "rap" , iweight = 50 , iaspects = [Unique, AddSight $ 1 + d 2, AddH...
531
true
false
0
11
159
177
108
69
null
null
rsasse/tamarin-prover
src/Main/TheoryLoader.hs
gpl-3.0
closeDiffThy :: Arguments -> OpenDiffTheory -> IO ClosedDiffTheory closeDiffThy as thy0 = do -- FIXME: wf-check is at the wrong position here. Needs to be more -- fine-grained. let thy2 = wfCheckDiff thy0 -- close and prove cthy <- closeDiffTheory (maudePath as) (addDefaultDiffLemma thy2) return $ proveDiff...
2,064
closeDiffThy :: Arguments -> OpenDiffTheory -> IO ClosedDiffTheory closeDiffThy as thy0 = do -- FIXME: wf-check is at the wrong position here. Needs to be more -- fine-grained. let thy2 = wfCheckDiff thy0 -- close and prove cthy <- closeDiffTheory (maudePath as) (addDefaultDiffLemma thy2) return $ proveDiff...
2,064
closeDiffThy as thy0 = do -- FIXME: wf-check is at the wrong position here. Needs to be more -- fine-grained. let thy2 = wfCheckDiff thy0 -- close and prove cthy <- closeDiffTheory (maudePath as) (addDefaultDiffLemma thy2) return $ proveDiffTheory lemmaSelector diffLemmaSelector prover diffprover $ partialE...
1,997
false
true
2
10
591
394
194
200
null
null
geekingfrog/advent-of-code
src/Y2017/Day25.hs
bsd-3-clause
right (Tape xs e (y:ys)) = Tape (e:xs) y ys
43
right (Tape xs e (y:ys)) = Tape (e:xs) y ys
43
right (Tape xs e (y:ys)) = Tape (e:xs) y ys
43
false
false
0
8
9
41
20
21
null
null
edom/sound
src/Sound/InfList.hs
bsd-3-clause
{- | Map a stream of natural numbers sorted ascending. @ lgenerate f = 'fmap' f ('literate' 'succ' 0) @ @ lgenerate f = \< f 0, f 1, f 2, ... \> @ -} lgenerate :: (Int -> a) -> L a lgenerate f = lunfoldr (1 +) f 0
215
lgenerate :: (Int -> a) -> L a lgenerate f = lunfoldr (1 +) f 0
63
lgenerate f = lunfoldr (1 +) f 0
32
true
true
0
8
52
44
22
22
null
null
jean-edouard/manager
xenmgr/XenMgr/CdLock.hs
gpl-2.0
unassignStickyCdDevice :: BSGDevice -> Rpc () unassignStickyCdDevice dev = do dbRm (cdDeviceStickyNode dev) unassignCdDevice dev
132
unassignStickyCdDevice :: BSGDevice -> Rpc () unassignStickyCdDevice dev = do dbRm (cdDeviceStickyNode dev) unassignCdDevice dev
132
unassignStickyCdDevice dev = do dbRm (cdDeviceStickyNode dev) unassignCdDevice dev
86
false
true
0
9
18
41
18
23
null
null
tjakway/ghcjvm
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
nested_compose_Expr :: [LHsExpr RdrName] -> LHsExpr RdrName nested_compose_Expr [] = panic "nested_compose_expr"
114
nested_compose_Expr :: [LHsExpr RdrName] -> LHsExpr RdrName nested_compose_Expr [] = panic "nested_compose_expr"
113
nested_compose_Expr [] = panic "nested_compose_expr"
53
false
true
0
7
13
32
15
17
null
null
gereeter/cola
src/Data/Vector/Fusion/Stream/Merge.hs
mit
mergeStreamsWith :: (Monad m, Ord i) => (a -> a -> Maybe a) -> Stream m (i, a) -> Stream m (i, a) -> Stream m (i, a) mergeStreamsWith f (Stream stepa sa0 na) (Stream stepb sb0 nb) = Stream step (MergeStart sa0 sb0) (toMax na + toMax nb) where step (MergeStart sa sb) = do r <- stepa sa return $...
1,832
mergeStreamsWith :: (Monad m, Ord i) => (a -> a -> Maybe a) -> Stream m (i, a) -> Stream m (i, a) -> Stream m (i, a) mergeStreamsWith f (Stream stepa sa0 na) (Stream stepb sb0 nb) = Stream step (MergeStart sa0 sb0) (toMax na + toMax nb) where step (MergeStart sa sb) = do r <- stepa sa return $...
1,832
mergeStreamsWith f (Stream stepa sa0 na) (Stream stepb sb0 nb) = Stream step (MergeStart sa0 sb0) (toMax na + toMax nb) where step (MergeStart sa sb) = do r <- stepa sa return $ case r of Yield (i, a) sa' -> Skip (MergeL sa' sb i a) Skip sa' -> Skip (MergeStart sa' sb) Done ...
1,701
false
true
0
21
663
901
441
460
null
null
eddywestbrook/hobbits
archival/Bench/LocallyNameless.hs
bsd-3-clause
-- examples zero = Lam (Lam (BVar 1))
38
zero = Lam (Lam (BVar 1))
25
zero = Lam (Lam (BVar 1))
25
true
false
0
9
8
22
11
11
null
null
coolhacks/scripts-hacks
examples/shellcheck-master/ShellCheck/Analytics.hs
mit
prop_checkForInCat1 = verify checkForInCat "for f in $(cat foo); do stuff; done"
80
prop_checkForInCat1 = verify checkForInCat "for f in $(cat foo); do stuff; done"
80
prop_checkForInCat1 = verify checkForInCat "for f in $(cat foo); do stuff; done"
80
false
false
0
5
11
11
5
6
null
null
nevrenato/Hets_Fork
OWL2/XMLKeywords.hs
gpl-2.0
objectInverseOfK :: String objectInverseOfK = "ObjectInverseOf"
63
objectInverseOfK :: String objectInverseOfK = "ObjectInverseOf"
63
objectInverseOfK = "ObjectInverseOf"
36
false
true
0
4
5
11
6
5
null
null
toddmohney/json-api
src/Network/JSONApi/Pagination.hs
mit
strategyToQueryStringNumberKey OffsetStrategy = "page[offset]"
62
strategyToQueryStringNumberKey OffsetStrategy = "page[offset]"
62
strategyToQueryStringNumberKey OffsetStrategy = "page[offset]"
62
false
false
0
5
3
9
4
5
null
null
teuffy/min-var-ci
src/FP/ImportWizard/Handler/Home.hs
mit
createProject :: IWData -> Handler Html createProject data_ = do (tempToken, tempPath) <- newTempToken liftIO $ do FS.createTree tempPath runSystem "cp" ["-r", "skel/.", Path.encodeString tempPath] runSystem "rm" ["-rf", Path.encodeString $ tempPath </> "src" </> "Skel"] generate...
1,405
createProject :: IWData -> Handler Html createProject data_ = do (tempToken, tempPath) <- newTempToken liftIO $ do FS.createTree tempPath runSystem "cp" ["-r", "skel/.", Path.encodeString tempPath] runSystem "rm" ["-rf", Path.encodeString $ tempPath </> "src" </> "Skel"] generate...
1,405
createProject data_ = do (tempToken, tempPath) <- newTempToken liftIO $ do FS.createTree tempPath runSystem "cp" ["-r", "skel/.", Path.encodeString tempPath] runSystem "rm" ["-rf", Path.encodeString $ tempPath </> "src" </> "Skel"] generatedCode <- generateCode data_ forM...
1,365
false
true
0
18
390
366
179
187
null
null
mtolly/golfscript
src/Language/GolfScript/Prelude.hs
gpl-3.0
dot :: (Monad m) => Golf m () dot = pop >>= \x -> push x >> push x
66
dot :: (Monad m) => Golf m () dot = pop >>= \x -> push x >> push x
66
dot = pop >>= \x -> push x >> push x
36
false
true
0
8
18
46
23
23
null
null
DrNico/byoparser
Text/ByoParser/Result.hs
mit
feed (PMore f) i = f i
22
feed (PMore f) i = f i
22
feed (PMore f) i = f i
22
false
false
0
7
6
20
9
11
null
null
masaedw/PuddingX
src/Pudding/Words.hs
bsd-3-clause
over :: Monad m => PProc m over = do [w2, w1] <- popN 2 mapM_ push [w1, w2, w1]
83
over :: Monad m => PProc m over = do [w2, w1] <- popN 2 mapM_ push [w1, w2, w1]
83
over = do [w2, w1] <- popN 2 mapM_ push [w1, w2, w1]
56
false
true
0
8
23
54
27
27
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 6580783 = 3684
34
getValueFromProduct 6580783 = 3684
34
getValueFromProduct 6580783 = 3684
34
false
false
0
5
3
9
4
5
null
null
aniketd/learn.haskell
haskellbook/hangman/hangman/src/Main.hs
unlicense
gameWin :: Puzzle -> IO () gameWin (Puzzle _ filledInSoFar _) = if all isJust filledInSoFar then do putStrLn "You win!" exitSuccess else return ()
161
gameWin :: Puzzle -> IO () gameWin (Puzzle _ filledInSoFar _) = if all isJust filledInSoFar then do putStrLn "You win!" exitSuccess else return ()
161
gameWin (Puzzle _ filledInSoFar _) = if all isJust filledInSoFar then do putStrLn "You win!" exitSuccess else return ()
134
false
true
0
8
39
60
28
32
null
null
NicolasDP/hs-packer
Data/Packer/IO.hs
bsd-2-clause
trimeBytes :: ByteArray bytes => bytes -> Int -> IO bytes trimeBytes src size = B.create size $ \ptrDst -> B.withByteArray src $ \ptrSrc -> B.memCopy ptrDst ptrSrc size
217
trimeBytes :: ByteArray bytes => bytes -> Int -> IO bytes trimeBytes src size = B.create size $ \ptrDst -> B.withByteArray src $ \ptrSrc -> B.memCopy ptrDst ptrSrc size
217
trimeBytes src size = B.create size $ \ptrDst -> B.withByteArray src $ \ptrSrc -> B.memCopy ptrDst ptrSrc size
126
false
true
0
10
77
71
34
37
null
null
airt/Haskell-99
src/NinetyNine/Parser/Combinator.hs
mit
option :: a -> Parser a -> Parser a option x p = p <|> return x
63
option :: a -> Parser a -> Parser a option x p = p <|> return x
63
option x p = p <|> return x
27
false
true
3
8
16
45
20
25
null
null
awakenetworks/gRPC-haskell
core/src/Network/GRPC/LowLevel/Client.hs
apache-2.0
destroyClient :: Client -> IO () destroyClient Client{..} = do grpcDebug "destroyClient: calling grpc_channel_destroy()" C.grpcChannelDestroy clientChannel grpcDebug "destroyClient: shutting down CQ." shutdownResult <- shutdownCompletionQueue clientCQ case shutdownResult of Left x -> do putStrLn $ "Failed...
434
destroyClient :: Client -> IO () destroyClient Client{..} = do grpcDebug "destroyClient: calling grpc_channel_destroy()" C.grpcChannelDestroy clientChannel grpcDebug "destroyClient: shutting down CQ." shutdownResult <- shutdownCompletionQueue clientCQ case shutdownResult of Left x -> do putStrLn $ "Failed...
434
destroyClient Client{..} = do grpcDebug "destroyClient: calling grpc_channel_destroy()" C.grpcChannelDestroy clientChannel grpcDebug "destroyClient: shutting down CQ." shutdownResult <- shutdownCompletionQueue clientCQ case shutdownResult of Left x -> do putStrLn $ "Failed to stop client CQ: " ++ show x ...
401
false
true
1
14
89
119
49
70
null
null
Ongy/monky
Monky/Examples/Images.hs
lgpl-3.0
-- | MonkyImage for memory (RAM (it's a ram)) memoryImage :: MonkyOut memoryImage = MonkyImage "mem" '🐏'
106
memoryImage :: MonkyOut memoryImage = MonkyImage "mem" '🐏'
60
memoryImage = MonkyImage "mem" '🐏'
36
true
true
0
5
18
17
9
8
null
null
Lythimus/lptv
sites/all/modules/jgm-pandoc-8be6cc2/src/Text/Pandoc/Writers/OpenDocument.hs
gpl-2.0
textStyleAttr :: TextStyle -> [(String,String)] textStyleAttr s | Italic <- s = [("fo:font-style" ,"italic" ) ,("style:font-style-asian" ,"italic" ) ,("style:font-style-complex" ,"italic" )] | Bold <- s = [("fo:font-weight" ...
772
textStyleAttr :: TextStyle -> [(String,String)] textStyleAttr s | Italic <- s = [("fo:font-style" ,"italic" ) ,("style:font-style-asian" ,"italic" ) ,("style:font-style-complex" ,"italic" )] | Bold <- s = [("fo:font-weight" ...
772
textStyleAttr s | Italic <- s = [("fo:font-style" ,"italic" ) ,("style:font-style-asian" ,"italic" ) ,("style:font-style-complex" ,"italic" )] | Bold <- s = [("fo:font-weight" ,"bold" ) ,("style:fo...
724
false
true
1
8
296
212
119
93
null
null
matthewSorensen/himpress
Himpress/Modes/Text.hs
bsd-3-clause
markdown = pandoc "markdown" readMarkdown
41
markdown = pandoc "markdown" readMarkdown
41
markdown = pandoc "markdown" readMarkdown
41
false
false
1
5
4
15
5
10
null
null
andorp/bead
src/Bead/View/ContentHandler.hs
bsd-3-clause
renderPublicPage :: IHtml -> BeadHandler' b () renderPublicPage p = do language <- languageFromSession t <- maybe (return Nothing) getDictionary language let translator = maybe trans unDictionary t blaze $ translate translator p -- Renders the public page selecting the I18N translation based on the -- language...
413
renderPublicPage :: IHtml -> BeadHandler' b () renderPublicPage p = do language <- languageFromSession t <- maybe (return Nothing) getDictionary language let translator = maybe trans unDictionary t blaze $ translate translator p -- Renders the public page selecting the I18N translation based on the -- language...
413
renderPublicPage p = do language <- languageFromSession t <- maybe (return Nothing) getDictionary language let translator = maybe trans unDictionary t blaze $ translate translator p -- Renders the public page selecting the I18N translation based on the -- language stored in the session, if there is no such val...
366
false
true
0
10
72
83
39
44
null
null
artuuge/IHaskell
ipython-kernel/examples/Calc.hs
mit
operator :: Parsec String a String operator = P.operator lexer
62
operator :: Parsec String a String operator = P.operator lexer
62
operator = P.operator lexer
27
false
true
0
6
9
23
11
12
null
null
bergmark/http2
Network/HTTP2/Types.hs
bsd-3-clause
toErrorCodeId 0x6 = FrameSizeError
34
toErrorCodeId 0x6 = FrameSizeError
34
toErrorCodeId 0x6 = FrameSizeError
34
false
false
1
5
3
13
4
9
null
null
jtdawso/remote-haxl
tests/Test.hs
bsd-3-clause
runWP :: IORef [String] -> IORef [A] -> WP.WeakPacket C P a -> IO a runWP tr ref (WP.Command (Push a)) = do stack <- readIORef ref writeIORef ref (a : stack) modifyIORef tr (("push " ++ show a) :) return ()
222
runWP :: IORef [String] -> IORef [A] -> WP.WeakPacket C P a -> IO a runWP tr ref (WP.Command (Push a)) = do stack <- readIORef ref writeIORef ref (a : stack) modifyIORef tr (("push " ++ show a) :) return ()
222
runWP tr ref (WP.Command (Push a)) = do stack <- readIORef ref writeIORef ref (a : stack) modifyIORef tr (("push " ++ show a) :) return ()
154
false
true
0
11
57
123
58
65
null
null
bitc/hs-watchman
src/System/Directory/Watchman/Fields.hs
mit
renderFileFieldLabel FLino = "ino"
34
renderFileFieldLabel FLino = "ino"
34
renderFileFieldLabel FLino = "ino"
34
false
false
0
5
3
9
4
5
null
null
Lokidottir/unify-terms
src/Term/Unify/GraphUtil.hs
bsd-3-clause
updateNode :: forall gr n e. (DynGraph gr) => Node -> (n -> n) -> gr n e -> gr n e updateNode n f gr = flip execState gr $ do n'valMaybe <- gets lab <*> pure n -- Apply the update function to the node's value if it's there case f <$> n'valMaybe of -- If the node doesn't exist, then just return the g...
985
updateNode :: forall gr n e. (DynGraph gr) => Node -> (n -> n) -> gr n e -> gr n e updateNode n f gr = flip execState gr $ do n'valMaybe <- gets lab <*> pure n -- Apply the update function to the node's value if it's there case f <$> n'valMaybe of -- If the node doesn't exist, then just return the g...
985
updateNode n f gr = flip execState gr $ do n'valMaybe <- gets lab <*> pure n -- Apply the update function to the node's value if it's there case f <$> n'valMaybe of -- If the node doesn't exist, then just return the graph as is Nothing -> return () -- If the node does exist, update i...
902
false
true
0
20
333
238
115
123
null
null
alexstachnik/High-Level-C
src/Language/HLC/Quasi/EscapeTypeDefs.hs
gpl-2.0
escapeSeq :: Parsec String u String escapeSeq = do _ <- string "$$" str <- manyTill anyChar ((space >> return ()) <|> eof) return ("$$" ++ str)
149
escapeSeq :: Parsec String u String escapeSeq = do _ <- string "$$" str <- manyTill anyChar ((space >> return ()) <|> eof) return ("$$" ++ str)
149
escapeSeq = do _ <- string "$$" str <- manyTill anyChar ((space >> return ()) <|> eof) return ("$$" ++ str)
113
false
true
0
14
32
72
34
38
null
null
robeverest/accelerate
Data/Array/Accelerate/Trafo/Sharing.hs
bsd-3-clause
-- | Convert an array expression with given array environment layout and sharing information into -- de Bruijn form while recovering sharing at the same time (by introducing appropriate let -- bindings). The latter implements the third phase of sharing recovery. -- -- The sharing environment 'env' keeps track of all c...
1,154
convertSharingAcc :: forall aenv arrs. Arrays arrs => Config -> Layout aenv aenv -> [StableSharingAcc] -> SharingAcc arrs -> AST.OpenAcc aenv arrs convertSharingAcc _ alyt aenv (AvarSharing sa) | Just i <- findIndex (matchStableAcc sa) aenv = AST.OpenAcc $ AST.Avar (prjIdx (ctxt ++ "; i = " ...
702
convertSharingAcc _ alyt aenv (AvarSharing sa) | Just i <- findIndex (matchStableAcc sa) aenv = AST.OpenAcc $ AST.Avar (prjIdx (ctxt ++ "; i = " ++ show i) i alyt) | null aenv = error $ "Cyclic definition of a value of type 'Acc' (sa = " ++ show (hashStableNameHeight sa) ++ ")" | otherwise = INT...
531
true
true
6
14
243
249
117
132
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/RegionBackendServices/GetHealth.hs
mpl-2.0
-- | Multipart request metadata. rbsghPayload :: Lens' RegionBackendServicesGetHealth ResourceGroupReference rbsghPayload = lens _rbsghPayload (\ s a -> s{_rbsghPayload = a})
176
rbsghPayload :: Lens' RegionBackendServicesGetHealth ResourceGroupReference rbsghPayload = lens _rbsghPayload (\ s a -> s{_rbsghPayload = a})
143
rbsghPayload = lens _rbsghPayload (\ s a -> s{_rbsghPayload = a})
67
true
true
1
9
22
46
22
24
null
null
nek0/affection
examples/example00/Main.hs
lgpl-3.0
update :: StateData -> Double -> Affection () update _ _ = return ()
68
update :: StateData -> Double -> Affection () update _ _ = return ()
68
update _ _ = return ()
22
false
true
0
8
13
34
16
18
null
null
gsdlab/clafer
src/Language/Clafer/Intermediate/Desugarer.hs
mit
sugarDeclaration (IEConstraint False assertion) = ElementDecl (_inPos assertion) $ SubAssertion (_inPos assertion) $ sugarAssertion assertion
148
sugarDeclaration (IEConstraint False assertion) = ElementDecl (_inPos assertion) $ SubAssertion (_inPos assertion) $ sugarAssertion assertion
148
sugarDeclaration (IEConstraint False assertion) = ElementDecl (_inPos assertion) $ SubAssertion (_inPos assertion) $ sugarAssertion assertion
148
false
false
0
9
21
46
21
25
null
null
tjakway/ghcjvm
compiler/utils/Util.hs
bsd-3-clause
restrictedDamerauLevenshteinDistanceWithLengths :: Int -> Int -> String -> String -> Int restrictedDamerauLevenshteinDistanceWithLengths m n str1 str2 | m <= n = if n <= 32 -- n must be larger so this check is sufficient then restrictedDamerauLevenshteinDistance' (undefined :: Word32) m n str1 str2 else r...
638
restrictedDamerauLevenshteinDistanceWithLengths :: Int -> Int -> String -> String -> Int restrictedDamerauLevenshteinDistanceWithLengths m n str1 str2 | m <= n = if n <= 32 -- n must be larger so this check is sufficient then restrictedDamerauLevenshteinDistance' (undefined :: Word32) m n str1 str2 else r...
638
restrictedDamerauLevenshteinDistanceWithLengths m n str1 str2 | m <= n = if n <= 32 -- n must be larger so this check is sufficient then restrictedDamerauLevenshteinDistance' (undefined :: Word32) m n str1 str2 else restrictedDamerauLevenshteinDistance' (undefined :: Integer) m n str1 str2 | otherwise ...
547
false
true
0
10
114
156
80
76
null
null
mightymoose/liquidhaskell
tests/pos/vector1b.hs
bsd-3-clause
dotProd v1 v2 = for 0 n 0 $ \i -> (((v1!i) * (v2!i)) +) where n = Data.Vector.length v1
89
dotProd v1 v2 = for 0 n 0 $ \i -> (((v1!i) * (v2!i)) +) where n = Data.Vector.length v1
89
dotProd v1 v2 = for 0 n 0 $ \i -> (((v1!i) * (v2!i)) +) where n = Data.Vector.length v1
89
false
false
0
11
21
66
35
31
null
null
yeyan/timesheet-helper
src/Main.hs
lgpl-3.0
printTable rows = do let colWidths = map (foldl1 max) $ transpose $ map (map length) rows tableWidth = length colWidths * 3 + 1 + sum colWidths cell (len, msg) = " " ++ msg ++ " " ++ replicate (len - length msg) ' ' seperator = putStrLn $ replicate tableWidth '=' seperator mapM_ pu...
443
printTable rows = do let colWidths = map (foldl1 max) $ transpose $ map (map length) rows tableWidth = length colWidths * 3 + 1 + sum colWidths cell (len, msg) = " " ++ msg ++ " " ++ replicate (len - length msg) ' ' seperator = putStrLn $ replicate tableWidth '=' seperator mapM_ pu...
443
printTable rows = do let colWidths = map (foldl1 max) $ transpose $ map (map length) rows tableWidth = length colWidths * 3 + 1 + sum colWidths cell (len, msg) = " " ++ msg ++ " " ++ replicate (len - length msg) ' ' seperator = putStrLn $ replicate tableWidth '=' seperator mapM_ pu...
443
false
false
0
16
122
201
97
104
null
null
brendanhay/gogol
gogol-remotebuildexecution/gen/Network/Google/RemoteBuildExecution/Types/Product.hs
mpl-2.0
-- | The envvar value. gdrvctievValue :: Lens' GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable (Maybe Text) gdrvctievValue = lens _gdrvctievValue (\ s a -> s{_gdrvctievValue = a})
210
gdrvctievValue :: Lens' GoogleDevtoolsRemoteworkersV1test2CommandTaskInputsEnvironmentVariable (Maybe Text) gdrvctievValue = lens _gdrvctievValue (\ s a -> s{_gdrvctievValue = a})
187
gdrvctievValue = lens _gdrvctievValue (\ s a -> s{_gdrvctievValue = a})
79
true
true
0
9
29
48
25
23
null
null
vladimir-ipatov/ganeti
src/Ganeti/Query/Node.hs
gpl-2.0
getAttrFromStorageInfo _ Nothing = J.JSNull
43
getAttrFromStorageInfo _ Nothing = J.JSNull
43
getAttrFromStorageInfo _ Nothing = J.JSNull
43
false
false
1
6
4
15
6
9
null
null
NicolasDP/maild
Network/SMTP/Auth.hs
bsd-3-clause
-- | identify a user with the PLAIN method clientPlain :: UserName -> Password -> BC.ByteString clientPlain user passwd = B64.encode $ BC.intercalate (BC.pack "\0") [ user , passwd ]
246
clientPlain :: UserName -> Password -> BC.ByteString clientPlain user passwd = B64.encode $ BC.intercalate (BC.pack "\0") [ user , passwd ]
203
clientPlain user passwd = B64.encode $ BC.intercalate (BC.pack "\0") [ user , passwd ]
150
true
true
0
9
93
54
28
26
null
null
nushio3/Paraiso
attic/QuasiQuote/JSON.hs
bsd-3-clause
parseExp :: String -> ExpQ parseExp = parseQa (dataToExpQ $ const Nothing `extQ` antiQuoteE)
92
parseExp :: String -> ExpQ parseExp = parseQa (dataToExpQ $ const Nothing `extQ` antiQuoteE)
92
parseExp = parseQa (dataToExpQ $ const Nothing `extQ` antiQuoteE)
65
false
true
0
9
13
41
19
22
null
null