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
ecaustin/haskhol-core
src/HaskHOL/Core/Parser.hs
bsd-2-clause
{-| Specifies a 'Text' to be recognized as an infix operator by the parser with a given precedence level and associativity. -} parseAsInfix :: (Text, (Int, Text)) -> HOL Theory thry () parseAsInfix i@(n, (p, as)) = do overParseContext State.infixes insertFun let f = if as == "right" then State.rights else State.lefts overParseContext f (\ ops -> nub ((n, p) : ops)) where insertFun :: [(Text, (Int, Text))] -> [(Text, (Int, Text))] insertFun is | test' (find (\ (n', _) -> n == n') is) = is | otherwise = sort (\ (s, (x, a)) (t, (y, b)) -> x < y || x == y && a > b || x == y && a == b && s < t) (i:is) -- | Specifies a 'Text' for the parser to stop recognizing as a term binder.
758
parseAsInfix :: (Text, (Int, Text)) -> HOL Theory thry () parseAsInfix i@(n, (p, as)) = do overParseContext State.infixes insertFun let f = if as == "right" then State.rights else State.lefts overParseContext f (\ ops -> nub ((n, p) : ops)) where insertFun :: [(Text, (Int, Text))] -> [(Text, (Int, Text))] insertFun is | test' (find (\ (n', _) -> n == n') is) = is | otherwise = sort (\ (s, (x, a)) (t, (y, b)) -> x < y || x == y && a > b || x == y && a == b && s < t) (i:is) -- | Specifies a 'Text' for the parser to stop recognizing as a term binder.
626
parseAsInfix i@(n, (p, as)) = do overParseContext State.infixes insertFun let f = if as == "right" then State.rights else State.lefts overParseContext f (\ ops -> nub ((n, p) : ops)) where insertFun :: [(Text, (Int, Text))] -> [(Text, (Int, Text))] insertFun is | test' (find (\ (n', _) -> n == n') is) = is | otherwise = sort (\ (s, (x, a)) (t, (y, b)) -> x < y || x == y && a > b || x == y && a == b && s < t) (i:is) -- | Specifies a 'Text' for the parser to stop recognizing as a term binder.
568
true
true
2
18
215
318
171
147
null
null
abakst/liquidhaskell
benchmarks/bytestring-0.9.2.1/Data/ByteString.T.hs
bsd-3-clause
-- | /O(n)/ 'notElem' is the inverse of 'elem' notElem :: Word8 -> ByteString -> Bool notElem c ps = not (elem c ps)
116
notElem :: Word8 -> ByteString -> Bool notElem c ps = not (elem c ps)
69
notElem c ps = not (elem c ps)
30
true
true
0
8
23
42
19
23
null
null
BartAdv/Idris-dev
src/IRTS/JavaScript/AST.hs
bsd-3-clause
jsIsNumber :: JS -> JS jsIsNumber js = (jsTypeOf js) `jsEq` (JSString "number")
79
jsIsNumber :: JS -> JS jsIsNumber js = (jsTypeOf js) `jsEq` (JSString "number")
79
jsIsNumber js = (jsTypeOf js) `jsEq` (JSString "number")
56
false
true
0
8
12
42
20
22
null
null
shlevy/ghc
testsuite/tests/typecheck/should_compile/valid_substitutions.hs
bsd-3-clause
main :: IO () main = _ "hello, world"
37
main :: IO () main = _ "hello, world"
37
main = _ "hello, world"
23
false
true
0
6
8
19
9
10
null
null
atsukotakahashi/wi
src/library/Yi/File.hs
gpl-2.0
fwriteAllE :: YiM () fwriteAllE = do allBuffs <- gets bufferSet let modifiedBuffers = filter (not . isUnchangedBuffer) allBuffs mapM_ fwriteBufferE (fmap bkey modifiedBuffers) -- | Make a backup copy of file
220
fwriteAllE :: YiM () fwriteAllE = do allBuffs <- gets bufferSet let modifiedBuffers = filter (not . isUnchangedBuffer) allBuffs mapM_ fwriteBufferE (fmap bkey modifiedBuffers) -- | Make a backup copy of file
220
fwriteAllE = do allBuffs <- gets bufferSet let modifiedBuffers = filter (not . isUnchangedBuffer) allBuffs mapM_ fwriteBufferE (fmap bkey modifiedBuffers) -- | Make a backup copy of file
199
false
true
0
12
44
64
30
34
null
null
yesodweb/yesod
yesod-auth/Yesod/Auth/GoogleEmail2.hs
mit
-- See https://github.com/yesodweb/yesod/issues/1245 for discussion on this -- use of unsafePerformIO. defaultNonceGen :: Nonce.Generator defaultNonceGen = unsafePerformIO (Nonce.new)
183
defaultNonceGen :: Nonce.Generator defaultNonceGen = unsafePerformIO (Nonce.new)
80
defaultNonceGen = unsafePerformIO (Nonce.new)
45
true
true
0
7
17
23
13
10
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/fromDouble_1.hs
mit
otherwise :: MyBool; otherwise = MyTrue
39
otherwise :: MyBool otherwise = MyTrue
38
otherwise = MyTrue
18
false
true
3
5
5
21
7
14
null
null
ardfard/protolude
src/Bool.hs
mit
bool :: a -> a -> Bool -> a bool f t p = if p then t else f
59
bool :: a -> a -> Bool -> a bool f t p = if p then t else f
59
bool f t p = if p then t else f
31
false
true
0
7
19
38
20
18
null
null
rueshyna/gogol
gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types/Product.hs
mpl-2.0
-- | The reason for the entitlement, e.g. \"free\" for free apps. This is -- temporary, it will be replaced by the acquisition kind field of group -- licenses. eeReason :: Lens' Entitlement (Maybe Text) eeReason = lens _eeReason (\ s a -> s{_eeReason = a})
256
eeReason :: Lens' Entitlement (Maybe Text) eeReason = lens _eeReason (\ s a -> s{_eeReason = a})
96
eeReason = lens _eeReason (\ s a -> s{_eeReason = a})
53
true
true
1
9
45
51
27
24
null
null
konn/hint-forked
src/Hint/Context.hs
bsd-3-clause
support_String :: MonadInterpreter m => m String support_String = do mod_name <- fromState (pm_name . hint_support_module) return $ concat [mod_name, ".", altStringName mod_name]
198
support_String :: MonadInterpreter m => m String support_String = do mod_name <- fromState (pm_name . hint_support_module) return $ concat [mod_name, ".", altStringName mod_name]
198
support_String = do mod_name <- fromState (pm_name . hint_support_module) return $ concat [mod_name, ".", altStringName mod_name]
149
false
true
0
11
42
66
30
36
null
null
spinda/liquidhaskell
src/Language/Haskell/Liquid/Constraint/CTags.hs
bsd-3-clause
-- makeTagEnv = M.fromList . (`zip` (map (:[]) [1..])). L.sort . map fst . concatMap bindEqns getTag :: TagKey -> TagEnv -> Tag getTag = M.lookupDefault defaultTag
164
getTag :: TagKey -> TagEnv -> Tag getTag = M.lookupDefault defaultTag
69
getTag = M.lookupDefault defaultTag
35
true
true
0
6
27
25
13
12
null
null
beni55/egison
hs-src/Language/Egison/Desugar.hs
mit
desugar (SeqExpr expr0 expr1) = do expr0' <- desugar expr0 expr1' <- desugar expr1 return $ SeqExpr expr0' expr1'
119
desugar (SeqExpr expr0 expr1) = do expr0' <- desugar expr0 expr1' <- desugar expr1 return $ SeqExpr expr0' expr1'
119
desugar (SeqExpr expr0 expr1) = do expr0' <- desugar expr0 expr1' <- desugar expr1 return $ SeqExpr expr0' expr1'
119
false
false
0
8
24
50
21
29
null
null
schell/odin
odin-engine/src/Odin/Engine/New.hs
mit
getWindow :: Odin r t m => m Window getWindow = odinWindow <$> getUserData
74
getWindow :: Odin r t m => m Window getWindow = odinWindow <$> getUserData
74
getWindow = odinWindow <$> getUserData
38
false
true
0
7
13
35
15
20
null
null
ekmett/data-lens
Data/Lens/Common.hs
bsd-3-clause
(^+=), (^!+=), (^-=), (^!-=), (^*=), (^!*=) :: Num b => Lens a b -> b -> a -> a l ^+= n = l ^%= (+ n)
101
(^+=), (^!+=), (^-=), (^!-=), (^*=), (^!*=) :: Num b => Lens a b -> b -> a -> a l ^+= n = l ^%= (+ n)
101
l ^+= n = l ^%= (+ n)
21
false
true
5
8
26
79
47
32
null
null
Concelo/concelo
src/Database/Concelo/VTrie.hs
bsd-3-clause
keys = foldrKeys (:) []
23
keys = foldrKeys (:) []
23
keys = foldrKeys (:) []
23
false
false
1
6
4
20
8
12
null
null
brendanhay/gogol
gogol-spanner/gen/Network/Google/Resource/Spanner/Projects/Instances/Databases/List.hs
mpl-2.0
-- | Creates a value of 'ProjectsInstancesDatabasesList' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'pidlParent' -- -- * 'pidlXgafv' -- -- * 'pidlUploadProtocol' -- -- * 'pidlAccessToken' -- -- * 'pidlUploadType' -- -- * 'pidlPageToken' -- -- * 'pidlPageSize' -- -- * 'pidlCallback' projectsInstancesDatabasesList :: Text -- ^ 'pidlParent' -> ProjectsInstancesDatabasesList projectsInstancesDatabasesList pPidlParent_ = ProjectsInstancesDatabasesList' { _pidlParent = pPidlParent_ , _pidlXgafv = Nothing , _pidlUploadProtocol = Nothing , _pidlAccessToken = Nothing , _pidlUploadType = Nothing , _pidlPageToken = Nothing , _pidlPageSize = Nothing , _pidlCallback = Nothing }
809
projectsInstancesDatabasesList :: Text -- ^ 'pidlParent' -> ProjectsInstancesDatabasesList projectsInstancesDatabasesList pPidlParent_ = ProjectsInstancesDatabasesList' { _pidlParent = pPidlParent_ , _pidlXgafv = Nothing , _pidlUploadProtocol = Nothing , _pidlAccessToken = Nothing , _pidlUploadType = Nothing , _pidlPageToken = Nothing , _pidlPageSize = Nothing , _pidlCallback = Nothing }
436
projectsInstancesDatabasesList pPidlParent_ = ProjectsInstancesDatabasesList' { _pidlParent = pPidlParent_ , _pidlXgafv = Nothing , _pidlUploadProtocol = Nothing , _pidlAccessToken = Nothing , _pidlUploadType = Nothing , _pidlPageToken = Nothing , _pidlPageSize = Nothing , _pidlCallback = Nothing }
337
true
true
0
7
152
97
64
33
null
null
rsasse/tamarin-prover
lib/theory/src/Theory.hs
gpl-3.0
-- prettyIntrVariantsSection prettyOpenProtoRule prettyProof -- | Pretty print an open theory. prettyOpenDiffTheory :: HighlightDocument d => OpenDiffTheory -> d prettyOpenDiffTheory = prettyDiffTheory prettySignaturePure (const emptyDoc) prettyEitherRule prettyDiffProof prettyProof
305
prettyOpenDiffTheory :: HighlightDocument d => OpenDiffTheory -> d prettyOpenDiffTheory = prettyDiffTheory prettySignaturePure (const emptyDoc) prettyEitherRule prettyDiffProof prettyProof
209
prettyOpenDiffTheory = prettyDiffTheory prettySignaturePure (const emptyDoc) prettyEitherRule prettyDiffProof prettyProof
142
true
true
0
7
49
41
21
20
null
null
vikraman/ghc
compiler/utils/UniqFM.hs
bsd-3-clause
plusUFM_CD f (UFM xm) dx (UFM ym) dy = UFM $ M.mergeWithKey (\_ x y -> Just (x `f` y)) (M.map (\x -> x `f` dy)) (M.map (\y -> dx `f` y)) xm ym
178
plusUFM_CD f (UFM xm) dx (UFM ym) dy = UFM $ M.mergeWithKey (\_ x y -> Just (x `f` y)) (M.map (\x -> x `f` dy)) (M.map (\y -> dx `f` y)) xm ym
178
plusUFM_CD f (UFM xm) dx (UFM ym) dy = UFM $ M.mergeWithKey (\_ x y -> Just (x `f` y)) (M.map (\x -> x `f` dy)) (M.map (\y -> dx `f` y)) xm ym
178
false
false
0
11
69
114
62
52
null
null
micknelso/language-c
src/Language/CFamily/C/Analysis/AstAnalysis.hs
bsd-3-clause
tStmt c (CCases e1 e2 s ni) = do unless (inSwitch c) $ astError ni "case statement outside of switch statement" tExpr c RValue e1 >>= checkIntegral' ni tExpr c RValue e2 >>= checkIntegral' ni tStmt c s
235
tStmt c (CCases e1 e2 s ni) = do unless (inSwitch c) $ astError ni "case statement outside of switch statement" tExpr c RValue e1 >>= checkIntegral' ni tExpr c RValue e2 >>= checkIntegral' ni tStmt c s
235
tStmt c (CCases e1 e2 s ni) = do unless (inSwitch c) $ astError ni "case statement outside of switch statement" tExpr c RValue e1 >>= checkIntegral' ni tExpr c RValue e2 >>= checkIntegral' ni tStmt c s
235
false
false
0
10
71
86
37
49
null
null
jfoutz/language-bash
src/Language/Bash/Cond.hs
bsd-3-clause
-- | Parse a specific word. word :: String -> Parser String word s = token (\t -> if t == s then Just s else Nothing) <?> s
123
word :: String -> Parser String word s = token (\t -> if t == s then Just s else Nothing) <?> s
95
word s = token (\t -> if t == s then Just s else Nothing) <?> s
63
true
true
0
9
28
57
28
29
null
null
Helium4Haskell/helium
lib/Prelude.hs
gpl-3.0
concatMap :: (a -> [b]) -> [a] -> [b] concatMap f = concat . map f
66
concatMap :: (a -> [b]) -> [a] -> [b] concatMap f = concat . map f
66
concatMap f = concat . map f
28
false
true
1
9
15
52
25
27
null
null
gridaphobe/target
examples/MapTests.hs
mit
merge_bad _ Tip r = r
25
merge_bad _ Tip r = r
25
merge_bad _ Tip r = r
25
false
false
0
5
9
13
6
7
null
null
mbeidler/kata-bank-ocr
src/Reader.hs
bsd-3-clause
readDigit :: String -> DigitR readDigit s = maybe (Left $ near s) Right $ lookup s digitMap
91
readDigit :: String -> DigitR readDigit s = maybe (Left $ near s) Right $ lookup s digitMap
91
readDigit s = maybe (Left $ near s) Right $ lookup s digitMap
61
false
true
0
9
17
42
20
22
null
null
badp/ganeti
src/Ganeti/Runtime.hs
gpl-2.0
daemonLogBase GanetiKvmd = "kvm-daemon"
42
daemonLogBase GanetiKvmd = "kvm-daemon"
42
daemonLogBase GanetiKvmd = "kvm-daemon"
42
false
false
0
5
6
9
4
5
null
null
ducis/haAni
hs/common/Graphics/UI/GLUT/Raw/Tokens.hs
gpl-2.0
glut_RIGHT_BUTTON :: CInt glut_RIGHT_BUTTON = 0x0002
52
glut_RIGHT_BUTTON :: CInt glut_RIGHT_BUTTON = 0x0002
52
glut_RIGHT_BUTTON = 0x0002
26
false
true
0
4
5
11
6
5
null
null
acamino/state-codes
src/Data/StateCodes/ISO31662US.hs
mit
fromMName "Oklahoma" = Just OK
58
fromMName "Oklahoma" = Just OK
58
fromMName "Oklahoma" = Just OK
58
false
false
0
5
32
12
5
7
null
null
urbanslug/ghc
compiler/utils/Util.hs
bsd-3-clause
stretchZipWith p z f (x:xs) ys | p x = f x z : stretchZipWith p z f xs ys | otherwise = case ys of [] -> [] (y:ys) -> f x y : stretchZipWith p z f xs ys
198
stretchZipWith p z f (x:xs) ys | p x = f x z : stretchZipWith p z f xs ys | otherwise = case ys of [] -> [] (y:ys) -> f x y : stretchZipWith p z f xs ys
198
stretchZipWith p z f (x:xs) ys | p x = f x z : stretchZipWith p z f xs ys | otherwise = case ys of [] -> [] (y:ys) -> f x y : stretchZipWith p z f xs ys
198
false
false
1
9
86
107
51
56
null
null
lostbean/VirMat
src/VirMat/IO/Export/ANG/RasterEngine.hs
gpl-3.0
feAlpha :: ANGphase feAlpha = ANGphase { phase = 1 , materialName = "Iron (Alpha)" , formula = "Fe" , info = "" , symmetry = "43" , latticeCons = (2.87, 2.87, 2.87, 90, 90, 90) , numFamilies = 0 -- Int , hklFamilies = [] -- [(Int, Int, Int, Int, Double, Int)] , elasticConst = [] -- [(Double, Double, Double, Double, Double, Double)] , categories = (0,0,0,0,0) }
450
feAlpha :: ANGphase feAlpha = ANGphase { phase = 1 , materialName = "Iron (Alpha)" , formula = "Fe" , info = "" , symmetry = "43" , latticeCons = (2.87, 2.87, 2.87, 90, 90, 90) , numFamilies = 0 -- Int , hklFamilies = [] -- [(Int, Int, Int, Int, Double, Int)] , elasticConst = [] -- [(Double, Double, Double, Double, Double, Double)] , categories = (0,0,0,0,0) }
450
feAlpha = ANGphase { phase = 1 , materialName = "Iron (Alpha)" , formula = "Fe" , info = "" , symmetry = "43" , latticeCons = (2.87, 2.87, 2.87, 90, 90, 90) , numFamilies = 0 -- Int , hklFamilies = [] -- [(Int, Int, Int, Int, Double, Int)] , elasticConst = [] -- [(Double, Double, Double, Double, Double, Double)] , categories = (0,0,0,0,0) }
430
false
true
0
8
156
123
76
47
null
null
dhrosa/haskell-avr-simulator
AVR/REPL/Command.hs
gpl-3.0
set8 :: Parser Command set8 = do target <- target8 spaces _ <- string "=" spaces val <- expr8 return (Set8 target val)
130
set8 :: Parser Command set8 = do target <- target8 spaces _ <- string "=" spaces val <- expr8 return (Set8 target val)
130
set8 = do target <- target8 spaces _ <- string "=" spaces val <- expr8 return (Set8 target val)
107
false
true
0
9
34
58
25
33
null
null
anekos/liname-hs
src/LiName/Utils.hs
gpl-3.0
notDots ".." = False
20
notDots ".." = False
20
notDots ".." = False
20
false
false
1
5
3
13
4
9
null
null
chwthewke/horbits
testsuite/Horbits/OrbitClassicalTest.hs
bsd-3-clause
checkEzInclArgPe :: OrbitClass t => Dimensionless Double -> t -> Property checkEzInclArgPe = mkMatcherProperty (\orbit -> relativelyCloseTo $ orbit ^. orbitEccentricityVector . _z) (\orbit -> sin (orbit ^. orbitInclination) * sin (orbit ^. orbitArgumentOfPeriapsis) * orbit ^. orbitEccentricity) (const id)
334
checkEzInclArgPe :: OrbitClass t => Dimensionless Double -> t -> Property checkEzInclArgPe = mkMatcherProperty (\orbit -> relativelyCloseTo $ orbit ^. orbitEccentricityVector . _z) (\orbit -> sin (orbit ^. orbitInclination) * sin (orbit ^. orbitArgumentOfPeriapsis) * orbit ^. orbitEccentricity) (const id)
334
checkEzInclArgPe = mkMatcherProperty (\orbit -> relativelyCloseTo $ orbit ^. orbitEccentricityVector . _z) (\orbit -> sin (orbit ^. orbitInclination) * sin (orbit ^. orbitArgumentOfPeriapsis) * orbit ^. orbitEccentricity) (const id)
260
false
true
0
12
67
104
52
52
null
null
urbanslug/ghc
testsuite/tests/module/mod173.hs
bsd-3-clause
-- From the import nub = True
30
nub = True
10
nub = True
10
true
false
1
5
7
11
4
7
null
null
karamellpelle/grid
designer/source/Game/LevelPuzzleMode/Do.hs
gpl-3.0
doComplete :: s -> LevelPuzzleWorld -> b -> MEnv' (s, LevelPuzzleWorld, b) doComplete s lvl b = do lvl' <- beginLevelPuzzleWorld lvl -- do Grid (s', grid', lvl'') <- doGridComplete s (levelpuzzleGrid lvl') lvl' let lvl''' = levelpuzzleModifyContent lvl'' $ \cnt -> cnt { contentGrid = grid' } return (s', lvl''', b)
342
doComplete :: s -> LevelPuzzleWorld -> b -> MEnv' (s, LevelPuzzleWorld, b) doComplete s lvl b = do lvl' <- beginLevelPuzzleWorld lvl -- do Grid (s', grid', lvl'') <- doGridComplete s (levelpuzzleGrid lvl') lvl' let lvl''' = levelpuzzleModifyContent lvl'' $ \cnt -> cnt { contentGrid = grid' } return (s', lvl''', b)
342
doComplete s lvl b = do lvl' <- beginLevelPuzzleWorld lvl -- do Grid (s', grid', lvl'') <- doGridComplete s (levelpuzzleGrid lvl') lvl' let lvl''' = levelpuzzleModifyContent lvl'' $ \cnt -> cnt { contentGrid = grid' } return (s', lvl''', b)
267
false
true
0
13
78
126
65
61
null
null
abramhindle/haskell-sand-game
Sand2.hs
lgpl-3.0
sink c@(Cursor { center = center, left = left, right = right, above = above }) = c{ center = above, above = center }
120
sink c@(Cursor { center = center, left = left, right = right, above = above }) = c{ center = above, above = center }
120
sink c@(Cursor { center = center, left = left, right = right, above = above }) = c{ center = above, above = center }
120
false
false
13
5
28
53
29
24
null
null
ml9951/ThreadScope
GUI/ViewerColours.hs
bsd-3-clause
cyan :: Color cyan = Color 0 0xFFFF 0xFFFF
42
cyan :: Color cyan = Color 0 0xFFFF 0xFFFF
42
cyan = Color 0 0xFFFF 0xFFFF
28
false
true
0
6
8
24
10
14
null
null
michaelbeaumont/pandoc
src/Text/Pandoc/Writers/Markdown.hs
gpl-2.0
jsonToYaml (String s) = case T.unpack s of x | '\n' `elem` x -> hang 2 ("|" <> cr) $ text x | not (any isPunctuation x) -> text x | otherwise -> text $ "'" ++ substitute "'" "''" x ++ "'"
212
jsonToYaml (String s) = case T.unpack s of x | '\n' `elem` x -> hang 2 ("|" <> cr) $ text x | not (any isPunctuation x) -> text x | otherwise -> text $ "'" ++ substitute "'" "''" x ++ "'"
212
jsonToYaml (String s) = case T.unpack s of x | '\n' `elem` x -> hang 2 ("|" <> cr) $ text x | not (any isPunctuation x) -> text x | otherwise -> text $ "'" ++ substitute "'" "''" x ++ "'"
212
false
false
5
11
67
107
52
55
null
null
ku-fpg/aframe
src/Text/AFrame.hs
bsd-3-clause
setAttribute :: Label -> Property -> AFrame -> AFrame setAttribute lbl prop (AFrame p as af) = AFrame p ((lbl,prop) : [ (l,p) | (l,p) <- as, l /= lbl ]) af
155
setAttribute :: Label -> Property -> AFrame -> AFrame setAttribute lbl prop (AFrame p as af) = AFrame p ((lbl,prop) : [ (l,p) | (l,p) <- as, l /= lbl ]) af
155
setAttribute lbl prop (AFrame p as af) = AFrame p ((lbl,prop) : [ (l,p) | (l,p) <- as, l /= lbl ]) af
101
false
true
0
11
31
91
49
42
null
null
olsner/ghc
testsuite/tests/perf/compiler/T10370.hs
bsd-3-clause
a578 :: IO (); a578 = forever $ putStrLn "a578"
47
a578 :: IO () a578 = forever $ putStrLn "a578"
46
a578 = forever $ putStrLn "a578"
32
false
true
0
6
9
24
12
12
null
null
OS2World/DEV-UTIL-HUGS
libraries/Text/Html.hs
bsd-3-clause
li = tag "LI"
31
li = tag "LI"
31
li = tag "LI"
31
false
false
0
5
21
9
4
5
null
null
alexander-at-github/eta
compiler/ETA/HsSyn/HsPat.hs
bsd-3-clause
pprPat (LazyPat pat) = char '~' <> pprParendLPat pat
57
pprPat (LazyPat pat) = char '~' <> pprParendLPat pat
57
pprPat (LazyPat pat) = char '~' <> pprParendLPat pat
57
false
false
0
6
13
26
11
15
null
null
lordxist/uroboro
src/Uroboro/Checker.hs
mit
postCheckPT prog@(Program _ _ _ _ rulz) (PTFun loc name argTypes returnType rs) = do let sig = (name, (loc, argTypes, returnType)) trs <- mapM (checkPTRule prog sig) rs return prog { rules = ((name, trs):rulz) } -- |Fold to typecheck definitions.
301
postCheckPT prog@(Program _ _ _ _ rulz) (PTFun loc name argTypes returnType rs) = do let sig = (name, (loc, argTypes, returnType)) trs <- mapM (checkPTRule prog sig) rs return prog { rules = ((name, trs):rulz) } -- |Fold to typecheck definitions.
301
postCheckPT prog@(Program _ _ _ _ rulz) (PTFun loc name argTypes returnType rs) = do let sig = (name, (loc, argTypes, returnType)) trs <- mapM (checkPTRule prog sig) rs return prog { rules = ((name, trs):rulz) } -- |Fold to typecheck definitions.
301
false
false
0
12
96
114
60
54
null
null
irreverent-pixel-feats/bitbucket
bitbucket-json/src/Irreverent/Bitbucket/Json/Common.hs
bsd-3-clause
parseGroupName :: Value -> Parser GroupName parseGroupName = fmap GroupName . parseJSON
87
parseGroupName :: Value -> Parser GroupName parseGroupName = fmap GroupName . parseJSON
87
parseGroupName = fmap GroupName . parseJSON
43
false
true
0
6
11
25
12
13
null
null
matthiasgoergens/redgrep
src/DDup.hs
bsd-3-clause
plus (Count l) (Count r) = Count $ l + 1 + r
44
plus (Count l) (Count r) = Count $ l + 1 + r
44
plus (Count l) (Count r) = Count $ l + 1 + r
44
false
false
1
10
12
39
17
22
null
null
davidpdrsn/alisp
src/Interpret.hs
bsd-3-clause
update :: Monad m => (a -> a) -> StateT a m () update f = do s <- get let s' = f s put s'
101
update :: Monad m => (a -> a) -> StateT a m () update f = do s <- get let s' = f s put s'
101
update f = do s <- get let s' = f s put s'
54
false
true
0
11
38
71
31
40
null
null
esmolanka/sexp-grammar
sexp-grammar/src/Language/SexpGrammar/Base.hs
bsd-3-clause
-- | The rest of a sequence grammar. Runs a specified grammar on each -- of remaining elements of a sequence and collect them. Expects zero -- or more elements in the sequence. -- -- >>> let grammar = list (el (sym "check-primes") >>> rest int) -- >>> encodeWith grammar [2, 3, 5, 7, 11, 13] -- Right "(check-primes 2 3 5 7 11 13)" rest :: (forall t. Grammar Position (Sexp :- t) (a :- t)) -> Grammar Position (List :- t) (List :- [a] :- t) rest g = iso coerce coerce >>> onHead (Traverse (sealed g >>> Step)) >>> Iso (\a -> List [] :- a) (\(_ :- a) -> a)
565
rest :: (forall t. Grammar Position (Sexp :- t) (a :- t)) -> Grammar Position (List :- t) (List :- [a] :- t) rest g = iso coerce coerce >>> onHead (Traverse (sealed g >>> Step)) >>> Iso (\a -> List [] :- a) (\(_ :- a) -> a)
233
rest g = iso coerce coerce >>> onHead (Traverse (sealed g >>> Step)) >>> Iso (\a -> List [] :- a) (\(_ :- a) -> a)
120
true
true
0
12
123
157
83
74
null
null
Noeda/adeonbot
bot/src/Bot/NetHack/SelectItem.hs
mit
-- | Select an item from an item listing that chooses one single item (e.g. -- eating e* ) -- -- Assumes there is an item listing on the screen. -- -- This may press space to browser the item listing. -- -- Returns letter to press. selectItem :: MonadWAI m => (Item -> Bool) -> m (Maybe B.ByteString) selectItem item_selector = do bottom_item <- matchf (regex "\\([0-9]+ of [0-9]+\\)|\\(end\\)") case bottom_item of Nothing -> return Nothing Just dd -> do items <- fmap catMaybes $ for [0..y dd-1] $ \row -> do item_line <- T.strip <$> getScreenLine' row (x dd) return $ if looksLikeItemLine item_line then Just $ (T.head item_line, nameToItem $ T.drop 4 item_line) else Nothing case find (\(_, item) -> item_selector item) items of Nothing -> do sendRaw " " selectItem item_selector Just (letter, _) -> return $ Just $ T.encodeUtf8 (T.singleton letter) -- | Selects one or more items. -- -- Returns the number of items picked. Like `selectItem`, this can and will -- send space to NetHack to browse through the list. -- -- Also takes an accumulator. You can choose how many items to pick up by -- specifying an integer other than 1 (only works for stacks). -- -- This will pick the items and press space but will NOT yield so there is no -- turn handling or anything. Call `yield` after this manually. (not all cases -- want to do `yield` immediately)
1,464
selectItem :: MonadWAI m => (Item -> Bool) -> m (Maybe B.ByteString) selectItem item_selector = do bottom_item <- matchf (regex "\\([0-9]+ of [0-9]+\\)|\\(end\\)") case bottom_item of Nothing -> return Nothing Just dd -> do items <- fmap catMaybes $ for [0..y dd-1] $ \row -> do item_line <- T.strip <$> getScreenLine' row (x dd) return $ if looksLikeItemLine item_line then Just $ (T.head item_line, nameToItem $ T.drop 4 item_line) else Nothing case find (\(_, item) -> item_selector item) items of Nothing -> do sendRaw " " selectItem item_selector Just (letter, _) -> return $ Just $ T.encodeUtf8 (T.singleton letter) -- | Selects one or more items. -- -- Returns the number of items picked. Like `selectItem`, this can and will -- send space to NetHack to browse through the list. -- -- Also takes an accumulator. You can choose how many items to pick up by -- specifying an integer other than 1 (only works for stacks). -- -- This will pick the items and press space but will NOT yield so there is no -- turn handling or anything. Call `yield` after this manually. (not all cases -- want to do `yield` immediately)
1,232
selectItem item_selector = do bottom_item <- matchf (regex "\\([0-9]+ of [0-9]+\\)|\\(end\\)") case bottom_item of Nothing -> return Nothing Just dd -> do items <- fmap catMaybes $ for [0..y dd-1] $ \row -> do item_line <- T.strip <$> getScreenLine' row (x dd) return $ if looksLikeItemLine item_line then Just $ (T.head item_line, nameToItem $ T.drop 4 item_line) else Nothing case find (\(_, item) -> item_selector item) items of Nothing -> do sendRaw " " selectItem item_selector Just (letter, _) -> return $ Just $ T.encodeUtf8 (T.singleton letter) -- | Selects one or more items. -- -- Returns the number of items picked. Like `selectItem`, this can and will -- send space to NetHack to browse through the list. -- -- Also takes an accumulator. You can choose how many items to pick up by -- specifying an integer other than 1 (only works for stacks). -- -- This will pick the items and press space but will NOT yield so there is no -- turn handling or anything. Call `yield` after this manually. (not all cases -- want to do `yield` immediately)
1,163
true
true
0
25
352
297
150
147
null
null
adarqui/LogFS
src/System/LogFS/Internal.hs
gpl-3.0
logString :: B.ByteString logString = B.pack ""
47
logString :: B.ByteString logString = B.pack ""
47
logString = B.pack ""
21
false
true
0
7
6
25
10
15
null
null
mitochon/hoosalind
src/problems/grph.hs
mit
main = do inp <- getContents let nodes = map (fromPair 3) $ F.fastaLines inp forM_ (grph nodes) $ \(a,b) -> putStr a >> putStr " " >> putStrLn b
154
main = do inp <- getContents let nodes = map (fromPair 3) $ F.fastaLines inp forM_ (grph nodes) $ \(a,b) -> putStr a >> putStr " " >> putStrLn b
154
main = do inp <- getContents let nodes = map (fromPair 3) $ F.fastaLines inp forM_ (grph nodes) $ \(a,b) -> putStr a >> putStr " " >> putStrLn b
154
false
false
0
13
39
84
39
45
null
null
olsner/ghc
compiler/main/HscTypes.hs
bsd-3-clause
plusWarns :: Warnings -> Warnings -> Warnings plusWarns d NoWarnings = d
72
plusWarns :: Warnings -> Warnings -> Warnings plusWarns d NoWarnings = d
72
plusWarns d NoWarnings = d
26
false
true
0
6
11
29
13
16
null
null
rubenmoor/skull
skull-server/src/Game/Bot.hs
mit
reveal :: Int -> Player -> WithPlayer (Player, RevealResult) reveal _ player | getLatestRevealedCard player == Just Skull = pure (player, RevealSkull)
158
reveal :: Int -> Player -> WithPlayer (Player, RevealResult) reveal _ player | getLatestRevealedCard player == Just Skull = pure (player, RevealSkull)
158
reveal _ player | getLatestRevealedCard player == Just Skull = pure (player, RevealSkull)
91
false
true
0
9
29
62
29
33
null
null
DavidAlphaFox/darcs
src/Darcs/UI/Commands/Add.hs
gpl-2.0
dryRunMessages :: AddMessages dryRunMessages = AddMessages { msgSkipping = "Would skip" , msgAdding = "Would add" , msgIs = "would be" , msgAre = "would be" }
201
dryRunMessages :: AddMessages dryRunMessages = AddMessages { msgSkipping = "Would skip" , msgAdding = "Would add" , msgIs = "would be" , msgAre = "would be" }
201
dryRunMessages = AddMessages { msgSkipping = "Would skip" , msgAdding = "Would add" , msgIs = "would be" , msgAre = "would be" }
171
false
true
0
7
69
47
25
22
null
null
Pieterjaninfo/PP
FP/block1s1.hs
unlicense
equalLength (x:y:xs) | length x == length y = equalLength (y:xs) | otherwise = False
92
equalLength (x:y:xs) | length x == length y = equalLength (y:xs) | otherwise = False
92
equalLength (x:y:xs) | length x == length y = equalLength (y:xs) | otherwise = False
92
false
false
1
9
22
54
25
29
null
null
mrmonday/Idris-dev
src/IRTS/JavaScript/AST.hs
bsd-3-clause
jsEq lhs rhs@(JSNum (JSInteger _)) = JSApp (JSProj lhs "equals") [rhs]
70
jsEq lhs rhs@(JSNum (JSInteger _)) = JSApp (JSProj lhs "equals") [rhs]
70
jsEq lhs rhs@(JSNum (JSInteger _)) = JSApp (JSProj lhs "equals") [rhs]
70
false
false
0
10
10
42
21
21
null
null
GaloisInc/saw-script
heapster-saw/src/Verifier/SAW/Heapster/archival/CtxMonad.hs
bsd-3-clause
cpairSnd :: (a :*: b) ctx -> b ctx cpairSnd (CPair _ b) = b
59
cpairSnd :: (a :*: b) ctx -> b ctx cpairSnd (CPair _ b) = b
59
cpairSnd (CPair _ b) = b
24
false
true
0
8
14
39
19
20
null
null
kmilner/tamarin-prover
lib/term/src/Term/UnitTests.hs
gpl-3.0
-- | All unification infrastructure unit tests. tests :: FilePath -> IO Test tests maudePath = do mhnd <- startMaude maudePath allMaudeSig return $ TestList [ testsVariant mhnd , tcompare mhnd , testsSubs mhnd , testsTerm , testsSubst , testsNorm mhnd , testsUnify mhnd , testsSimple mhnd , testsMatching mhnd ] -- | Maude signatures with all builtin symbols.
566
tests :: FilePath -> IO Test tests maudePath = do mhnd <- startMaude maudePath allMaudeSig return $ TestList [ testsVariant mhnd , tcompare mhnd , testsSubs mhnd , testsTerm , testsSubst , testsNorm mhnd , testsUnify mhnd , testsSimple mhnd , testsMatching mhnd ] -- | Maude signatures with all builtin symbols.
518
tests maudePath = do mhnd <- startMaude maudePath allMaudeSig return $ TestList [ testsVariant mhnd , tcompare mhnd , testsSubs mhnd , testsTerm , testsSubst , testsNorm mhnd , testsUnify mhnd , testsSimple mhnd , testsMatching mhnd ] -- | Maude signatures with all builtin symbols.
489
true
true
0
11
265
98
47
51
null
null
gergoerdi/tecs
src/Language/TECS/Jack/jack-layout.hs
bsd-3-clause
main = do [filename] <- getArgs s <- BS.readFile filename case parseJack s filename of Left err -> putStrLn err Right jack -> print $ pPrint $ layout jack
171
main = do [filename] <- getArgs s <- BS.readFile filename case parseJack s filename of Left err -> putStrLn err Right jack -> print $ pPrint $ layout jack
171
main = do [filename] <- getArgs s <- BS.readFile filename case parseJack s filename of Left err -> putStrLn err Right jack -> print $ pPrint $ layout jack
171
false
false
1
12
45
76
32
44
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/maximum_2.hs
mit
maxMyBool :: MyBool -> MyBool -> MyBool maxMyBool x y = max2 x y
68
maxMyBool :: MyBool -> MyBool -> MyBool maxMyBool x y = max2 x y
68
maxMyBool x y = max2 x y
24
false
true
0
6
17
29
14
15
null
null
frantisekfarka/ghc-dsi
compiler/basicTypes/Avail.hs
bsd-3-clause
availNames (AvailTC _ ns) = ns
30
availNames (AvailTC _ ns) = ns
30
availNames (AvailTC _ ns) = ns
30
false
false
0
7
5
17
8
9
null
null
abailly/kontiki
src/Network/Kontiki/Raft/Leader.hs
bsd-3-clause
handleHeartbeatTimeout :: (Monad m, MonadLog m a) => TimeoutHandler HeartbeatTimeout a Leader m handleHeartbeatTimeout = do resetHeartbeatTimeout commitIndex <- use lCommitIndex lastEntry <- logLastEntry nodeId <- view configNodeId lLastIndex %= Map.insert nodeId (maybe index0 eIndex lastEntry) nodes <- view configNodes let otherNodes = filter (/= nodeId) (Set.toList nodes) mapM_ (sendAppendEntries lastEntry commitIndex) otherNodes currentState -- | Sends `AppendEntries' to a particular `NodeId'.
566
handleHeartbeatTimeout :: (Monad m, MonadLog m a) => TimeoutHandler HeartbeatTimeout a Leader m handleHeartbeatTimeout = do resetHeartbeatTimeout commitIndex <- use lCommitIndex lastEntry <- logLastEntry nodeId <- view configNodeId lLastIndex %= Map.insert nodeId (maybe index0 eIndex lastEntry) nodes <- view configNodes let otherNodes = filter (/= nodeId) (Set.toList nodes) mapM_ (sendAppendEntries lastEntry commitIndex) otherNodes currentState -- | Sends `AppendEntries' to a particular `NodeId'.
566
handleHeartbeatTimeout = do resetHeartbeatTimeout commitIndex <- use lCommitIndex lastEntry <- logLastEntry nodeId <- view configNodeId lLastIndex %= Map.insert nodeId (maybe index0 eIndex lastEntry) nodes <- view configNodes let otherNodes = filter (/= nodeId) (Set.toList nodes) mapM_ (sendAppendEntries lastEntry commitIndex) otherNodes currentState -- | Sends `AppendEntries' to a particular `NodeId'.
447
false
true
0
13
126
147
68
79
null
null
olsner/ghc
compiler/stranal/DmdAnal.hs
bsd-3-clause
deleteFVs :: DmdType -> [Var] -> DmdType deleteFVs (DmdType fvs dmds res) bndrs = DmdType (delVarEnvList fvs bndrs) dmds res
126
deleteFVs :: DmdType -> [Var] -> DmdType deleteFVs (DmdType fvs dmds res) bndrs = DmdType (delVarEnvList fvs bndrs) dmds res
126
deleteFVs (DmdType fvs dmds res) bndrs = DmdType (delVarEnvList fvs bndrs) dmds res
85
false
true
0
10
21
60
27
33
null
null
florianpilz/autotool
src/Baum/ZweiDrei/Show.hs
gpl-2.0
toTree :: Show a => Baum a -> Tree String toTree Null = Node "-" []
67
toTree :: Show a => Baum a -> Tree String toTree Null = Node "-" []
67
toTree Null = Node "-" []
25
false
true
0
7
15
38
17
21
null
null
GaloisInc/language-sal
src/Language/SAL/Helpers.hs
mit
-- Concise constructors ------------------------------------------------ lhs :: Identifier -> Lhs lhs v = LhsCurrent v []
122
lhs :: Identifier -> Lhs lhs v = LhsCurrent v []
48
lhs v = LhsCurrent v []
23
true
true
0
6
15
26
13
13
null
null
zuoqin/hackerrank
src/LittleGauravAndSequence.hs
bsd-3-clause
littleGauravAndSequence :: IO () littleGauravAndSequence = do x_temp <- getLine let n = read $ x_temp :: Int readdata n
137
littleGauravAndSequence :: IO () littleGauravAndSequence = do x_temp <- getLine let n = read $ x_temp :: Int readdata n
137
littleGauravAndSequence = do x_temp <- getLine let n = read $ x_temp :: Int readdata n
104
false
true
0
10
37
45
21
24
null
null
bwmcadams/lambdaconf-2015
speakers/goldfirere/src/Language/Glambda/Eval.hs
artistic-2.0
arith (IntVal n1) Minus (IntVal n2) = IntE (n1 - n2)
55
arith (IntVal n1) Minus (IntVal n2) = IntE (n1 - n2)
55
arith (IntVal n1) Minus (IntVal n2) = IntE (n1 - n2)
55
false
false
0
7
13
35
17
18
null
null
ianthehenry/tightrope
Network/Tightrope.hs
mit
roomFromText :: User -> Text -> Room roomFromText u "directmessage" = Private u
79
roomFromText :: User -> Text -> Room roomFromText u "directmessage" = Private u
79
roomFromText u "directmessage" = Private u
42
false
true
0
6
12
27
13
14
null
null
Tehnix/campaigns
Handler/Common.hs
mit
getRobotsR :: Handler TypedContent getRobotsR = return . TypedContent typePlain $ toContent $(embedFile "config/robots.txt")
144
getRobotsR :: Handler TypedContent getRobotsR = return . TypedContent typePlain $ toContent $(embedFile "config/robots.txt")
144
getRobotsR = return . TypedContent typePlain $ toContent $(embedFile "config/robots.txt")
109
false
true
0
9
33
35
16
19
null
null
league/game2048
src/Game2048/AI.hs
gpl-3.0
sameFactor :: [Ordering] -> [Ordering] -> Float sameFactor ro co = fromIntegral (rs + cs) / k where rs' = countSame ro cs' = countSame co rs = if rs' > 2 then rs' else 0 cs = if cs' > 2 then cs' else 0 k = fromIntegral (length straits) countSame os = max (g LT) (g GT) where g o = countIf (== o) os {- Minimize number of tiles on the grid -}
394
sameFactor :: [Ordering] -> [Ordering] -> Float sameFactor ro co = fromIntegral (rs + cs) / k where rs' = countSame ro cs' = countSame co rs = if rs' > 2 then rs' else 0 cs = if cs' > 2 then cs' else 0 k = fromIntegral (length straits) countSame os = max (g LT) (g GT) where g o = countIf (== o) os {- Minimize number of tiles on the grid -}
394
sameFactor ro co = fromIntegral (rs + cs) / k where rs' = countSame ro cs' = countSame co rs = if rs' > 2 then rs' else 0 cs = if cs' > 2 then cs' else 0 k = fromIntegral (length straits) countSame os = max (g LT) (g GT) where g o = countIf (== o) os {- Minimize number of tiles on the grid -}
346
false
true
5
11
128
159
82
77
null
null
rumblesan/improviz
src/Gfx/Commands.hs
bsd-3-clause
scale :: Float -> Float -> Float -> GraphicsEngine () scale x y z = modify' (multMatrix $ scaleMat x y z)
105
scale :: Float -> Float -> Float -> GraphicsEngine () scale x y z = modify' (multMatrix $ scaleMat x y z)
105
scale x y z = modify' (multMatrix $ scaleMat x y z)
51
false
true
0
9
21
52
25
27
null
null
gridaphobe/ghc
compiler/main/HscTypes.hs
bsd-3-clause
numToTrustInfo :: Word8 -> IfaceTrustInfo numToTrustInfo 0 = setSafeMode Sf_None
80
numToTrustInfo :: Word8 -> IfaceTrustInfo numToTrustInfo 0 = setSafeMode Sf_None
80
numToTrustInfo 0 = setSafeMode Sf_None
38
false
true
0
7
9
26
11
15
null
null
sdiehl/ghc
compiler/GHC/Cmm/Sink.hs
bsd-3-clause
memConflicts (SpMem o1 w1) (SpMem o2 w2) | o1 < o2 = o1 + w1 > o2 | otherwise = o2 + w2 > o1
98
memConflicts (SpMem o1 w1) (SpMem o2 w2) | o1 < o2 = o1 + w1 > o2 | otherwise = o2 + w2 > o1
98
memConflicts (SpMem o1 w1) (SpMem o2 w2) | o1 < o2 = o1 + w1 > o2 | otherwise = o2 + w2 > o1
98
false
false
8
8
30
73
31
42
null
null
bernstein/ircfs
Ircfs/Filesystem.hs
bsd-3-clause
defDirStat :: F.FileStat defDirStat = defFileStat { F.statEntryType = F.Directory , F.statFileMode = 0o555 , F.statLinkCount = 2 , F.statFileSize = 4096 }
219
defDirStat :: F.FileStat defDirStat = defFileStat { F.statEntryType = F.Directory , F.statFileMode = 0o555 , F.statLinkCount = 2 , F.statFileSize = 4096 }
219
defDirStat = defFileStat { F.statEntryType = F.Directory , F.statFileMode = 0o555 , F.statLinkCount = 2 , F.statFileSize = 4096 }
194
false
true
0
8
87
59
31
28
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/SVGPathElement.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGPathElement.createSVGPathSegLinetoHorizontalAbs Mozilla SVGPathElement.createSVGPathSegLinetoHorizontalAbs documentation> createSVGPathSegLinetoHorizontalAbs_ :: (MonadDOM m) => SVGPathElement -> Maybe Float -> m () createSVGPathSegLinetoHorizontalAbs_ self x = liftDOM (void (self ^. jsf "createSVGPathSegLinetoHorizontalAbs" [toJSVal x]))
453
createSVGPathSegLinetoHorizontalAbs_ :: (MonadDOM m) => SVGPathElement -> Maybe Float -> m () createSVGPathSegLinetoHorizontalAbs_ self x = liftDOM (void (self ^. jsf "createSVGPathSegLinetoHorizontalAbs" [toJSVal x]))
272
createSVGPathSegLinetoHorizontalAbs_ self x = liftDOM (void (self ^. jsf "createSVGPathSegLinetoHorizontalAbs" [toJSVal x]))
141
true
true
0
11
84
69
34
35
null
null
AlexanderPankiv/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
collect_bind :: Bool -> HsBindLR idL idR -> [idL] -> [idL] collect_bind _ (PatBind { pat_lhs = p }) acc = collect_lpat p acc
134
collect_bind :: Bool -> HsBindLR idL idR -> [idL] -> [idL] collect_bind _ (PatBind { pat_lhs = p }) acc = collect_lpat p acc
134
collect_bind _ (PatBind { pat_lhs = p }) acc = collect_lpat p acc
75
false
true
0
9
33
58
30
28
null
null
mikeizbicki/Classification
src/AI/Classification/DecisionStump.hs
bsd-3-clause
chooseSplit (x:[]) = error "chooseSplit only 1 arg; you must have >= 2 datapoints in your training data"
104
chooseSplit (x:[]) = error "chooseSplit only 1 arg; you must have >= 2 datapoints in your training data"
104
chooseSplit (x:[]) = error "chooseSplit only 1 arg; you must have >= 2 datapoints in your training data"
104
false
false
0
7
17
22
10
12
null
null
sgf-dma/sgf-haskell-common
src/Sgf/Data/List.hs
bsd-3-clause
readLexsM :: [String] -> ReadM () readLexsM = liftRead . readLexs
75
readLexsM :: [String] -> ReadM () readLexsM = liftRead . readLexs
75
readLexsM = liftRead . readLexs
41
false
true
1
8
20
34
15
19
null
null
xu-hao/QueryArrow
QueryArrow-db-filesystem/src/QueryArrow/FileSystem/Query.hs
bsd-3-clause
fsSupported _ (FInsert2 _ (Lit Pos (Atom (FileNamePredName _) _))) env = True
77
fsSupported _ (FInsert2 _ (Lit Pos (Atom (FileNamePredName _) _))) env = True
77
fsSupported _ (FInsert2 _ (Lit Pos (Atom (FileNamePredName _) _))) env = True
77
false
false
1
12
12
45
21
24
null
null
wjdhamilton/ig-haskell
src/IG/Realtime/Types.hs
bsd-3-clause
encodeSchema s@(SprintMarket _ fs) = [schemaId s, schemaParams fs]
67
encodeSchema s@(SprintMarket _ fs) = [schemaId s, schemaParams fs]
67
encodeSchema s@(SprintMarket _ fs) = [schemaId s, schemaParams fs]
67
false
false
0
8
9
32
16
16
null
null
GaloisInc/saw-script
saw-core/src/Verifier/SAW/Term/Pretty.hs
bsd-3-clause
ppWithBoundCtx ((x,tp):ctx) m = (\tp_d (x', (ctx_d, ret)) -> (parens (ppTypeConstraint (pretty x') tp_d) <+> ctx_d, ret)) <$> ppTerm' PrecTerm tp <*> withBoundVarM x (ppWithBoundCtx ctx m)
196
ppWithBoundCtx ((x,tp):ctx) m = (\tp_d (x', (ctx_d, ret)) -> (parens (ppTypeConstraint (pretty x') tp_d) <+> ctx_d, ret)) <$> ppTerm' PrecTerm tp <*> withBoundVarM x (ppWithBoundCtx ctx m)
196
ppWithBoundCtx ((x,tp):ctx) m = (\tp_d (x', (ctx_d, ret)) -> (parens (ppTypeConstraint (pretty x') tp_d) <+> ctx_d, ret)) <$> ppTerm' PrecTerm tp <*> withBoundVarM x (ppWithBoundCtx ctx m)
196
false
false
2
13
34
100
53
47
null
null
egison/egison
hs-src/Language/Egison/Desugar.hs
mit
desugar (JoinExpr x xs) = IJoinExpr <$> desugar x <*> desugar xs
64
desugar (JoinExpr x xs) = IJoinExpr <$> desugar x <*> desugar xs
64
desugar (JoinExpr x xs) = IJoinExpr <$> desugar x <*> desugar xs
64
false
false
0
7
11
31
14
17
null
null
ksaveljev/hake-2
src/Constants.hs
bsd-3-clause
sffSubDir = 0x08 :: Int
23
sffSubDir = 0x08 :: Int
23
sffSubDir = 0x08 :: Int
23
false
false
0
4
4
9
5
4
null
null
patperry/hs-gsl-random
lib/GSL/Random/Dist.hs
bsd-3-clause
-- | @ugaussianPInv p@ computes the inverse of the cumulative distribution -- function of a Gaussian distribution with mean @0@ and standard deviation -- @1@. It returns @x@ such that @P(x) = p@. ugaussianPInv :: Double -> Double ugaussianPInv = liftDouble gsl_cdf_ugaussian_Pinv
279
ugaussianPInv :: Double -> Double ugaussianPInv = liftDouble gsl_cdf_ugaussian_Pinv
83
ugaussianPInv = liftDouble gsl_cdf_ugaussian_Pinv
49
true
true
0
5
41
21
12
9
null
null
spacekitteh/compdata
src/Data/Comp/Algebra.hs
bsd-3-clause
-- cataM' f = free (\x -> sequence x >>= f) return cataM' f = run where run :: Cxt h f a -> m a run (Hole x) = return x run (Term t) = f =<< mapM run t {-| This type represents a context function. -}
225
cataM' f = run where run :: Cxt h f a -> m a run (Hole x) = return x run (Term t) = f =<< mapM run t {-| This type represents a context function. -}
174
cataM' f = run where run :: Cxt h f a -> m a run (Hole x) = return x run (Term t) = f =<< mapM run t {-| This type represents a context function. -}
174
true
false
1
9
74
81
36
45
null
null
FPtje/glualint-web
src/Main.hs
gpl-2.0
displayMessage (Warnings msgs) = sortLintMessages msgs
54
displayMessage (Warnings msgs) = sortLintMessages msgs
54
displayMessage (Warnings msgs) = sortLintMessages msgs
54
false
false
0
7
5
18
8
10
null
null
mainland/dph
dph-prim-seq/Data/Array/Parallel/Unlifted/Sequential/Combinators.hs
bsd-3-clause
-- NOTE: -- Even though some of these functions are trivial aliases, we use INLINE_U -- pragmas on them to delay inlining. This lets us see what functions are being -- called from higher layers of the library when browsing the core IR. -- foldl ---------------------------------------------------------------------- -- | Segmented array reduction proceeding from the left foldlSU :: (Unbox a, Unbox b) => (b -> a -> b) -> b -> USegd -> Vector a -> Vector b foldlSU f !z segd xs = unstream $ foldSS f z (stream (USegd.takeLengths segd)) (stream xs)
605
foldlSU :: (Unbox a, Unbox b) => (b -> a -> b) -> b -> USegd -> Vector a -> Vector b foldlSU f !z segd xs = unstream $ foldSS f z (stream (USegd.takeLengths segd)) (stream xs)
229
foldlSU f !z segd xs = unstream $ foldSS f z (stream (USegd.takeLengths segd)) (stream xs)
134
true
true
0
11
150
108
56
52
null
null
ExNexu/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
annotationColour ist AnnKeyword = Just $ keywordColour (idris_colourTheme ist)
78
annotationColour ist AnnKeyword = Just $ keywordColour (idris_colourTheme ist)
78
annotationColour ist AnnKeyword = Just $ keywordColour (idris_colourTheme ist)
78
false
false
0
8
8
26
11
15
null
null
NicolasDP/hs-packer
Data/Packer.hs
bsd-2-clause
-- | Get a Word16 serialized in little endian. getWord16LE :: Unpacking Word16 getWord16LE = unpackCheckAct 2 (peekAnd fromLE . castPtr)
136
getWord16LE :: Unpacking Word16 getWord16LE = unpackCheckAct 2 (peekAnd fromLE . castPtr)
89
getWord16LE = unpackCheckAct 2 (peekAnd fromLE . castPtr)
57
true
true
0
8
20
30
15
15
null
null
dysinger/amazonka
amazonka-cloudtrail/gen/Network/AWS/CloudTrail/UpdateTrail.hs
mpl-2.0
-- | Specifies the name of the Amazon S3 bucket designated for publishing log -- files. utrS3BucketName :: Lens' UpdateTrailResponse (Maybe Text) utrS3BucketName = lens _utrS3BucketName (\s a -> s { _utrS3BucketName = a })
222
utrS3BucketName :: Lens' UpdateTrailResponse (Maybe Text) utrS3BucketName = lens _utrS3BucketName (\s a -> s { _utrS3BucketName = a })
134
utrS3BucketName = lens _utrS3BucketName (\s a -> s { _utrS3BucketName = a })
76
true
true
1
9
34
50
26
24
null
null
SavinaRoja/SavinaRoja.github.io
assets/centraldogma_algebraic.hs
mit
codonsFor Cysteine = [mkCodon "TGC", mkCodon "TGT"]
56
codonsFor Cysteine = [mkCodon "TGC", mkCodon "TGT"]
56
codonsFor Cysteine = [mkCodon "TGC", mkCodon "TGT"]
56
false
false
0
6
11
21
10
11
null
null
ksaveljev/hake-2
src/Render/GLFWbRenderer.hs
bsd-3-clause
glfwbShutdown :: RenderAPI -> Quake () glfwbShutdown renderAPI = (renderAPI^.rShutdown) glfwbGLDriver
101
glfwbShutdown :: RenderAPI -> Quake () glfwbShutdown renderAPI = (renderAPI^.rShutdown) glfwbGLDriver
101
glfwbShutdown renderAPI = (renderAPI^.rShutdown) glfwbGLDriver
62
false
true
0
7
10
33
16
17
null
null
ezyang/ghc
libraries/template-haskell/Language/Haskell/TH/Lib/Internal.hs
bsd-3-clause
parS :: [[StmtQ]] -> StmtQ parS sss = do { sss1 <- mapM sequence sss; return (ParS sss1) }
90
parS :: [[StmtQ]] -> StmtQ parS sss = do { sss1 <- mapM sequence sss; return (ParS sss1) }
90
parS sss = do { sss1 <- mapM sequence sss; return (ParS sss1) }
63
false
true
0
10
18
57
27
30
null
null
comonoidial/ALFIN
Backend/Assemble.hs
mit
setSTVals :: StackVals -> AsmGen () setSTVals x = modify (\a -> a {stvs = x})
77
setSTVals :: StackVals -> AsmGen () setSTVals x = modify (\a -> a {stvs = x})
77
setSTVals x = modify (\a -> a {stvs = x})
41
false
true
0
9
15
46
23
23
null
null
Blaisorblade/pts
src-lib/PTS/Syntax/Names.hs
bsd-3-clause
getIdx (IndexName idx _ _) = idx
32
getIdx (IndexName idx _ _) = idx
32
getIdx (IndexName idx _ _) = idx
32
false
false
0
7
6
19
9
10
null
null
romanb/amazonka
amazonka-config/gen/Network/AWS/Config/GetResourceConfigHistory.hs
mpl-2.0
-- | The ID of the resource (for example., 'sg-xxxxxx'). grchResourceId :: Lens' GetResourceConfigHistory Text grchResourceId = lens _grchResourceId (\s a -> s { _grchResourceId = a })
184
grchResourceId :: Lens' GetResourceConfigHistory Text grchResourceId = lens _grchResourceId (\s a -> s { _grchResourceId = a })
127
grchResourceId = lens _grchResourceId (\s a -> s { _grchResourceId = a })
73
true
true
0
9
27
40
22
18
null
null
ezyang/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
-- Typeable KindReps for some common cases starKindRepName, starArrStarKindRepName, starArrStarArrStarKindRepName :: Name starKindRepName = varQual gHC_TYPES (fsLit "krep$*") starKindRepKey
212
starKindRepName, starArrStarKindRepName, starArrStarArrStarKindRepName :: Name starKindRepName = varQual gHC_TYPES (fsLit "krep$*") starKindRepKey
169
starKindRepName = varQual gHC_TYPES (fsLit "krep$*") starKindRepKey
90
true
true
3
7
41
36
17
19
null
null
brendanhay/gogol
gogol-tagmanager/gen/Network/Google/Resource/TagManager/Accounts/Containers/Workspaces/Templates/Get.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). aaUploadType :: Lens' AccountsContainersWorkspacesTemplatesGet (Maybe Text) aaUploadType = lens _aaUploadType (\ s a -> s{_aaUploadType = a})
214
aaUploadType :: Lens' AccountsContainersWorkspacesTemplatesGet (Maybe Text) aaUploadType = lens _aaUploadType (\ s a -> s{_aaUploadType = a})
143
aaUploadType = lens _aaUploadType (\ s a -> s{_aaUploadType = a})
67
true
true
0
9
28
48
25
23
null
null
qpliu/esolang
01_/hs/compiler/interp.hs
gpl-3.0
bitsToStr :: [Bool] -> String bitsToStr [] = []
47
bitsToStr :: [Bool] -> String bitsToStr [] = []
47
bitsToStr [] = []
17
false
true
0
8
8
31
14
17
null
null
keera-studios/hsQt
Qtc/Enums/Core/QUrl.hs
bsd-2-clause
fStripTrailingSlash :: FormattingOptions fStripTrailingSlash = ifFormattingOptions $ 65536
92
fStripTrailingSlash :: FormattingOptions fStripTrailingSlash = ifFormattingOptions $ 65536
92
fStripTrailingSlash = ifFormattingOptions $ 65536
51
false
true
0
6
9
18
8
10
null
null
pparkkin/eta
compiler/ETA/Core/CoreSyn.hs
bsd-3-clause
seqTickish HpcTick{} = ()
25
seqTickish HpcTick{} = ()
25
seqTickish HpcTick{} = ()
25
false
false
0
6
3
15
7
8
null
null
srijs/haskell-lambda-term-zipper
src/Data/Lambda/Term/Zipper/Optimized.hs
mit
up loc = loc
12
up loc = loc
12
up loc = loc
12
false
false
1
5
3
13
4
9
null
null
frelindb/agsyHOL
Undo.hs
mit
ureadIORef :: IORef a -> Undo a ureadIORef ptr = lift $ readIORef ptr
69
ureadIORef :: IORef a -> Undo a ureadIORef ptr = lift $ readIORef ptr
69
ureadIORef ptr = lift $ readIORef ptr
37
false
true
0
6
13
31
14
17
null
null