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
bos/wreq
Network/Wreq/Internal.hs
bsd-3-clause
prepareDelete :: Options -> String -> IO Req prepareDelete = prepareMethod HTTP.methodDelete
92
prepareDelete :: Options -> String -> IO Req prepareDelete = prepareMethod HTTP.methodDelete
92
prepareDelete = prepareMethod HTTP.methodDelete
47
false
true
0
7
11
27
13
14
null
null
heathweiss/Tricad
src/Stl/StlCornerPoints.hs
gpl-2.0
faces |+++^| cornerPoints = concat $ zipWith (+++^) faces cornerPoints
70
faces |+++^| cornerPoints = concat $ zipWith (+++^) faces cornerPoints
70
faces |+++^| cornerPoints = concat $ zipWith (+++^) faces cornerPoints
70
false
false
0
6
9
28
13
15
null
null
yu-i9/thih
TypingHaskellInHaskell.hs
bsd-3-clause
pair :: Type -> Type -> Type pair a b = TAp (TAp tTuple2 a) b
70
pair :: Type -> Type -> Type pair a b = TAp (TAp tTuple2 a) b
70
pair a b = TAp (TAp tTuple2 a) b
35
false
true
0
7
24
37
18
19
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_MIRROR_CLAMP_TO_EDGE_EXT :: GLenum gl_MIRROR_CLAMP_TO_EDGE_EXT = 0x8743
74
gl_MIRROR_CLAMP_TO_EDGE_EXT :: GLenum gl_MIRROR_CLAMP_TO_EDGE_EXT = 0x8743
74
gl_MIRROR_CLAMP_TO_EDGE_EXT = 0x8743
36
false
true
0
4
5
11
6
5
null
null
ingemaradahl/bilder
src/TypeChecker/Renamer.hs
lgpl-3.0
renameFunction ∷ Function → TCM Function renameFunction fun = do updateFile (locfile fun) pushScope pushAlias paramVars' ← mapM renameVariable (paramVars fun) parameters' ← mapM renameParam (parameters fun) statements' ← mapM renameStm (statements fun) popAlias popScope return fun { paramVars...
399
renameFunction ∷ Function → TCM Function renameFunction fun = do updateFile (locfile fun) pushScope pushAlias paramVars' ← mapM renameVariable (paramVars fun) parameters' ← mapM renameParam (parameters fun) statements' ← mapM renameStm (statements fun) popAlias popScope return fun { paramVars...
399
renameFunction fun = do updateFile (locfile fun) pushScope pushAlias paramVars' ← mapM renameVariable (paramVars fun) parameters' ← mapM renameParam (parameters fun) statements' ← mapM renameStm (statements fun) popAlias popScope return fun { paramVars = paramVars' , parameters = paramete...
358
false
true
0
10
86
125
58
67
null
null
shimazing/haskell-study-fall2016
HW03/HW03.hs
bsd-3-clause
{- Calculate the floor of the square root of the input B := 0; while (A >= B * B) { B++ }; B := B - 1 -} squareRoot :: Statement squareRoot = slist [ Assign "B" (Val 0) , While (Op (Var "A") Ge (Op (Var "B") Times (Var "B"))) (Incr "B") , As...
378
squareRoot :: Statement squareRoot = slist [ Assign "B" (Val 0) , While (Op (Var "A") Ge (Op (Var "B") Times (Var "B"))) (Incr "B") , Assign "B" (Op (Var "B") Minus (Val 1)) ]
255
squareRoot = slist [ Assign "B" (Val 0) , While (Op (Var "A") Ge (Op (Var "B") Times (Var "B"))) (Incr "B") , Assign "B" (Op (Var "B") Minus (Val 1)) ]
231
true
true
0
12
161
117
57
60
null
null
sinelaw/lamdu
Lamdu/GUI/ExpressionGui.hs
gpl-3.0
makeCollisionSuffixLabels :: MonadA m => Sugar.NameCollision -> AnimId -> WE.WidgetEnvT m [Widget f] makeCollisionSuffixLabels Sugar.NoCollision _ = return []
160
makeCollisionSuffixLabels :: MonadA m => Sugar.NameCollision -> AnimId -> WE.WidgetEnvT m [Widget f] makeCollisionSuffixLabels Sugar.NoCollision _ = return []
160
makeCollisionSuffixLabels Sugar.NoCollision _ = return []
57
false
true
0
10
20
53
25
28
null
null
Jiggins/CS225-Haskell
DataTypes.hs
mit
main'' = print $ ComplexInt 1 2
31
main'' = print $ ComplexInt 1 2
31
main'' = print $ ComplexInt 1 2
31
false
false
0
6
6
15
7
8
null
null
kawamuray/ganeti
src/Ganeti/OpParams.hs
gpl-2.0
pInstOs :: Field pInstOs = withDoc "OS type for instance installation" $ optionalNEStringField "os_type"
108
pInstOs :: Field pInstOs = withDoc "OS type for instance installation" $ optionalNEStringField "os_type"
108
pInstOs = withDoc "OS type for instance installation" $ optionalNEStringField "os_type"
91
false
true
0
6
17
21
10
11
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_V_COMMENT :: Int wxSTC_V_COMMENT = 1
42
wxSTC_V_COMMENT :: Int wxSTC_V_COMMENT = 1
42
wxSTC_V_COMMENT = 1
19
false
true
0
4
5
11
6
5
null
null
huggablemonad/smooch
app/src/ParseCNF.hs
gpl-3.0
addObjNumberToPositions :: [[SetPos]] -> [(Int, [SetPos])] addObjNumberToPositions xs = reverse $ foldl (\acc objPos -> (length acc, objPos):acc) [] xs
151
addObjNumberToPositions :: [[SetPos]] -> [(Int, [SetPos])] addObjNumberToPositions xs = reverse $ foldl (\acc objPos -> (length acc, objPos):acc) [] xs
151
addObjNumberToPositions xs = reverse $ foldl (\acc objPos -> (length acc, objPos):acc) [] xs
92
false
true
0
11
19
72
40
32
null
null
lancelet/inner-change
src/Network/InnerChange/XML/Types.hs
bsd-3-clause
genericSumTypeToElement :: ( Generic a , GSumTypeToElement (Rep a) ) => Options -> a -> XML.Element genericSumTypeToElement opts x = freeze $ gsumTypeToElement opts (from x) emptyPartialElement
296
genericSumTypeToElement :: ( Generic a , GSumTypeToElement (Rep a) ) => Options -> a -> XML.Element genericSumTypeToElement opts x = freeze $ gsumTypeToElement opts (from x) emptyPartialElement
296
genericSumTypeToElement opts x = freeze $ gsumTypeToElement opts (from x) emptyPartialElement
97
false
true
0
8
129
64
32
32
null
null
siddhanathan/yi
yi-core/src/Yi/Debug.hs
gpl-2.0
logStream :: Show a => T.Text -> Chan a -> IO () logStream msg ch = do logPutStrLn $ "Logging stream " <> msg logThreadId <- forkIO $ logStreamThread msg ch labelThread logThreadId "LogStream"
198
logStream :: Show a => T.Text -> Chan a -> IO () logStream msg ch = do logPutStrLn $ "Logging stream " <> msg logThreadId <- forkIO $ logStreamThread msg ch labelThread logThreadId "LogStream"
198
logStream msg ch = do logPutStrLn $ "Logging stream " <> msg logThreadId <- forkIO $ logStreamThread msg ch labelThread logThreadId "LogStream"
149
false
true
0
9
39
76
34
42
null
null
DavidAlphaFox/ghc
libraries/containers/Data/Map/Strict.hs
bsd-3-clause
-- | /O(log n)/. The expression (@'update' f k map@) updates the value @x@ -- at @k@ (if it is in the map). If (@f x@) is 'Nothing', the element is -- deleted. If it is (@'Just' y@), the key @k@ is bound to the new value @y@. -- -- > let f x = if x == "a" then Just "new a" else Nothing -- > update f 5 (fromList [(5,"a"...
614
update :: Ord k => (a -> Maybe a) -> k -> Map k a -> Map k a update f = updateWithKey (\_ x -> f x)
99
update f = updateWithKey (\_ x -> f x)
38
true
true
0
10
134
81
42
39
null
null
frantisekfarka/ghc-dsi
ghc/Main.hs
bsd-3-clause
isShowVersionMode :: Mode -> Bool isShowVersionMode (Left ShowVersion) = True
77
isShowVersionMode :: Mode -> Bool isShowVersionMode (Left ShowVersion) = True
77
isShowVersionMode (Left ShowVersion) = True
43
false
true
0
7
9
24
12
12
null
null
forsyde/forsyde-atom
src/ForSyDe/Atom/MoC.hs
bsd-3-clause
ctxt24 (c1,c2) ps f = warg c1 $ ctxt14 c2 ps . f
67
ctxt24 (c1,c2) ps f = warg c1 $ ctxt14 c2 ps . f
67
ctxt24 (c1,c2) ps f = warg c1 $ ctxt14 c2 ps . f
67
false
false
0
7
31
35
17
18
null
null
bmillwood/pointfree
test/Test.hs
mit
pfloop :: IO () pfloop = do line' <- Just `fmap` getLine case line' of Just line | all isSpace line -> pfloop | otherwise -> do pf line pfloop Nothing -> putStrLn "Bye."
223
pfloop :: IO () pfloop = do line' <- Just `fmap` getLine case line' of Just line | all isSpace line -> pfloop | otherwise -> do pf line pfloop Nothing -> putStrLn "Bye."
223
pfloop = do line' <- Just `fmap` getLine case line' of Just line | all isSpace line -> pfloop | otherwise -> do pf line pfloop Nothing -> putStrLn "Bye."
207
false
true
0
14
87
89
38
51
null
null
rehno-lindeque/elm-reactor
src/backend/Main.hs
bsd-3-clause
serveHtml :: MonadSnap m => H.Html -> m () serveHtml html = do modifyResponse (setContentType "text/html") writeBuilder (Blaze.renderHtmlBuilder html) -- SERVE FILES + CODE HIGHLIGHTING
197
serveHtml :: MonadSnap m => H.Html -> m () serveHtml html = do modifyResponse (setContentType "text/html") writeBuilder (Blaze.renderHtmlBuilder html) -- SERVE FILES + CODE HIGHLIGHTING
197
serveHtml html = do modifyResponse (setContentType "text/html") writeBuilder (Blaze.renderHtmlBuilder html) -- SERVE FILES + CODE HIGHLIGHTING
154
false
true
0
11
36
64
28
36
null
null
kaizhang/bioinformatics-toolkit
bioinformatics-toolkit/src/Bio/RealWorld/ENCODE.hs
mit
-- | accession queryById :: EncodeAcc -> IO (Either String Value) queryById acc = jsonFromUrl $ "experiments/" ++ BS.unpack (fromID acc)
136
queryById :: EncodeAcc -> IO (Either String Value) queryById acc = jsonFromUrl $ "experiments/" ++ BS.unpack (fromID acc)
121
queryById acc = jsonFromUrl $ "experiments/" ++ BS.unpack (fromID acc)
70
true
true
0
9
20
53
25
28
null
null
sweirich/hs-inferno
src/Language/Inferno/M/SolverHi.hs
bsd-3-clause
exist_aux_ :: Maybe (Src t (U.Variable (Src t))) -> (U.Variable (Src t) -> M (Co t a)) -> M (Co t a) exist_aux_ t f = do v <- Lo.makeFresh t Co rc k <- f v return $ Co (Lo.CExist v rc) k
206
exist_aux_ :: Maybe (Src t (U.Variable (Src t))) -> (U.Variable (Src t) -> M (Co t a)) -> M (Co t a) exist_aux_ t f = do v <- Lo.makeFresh t Co rc k <- f v return $ Co (Lo.CExist v rc) k
206
exist_aux_ t f = do v <- Lo.makeFresh t Co rc k <- f v return $ Co (Lo.CExist v rc) k
91
false
true
0
12
63
138
64
74
null
null
NikolayS/postgrest
src/PostgREST/QueryBuilder.hs
mit
pgFmtField :: QualifiedIdentifier -> Field -> SqlFragment pgFmtField table (c, jp) = pgFmtColumn table c <> pgFmtJsonPath jp
124
pgFmtField :: QualifiedIdentifier -> Field -> SqlFragment pgFmtField table (c, jp) = pgFmtColumn table c <> pgFmtJsonPath jp
124
pgFmtField table (c, jp) = pgFmtColumn table c <> pgFmtJsonPath jp
66
false
true
0
6
17
47
22
25
null
null
sdiehl/ghc
compiler/GHC/Cmm/Switch.hs
bsd-3-clause
-- If we have a default, we have to interleave segments that jump -- to the default between the maps mkFlatSwitchPlan signed (Just l) r ms = let ((_,p1):ps) = go r ms in (p1, ps) where go (lo,hi) [] | lo > hi = [] | otherwise = [(lo, Unconditionally l)] go (lo,hi) (m:ms) | lo < min ...
618
mkFlatSwitchPlan signed (Just l) r ms = let ((_,p1):ps) = go r ms in (p1, ps) where go (lo,hi) [] | lo > hi = [] | otherwise = [(lo, Unconditionally l)] go (lo,hi) (m:ms) | lo < min = (lo, Unconditionally l) : go (min,hi) (m:ms) | lo == min = (lo, mkLeafPlan sig...
517
mkFlatSwitchPlan signed (Just l) r ms = let ((_,p1):ps) = go r ms in (p1, ps) where go (lo,hi) [] | lo > hi = [] | otherwise = [(lo, Unconditionally l)] go (lo,hi) (m:ms) | lo < min = (lo, Unconditionally l) : go (min,hi) (m:ms) | lo == min = (lo, mkLeafPlan sig...
517
true
false
4
11
198
294
148
146
null
null
khajavi/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
classAttr :: GenParser Char st ([Char], [[Char]], [a]) classAttr = try $ do char '.' result <- identifier return ("",[result],[])
135
classAttr :: GenParser Char st ([Char], [[Char]], [a]) classAttr = try $ do char '.' result <- identifier return ("",[result],[])
135
classAttr = try $ do char '.' result <- identifier return ("",[result],[])
80
false
true
0
10
25
76
41
35
null
null
maximilianhuber/softwareProjekt
src/GalFld/Core/Polynomials/FFTTuple.hs
bsd-3-clause
ss 2 f g = multPM f g
21
ss 2 f g = multPM f g
21
ss 2 f g = multPM f g
21
false
false
1
5
7
20
8
12
null
null
siddhanathan/yi
yi-core/src/Yi/Debug.hs
gpl-2.0
-- | Set the file to which debugging output should be written. Though this -- is called /init/Debug. -- Debugging output is not created by default (i.e., if this function -- is never called.) -- The target file can not be changed, nor debugging disabled. initDebug :: FilePath -> IO () initDebug f = do hndl <- readIOR...
614
initDebug :: FilePath -> IO () initDebug f = do hndl <- readIORef dbgHandle case hndl of Nothing -> do openFile f WriteMode >>= writeIORef dbgHandle . Just logPutStrLn "Logging initialized." Just _ -> logPutStrLn "Attempt to re-initialize the logging system." -- | Outputs the given strin...
359
initDebug f = do hndl <- readIORef dbgHandle case hndl of Nothing -> do openFile f WriteMode >>= writeIORef dbgHandle . Just logPutStrLn "Logging initialized." Just _ -> logPutStrLn "Attempt to re-initialize the logging system." -- | Outputs the given string before returning the second a...
328
true
true
0
14
128
89
42
47
null
null
tpsinnem/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
isInjective :: TT n -> Bool isInjective (P (DCon _ _ _) _ _) = True
67
isInjective :: TT n -> Bool isInjective (P (DCon _ _ _) _ _) = True
67
isInjective (P (DCon _ _ _) _ _) = True
39
false
true
0
9
15
41
20
21
null
null
vTurbine/ghc
compiler/typecheck/TcBinds.hs
bsd-3-clause
newLetBndr (LetGblBndr prags) name ty = addInlinePrags (mkLocalId name ty) (lookupPragEnv prags name)
103
newLetBndr (LetGblBndr prags) name ty = addInlinePrags (mkLocalId name ty) (lookupPragEnv prags name)
103
newLetBndr (LetGblBndr prags) name ty = addInlinePrags (mkLocalId name ty) (lookupPragEnv prags name)
103
false
false
0
7
14
43
19
24
null
null
chreekat/yesod
yesod-auth/Yesod/Auth/Message.hs
bsd-2-clause
englishMessage AddressVerified = "Address verified, please set a new password"
78
englishMessage AddressVerified = "Address verified, please set a new password"
78
englishMessage AddressVerified = "Address verified, please set a new password"
78
false
false
0
5
9
9
4
5
null
null
Slava/6.035-decaf-compiler
src/LLIR.hs
mit
replaceOp :: VInstruction -> Int -> ValueRef -> VInstruction replaceOp (VUnOp a b _) 0 nval = (VUnOp a b nval)
110
replaceOp :: VInstruction -> Int -> ValueRef -> VInstruction replaceOp (VUnOp a b _) 0 nval = (VUnOp a b nval)
110
replaceOp (VUnOp a b _) 0 nval = (VUnOp a b nval)
49
false
true
0
7
20
50
25
25
null
null
ml9951/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
eqCanRewriteFR (Derived, NomEq) (Derived, NomEq) = True
58
eqCanRewriteFR (Derived, NomEq) (Derived, NomEq) = True
58
eqCanRewriteFR (Derived, NomEq) (Derived, NomEq) = True
58
false
false
0
6
9
23
13
10
null
null
Fuuzetsu/haddock
haddock-api/src/Haddock/Backends/Xhtml/Names.hs
bsd-2-clause
wrapInfix :: Notation -> OccName -> Html -> Html wrapInfix notation n = case notation of Infix | is_star_kind -> id | not is_sym -> quote Prefix | is_star_kind -> id | is_sym -> parens _ -> id where is_sym = isSymOcc n is_star_kind = isTcOcc n && occNameString n == "*"
302
wrapInfix :: Notation -> OccName -> Html -> Html wrapInfix notation n = case notation of Infix | is_star_kind -> id | not is_sym -> quote Prefix | is_star_kind -> id | is_sym -> parens _ -> id where is_sym = isSymOcc n is_star_kind = isTcOcc n && occNameString n == "*"
302
wrapInfix notation n = case notation of Infix | is_star_kind -> id | not is_sym -> quote Prefix | is_star_kind -> id | is_sym -> parens _ -> id where is_sym = isSymOcc n is_star_kind = isTcOcc n && occNameString n == "*"
253
false
true
4
11
84
126
53
73
null
null
rahulmutt/codec-jvm
src/Codec/JVM/ASM/Code.hs
apache-2.0
fcmpg = cmpOp jfloat OP.fcmpg
29
fcmpg = cmpOp jfloat OP.fcmpg
29
fcmpg = cmpOp jfloat OP.fcmpg
29
false
false
1
6
4
18
6
12
null
null
tonyday567/hdcharts
src/Data/XYZ.hs
mit
hist2xyz :: (Bin b, IntervalBin b, BinValue b ~ Double) => Histogram b Double-> [XYZ] hist2xyz h = zipWith (\v (l,u) -> XYZ l v (u-l)) (V.toList $ histData h) (V.toList $ binsList $ bins h :: [(Double,Double)])
240
hist2xyz :: (Bin b, IntervalBin b, BinValue b ~ Double) => Histogram b Double-> [XYZ] hist2xyz h = zipWith (\v (l,u) -> XYZ l v (u-l)) (V.toList $ histData h) (V.toList $ binsList $ bins h :: [(Double,Double)])
240
hist2xyz h = zipWith (\v (l,u) -> XYZ l v (u-l)) (V.toList $ histData h) (V.toList $ binsList $ bins h :: [(Double,Double)])
154
false
true
0
10
67
129
68
61
null
null
gridaphobe/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
pprStmt (BindStmt pat expr _ _) = hsep [ppr pat, larrow, ppr expr]
68
pprStmt (BindStmt pat expr _ _) = hsep [ppr pat, larrow, ppr expr]
68
pprStmt (BindStmt pat expr _ _) = hsep [ppr pat, larrow, ppr expr]
68
false
false
0
7
14
39
19
20
null
null
acowley/ghc
compiler/deSugar/DsUtils.hs
bsd-3-clause
wrapBinds ((new,old):prs) e = wrapBind new old (wrapBinds prs e)
64
wrapBinds ((new,old):prs) e = wrapBind new old (wrapBinds prs e)
64
wrapBinds ((new,old):prs) e = wrapBind new old (wrapBinds prs e)
64
false
false
0
8
9
39
20
19
null
null
lally/libmet
src/Ppt/Agent/ElfProtocol.hs
bsd-3-clause
initCounters :: IO (Bool) initCounters = do res <- [C.exp| int{ pfm_initialize() } |] return $ (fromIntegral ( [C.pure| int { $(int res) == PFM_SUCCESS }|])) /= 0
166
initCounters :: IO (Bool) initCounters = do res <- [C.exp| int{ pfm_initialize() } |] return $ (fromIntegral ( [C.pure| int { $(int res) == PFM_SUCCESS }|])) /= 0
166
initCounters = do res <- [C.exp| int{ pfm_initialize() } |] return $ (fromIntegral ( [C.pure| int { $(int res) == PFM_SUCCESS }|])) /= 0
140
false
true
0
12
31
62
33
29
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
3689 = 3688
11
3689 = 3688
11
3689 = 3688
11
false
false
1
5
2
10
3
7
null
null
GRACeFUL-project/haskelzinc
src/Interfaces/MZBuiltIns.hs
bsd-3-clause
-- | @++@ (++.) = Bi mz_pp
26
(++.) = Bi mz_pp
16
(++.) = Bi mz_pp
16
true
false
0
5
6
12
7
5
null
null
AndrewBrinker/scheme
src/Scheme/Parse.hs
mit
-- | Parser accepting any valid Scheme symbol. symbol :: Parser Char symbol = oneOf "!#$%&|*+-/:<=>?@^_~"
105
symbol :: Parser Char symbol = oneOf "!#$%&|*+-/:<=>?@^_~"
58
symbol = oneOf "!#$%&|*+-/:<=>?@^_~"
36
true
true
0
5
15
18
9
9
null
null
toddmohney/EventCalendar
src/Config.hs
mit
getDefaultConnectionString :: Environment -> DB.ConnectionString getDefaultConnectionString Development = "host=localhost port=5432 user=postgres dbname=event_calendar_development"
182
getDefaultConnectionString :: Environment -> DB.ConnectionString getDefaultConnectionString Development = "host=localhost port=5432 user=postgres dbname=event_calendar_development"
182
getDefaultConnectionString Development = "host=localhost port=5432 user=postgres dbname=event_calendar_development"
117
false
true
0
6
13
20
10
10
null
null
pwestling/hmonit
src/Html.hs
bsd-3-clause
filterRow :: (String -> Bool) -> Rows -> Rows filterRow f (Rows l) = Rows $ filter filt l where filt = f . snd
112
filterRow :: (String -> Bool) -> Rows -> Rows filterRow f (Rows l) = Rows $ filter filt l where filt = f . snd
112
filterRow f (Rows l) = Rows $ filter filt l where filt = f . snd
66
false
true
0
7
26
56
29
27
null
null
SimSaladin/hahet
src/Hahet/Modules/DateTimeManager.hs
mit
curTimeZone :: Sh TimeZone curTimeZone = liftM T.pack . print_stdout False . escaping False $ runHandle "timedatectl" ["status | awk '/Timezone/{printf $2}'"] (liftIO . hGetLine)
196
curTimeZone :: Sh TimeZone curTimeZone = liftM T.pack . print_stdout False . escaping False $ runHandle "timedatectl" ["status | awk '/Timezone/{printf $2}'"] (liftIO . hGetLine)
196
curTimeZone = liftM T.pack . print_stdout False . escaping False $ runHandle "timedatectl" ["status | awk '/Timezone/{printf $2}'"] (liftIO . hGetLine)
169
false
true
0
8
42
62
27
35
null
null
mainland/nikola
examples/common/GUI/Commands.hs
bsd-3-clause
glutKeyToKey (GLUT.Char '\13') = SpecialKey KeyEnter
79
glutKeyToKey (GLUT.Char '\13') = SpecialKey KeyEnter
79
glutKeyToKey (GLUT.Char '\13') = SpecialKey KeyEnter
79
false
false
0
8
32
20
9
11
null
null
hsyl20/HViperVM
lib/ViperVM/Graph/ParallelReducer.hs
lgpl-3.0
isFinal [x] = isDataNode x
26
isFinal [x] = isDataNode x
26
isFinal [x] = isDataNode x
26
false
false
0
6
4
15
7
8
null
null
ekmett/wxHaskell
wxdirect/src/CompileSTC.hs
lgpl-2.1
macro :: Function -> String macro (ret, func, _args) = "EWXWEXPORT(" ++ ret ++ ", wxStyledTextCtrl_" ++ func ++ ")"
116
macro :: Function -> String macro (ret, func, _args) = "EWXWEXPORT(" ++ ret ++ ", wxStyledTextCtrl_" ++ func ++ ")"
115
macro (ret, func, _args) = "EWXWEXPORT(" ++ ret ++ ", wxStyledTextCtrl_" ++ func ++ ")"
87
false
true
0
8
20
47
24
23
null
null
spire/spire
src/Spire/Canonical/Checker.hs
bsd-3-clause
checkV VBool _ = throwError "Ill-typed!"
46
checkV VBool _ = throwError "Ill-typed!"
46
checkV VBool _ = throwError "Ill-typed!"
46
false
false
0
5
11
14
6
8
null
null
jstolarek/slicer
src/Language/Slicer/Monad/Repl.hs
gpl-3.0
getGamma :: ReplM (Env C.Type) getGamma = do ReplState { gammaS } <- get return gammaS -- | Get environment
112
getGamma :: ReplM (Env C.Type) getGamma = do ReplState { gammaS } <- get return gammaS -- | Get environment
112
getGamma = do ReplState { gammaS } <- get return gammaS -- | Get environment
81
false
true
0
9
24
42
20
22
null
null
sinelaw/fresh
src/Fresh/OrderedSet.hs
gpl-2.0
concatUnions :: Ord a => [OrderedSet a] -> OrderedSet a concatUnions [] = empty
79
concatUnions :: Ord a => [OrderedSet a] -> OrderedSet a concatUnions [] = empty
79
concatUnions [] = empty
23
false
true
0
8
13
36
17
19
null
null
akegalj/snowdrift
tests/NotifyTest.hs
agpl-3.0
errWhenExistsProjectWebsiteNotif = errWebsiteNotif countProjectWebsiteNotif errWhenExists project_notification
122
errWhenExistsProjectWebsiteNotif = errWebsiteNotif countProjectWebsiteNotif errWhenExists project_notification
122
errWhenExistsProjectWebsiteNotif = errWebsiteNotif countProjectWebsiteNotif errWhenExists project_notification
122
false
false
0
5
17
13
6
7
null
null
sboosali/commands-backends-osx9
sources/Commands/Backends/OSX/Constants.hs
mit
keycode F12Key = 0x6F
31
keycode F12Key = 0x6F
31
keycode F12Key = 0x6F
31
false
false
0
5
13
9
4
5
null
null
mniip/h6502
src/H6502/Util.hs
mit
push :: Monad m => Word8 -> H6502T m () push x = H6502T $ \e s -> do let sp = reg_s s memoryWrite e (onStack sp) x return ((), s{reg_s = sp - 1}) -- | Pop a little-endian word from the stack.
204
push :: Monad m => Word8 -> H6502T m () push x = H6502T $ \e s -> do let sp = reg_s s memoryWrite e (onStack sp) x return ((), s{reg_s = sp - 1}) -- | Pop a little-endian word from the stack.
204
push x = H6502T $ \e s -> do let sp = reg_s s memoryWrite e (onStack sp) x return ((), s{reg_s = sp - 1}) -- | Pop a little-endian word from the stack.
164
false
true
0
13
57
98
48
50
null
null
omefire/lens
src/Control/Lens/Fold.hs
bsd-3-clause
------------------------------------------------------------------------------ -- Folds with Reified Monoid ------------------------------------------------------------------------------ -- | Fold a value using a specified 'Fold' and 'Monoid' operations. -- This is like 'foldBy' where the 'Foldable' instance can be --...
912
foldByOf :: Fold s a -> (a -> a -> a) -> a -> s -> a foldByOf l f z = reifyMonoid f z (foldMapOf l ReflectedMonoid)
115
foldByOf l f z = reifyMonoid f z (foldMapOf l ReflectedMonoid)
62
true
true
0
9
197
86
53
33
null
null
tismith/tlisp
src/Parse.hs
mit
parseOctal :: Parser LispVal parseOctal = do try $ string "#o" os <- many1 octDigit return $ (Number . fst . head . readOct) os
139
parseOctal :: Parser LispVal parseOctal = do try $ string "#o" os <- many1 octDigit return $ (Number . fst . head . readOct) os
139
parseOctal = do try $ string "#o" os <- many1 octDigit return $ (Number . fst . head . readOct) os
110
false
true
0
12
36
59
27
32
null
null
seckcoder/vector
Data/Vector.hs
bsd-3-clause
postscanl = G.postscanl
23
postscanl = G.postscanl
23
postscanl = G.postscanl
23
false
false
0
5
2
8
4
4
null
null
mathk/arm-isa
Arm/ThumbDecode.hs
mit
decodeImmediateBranchLinkT2 :: ThumbStreamState Word32 decodeImmediateBranchLinkT2 = do s <- instructionFlag 26 i1 <- (bToW . not . (`bxor` s)) <$> instructionFlag 13 i2 <- (bToW . not . (`bxor` s)) <$> instructionFlag 11 imm10L <- (`shiftL` 2) <$> instructionBits 1 10 imm10H <- (`shiftL` 12) ...
603
decodeImmediateBranchLinkT2 :: ThumbStreamState Word32 decodeImmediateBranchLinkT2 = do s <- instructionFlag 26 i1 <- (bToW . not . (`bxor` s)) <$> instructionFlag 13 i2 <- (bToW . not . (`bxor` s)) <$> instructionFlag 11 imm10L <- (`shiftL` 2) <$> instructionBits 1 10 imm10H <- (`shiftL` 12) <...
602
decodeImmediateBranchLinkT2 = do s <- instructionFlag 26 i1 <- (bToW . not . (`bxor` s)) <$> instructionFlag 13 i2 <- (bToW . not . (`bxor` s)) <$> instructionFlag 11 imm10L <- (`shiftL` 2) <$> instructionBits 1 10 imm10H <- (`shiftL` 12) <$> instructionBits 16 10 sign <- instructionSigned...
547
false
true
0
11
176
244
129
115
null
null
batterseapower/supercompilation-by-evaluation
Core/Parser.hs
bsd-3-clause
altCore :: LHE.Alt -> ParseM Alt altCore (LHE.Alt _loc pat (LHE.UnGuardedAlt e) (LHE.BDecls binds)) = do xes <- declsCore binds e <- expCore e return (altcon, build (bind xes e)) where (altcon, build) = altPatCore pat
231
altCore :: LHE.Alt -> ParseM Alt altCore (LHE.Alt _loc pat (LHE.UnGuardedAlt e) (LHE.BDecls binds)) = do xes <- declsCore binds e <- expCore e return (altcon, build (bind xes e)) where (altcon, build) = altPatCore pat
231
altCore (LHE.Alt _loc pat (LHE.UnGuardedAlt e) (LHE.BDecls binds)) = do xes <- declsCore binds e <- expCore e return (altcon, build (bind xes e)) where (altcon, build) = altPatCore pat
198
false
true
0
11
49
113
54
59
null
null
bredelings/BAli-Phy
haskell/Data/Map.hs
gpl-2.0
elems m = List.map snd $ toAscList m
36
elems m = List.map snd $ toAscList m
36
elems m = List.map snd $ toAscList m
36
false
false
1
6
7
24
9
15
null
null
kazu-yamamoto/rpf
RPF/Eval.hs
bsd-3-clause
include ms _ _ (DT_Res, vid) (_, CV_Result rs) = getRes vid `elem` rs where getRes V_SPF = msSPFResult ms getRes V_SID = msSenderIDResult ms getRes V_ADSP = msADSPResult ms getRes V_DKIM = msDKIMResult ms getRes V_DK = msDKResult ms getRes _ = error "getRes"
293
include ms _ _ (DT_Res, vid) (_, CV_Result rs) = getRes vid `elem` rs where getRes V_SPF = msSPFResult ms getRes V_SID = msSenderIDResult ms getRes V_ADSP = msADSPResult ms getRes V_DKIM = msDKIMResult ms getRes V_DK = msDKResult ms getRes _ = error "getRes"
293
include ms _ _ (DT_Res, vid) (_, CV_Result rs) = getRes vid `elem` rs where getRes V_SPF = msSPFResult ms getRes V_SID = msSenderIDResult ms getRes V_ADSP = msADSPResult ms getRes V_DKIM = msDKIMResult ms getRes V_DK = msDKResult ms getRes _ = error "getRes"
293
false
false
5
7
79
104
53
51
null
null
forste/haReFork
tools/base/lib/Monads/IxOutputM.hs
bsd-3-clause
foldOutput :: b -> (o -> b) -> (b -> b -> b) -> OutputM o a -> (a,b) foldOutput e s j (O x tree) = (x, Tree.fold e s j tree)
125
foldOutput :: b -> (o -> b) -> (b -> b -> b) -> OutputM o a -> (a,b) foldOutput e s j (O x tree) = (x, Tree.fold e s j tree)
125
foldOutput e s j (O x tree) = (x, Tree.fold e s j tree)
56
false
true
0
10
33
90
47
43
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Healthcare/Types/Product.hs
mpl-2.0
-- | The value to match with the field. For example, \"My Application Name\" -- or \"2.3\". vsValue :: Lens' VersionSource (Maybe Text) vsValue = lens _vsValue (\ s a -> s{_vsValue = a})
186
vsValue :: Lens' VersionSource (Maybe Text) vsValue = lens _vsValue (\ s a -> s{_vsValue = a})
94
vsValue = lens _vsValue (\ s a -> s{_vsValue = a})
50
true
true
2
9
33
56
26
30
null
null
ndmitchell/extra
Generate.hs
bsd-3-clause
excludeTests :: [String] -- FIXME: Should probably generate these in another module excludeTests = ["Data.List.NonEmpty.Extra" -- because !? clashes and is tested ]
172
excludeTests :: [String] excludeTests = ["Data.List.NonEmpty.Extra" -- because !? clashes and is tested ]
113
excludeTests = ["Data.List.NonEmpty.Extra" -- because !? clashes and is tested ]
88
true
true
0
5
30
19
12
7
null
null
alphalambda/codeworld
codeworld-compiler/src/CodeWorld/Compile/Framework.hs
apache-2.0
getParsedCode :: MonadCompile m => FilePath -> m ParsedCode getParsedCode src = do cached <- gets compileParsedSource case M.lookup src cached of Just parsed -> return parsed Nothing -> do source <- getSourceCode src parsed <- parseCode ["TupleSections"] (decodeUtf8 sourc...
438
getParsedCode :: MonadCompile m => FilePath -> m ParsedCode getParsedCode src = do cached <- gets compileParsedSource case M.lookup src cached of Just parsed -> return parsed Nothing -> do source <- getSourceCode src parsed <- parseCode ["TupleSections"] (decodeUtf8 sourc...
438
getParsedCode src = do cached <- gets compileParsedSource case M.lookup src cached of Just parsed -> return parsed Nothing -> do source <- getSourceCode src parsed <- parseCode ["TupleSections"] (decodeUtf8 source) modify $ \state -> state { compileParsedSourc...
378
false
true
0
17
126
136
62
74
null
null
sopvop/cabal
cabal-install/Distribution/Solver/Modular/Explore.hs
bsd-3-clause
getBestGoal :: ConflictMap -> P.PSQ (Goal QPN) a -> (Goal QPN, a) getBestGoal cm = P.maximumBy ( flip (M.findWithDefault 0) cm . (\ (Goal v _) -> v) )
164
getBestGoal :: ConflictMap -> P.PSQ (Goal QPN) a -> (Goal QPN, a) getBestGoal cm = P.maximumBy ( flip (M.findWithDefault 0) cm . (\ (Goal v _) -> v) )
164
getBestGoal cm = P.maximumBy ( flip (M.findWithDefault 0) cm . (\ (Goal v _) -> v) )
98
false
true
0
11
42
85
43
42
null
null
snoyberg/hack-frontend-monadcgi
samples/hack_cgi.hs
bsd-2-clause
mainCGI = Network.CGI.output "This is a test"
45
mainCGI = Network.CGI.output "This is a test"
45
mainCGI = Network.CGI.output "This is a test"
45
false
false
1
6
6
15
6
9
null
null
alexbaluta/courseography
dependencies/HaXml-1.25.3/src/Text/XML/HaXml/Combinators.hs
gpl-3.0
-- CONSTRUCTIVE CONTENT FILTERS -- -- $constructive -- The constructive filters are primitive filters for building new elements, -- or editing existing elements. -- | Build an element with the given tag name - its content is the results -- of the given list of filters. mkElem :: String -> [CFilter i] -> CFilter i mk...
385
mkElem :: String -> [CFilter i] -> CFilter i mkElem h cfs = \t-> [ CElem (Elem (N h) [] (cat cfs t)) undefined ]
112
mkElem h cfs = \t-> [ CElem (Elem (N h) [] (cat cfs t)) undefined ]
67
true
true
0
12
73
84
44
40
null
null
JPMoresmau/haskell-ide-engine
src/Haskell/Ide/Engine/Transport/JsonStdio.hs
bsd-3-clause
parseFrames :: forall m. Monad m => P.Producer B.ByteString m () -> P.Producer (Either PAe.DecodingError WireRequest) m () parseFrames prod0 = do -- if there are no more bytes, we just return () (isEmpty, prod1) <- lift $ runStateT PB.isEndOfBytes prod0 if isEmpty then return () else go prod1 where ...
2,143
parseFrames :: forall m. Monad m => P.Producer B.ByteString m () -> P.Producer (Either PAe.DecodingError WireRequest) m () parseFrames prod0 = do -- if there are no more bytes, we just return () (isEmpty, prod1) <- lift $ runStateT PB.isEndOfBytes prod0 if isEmpty then return () else go prod1 where ...
2,143
parseFrames prod0 = do -- if there are no more bytes, we just return () (isEmpty, prod1) <- lift $ runStateT PB.isEndOfBytes prod0 if isEmpty then return () else go prod1 where -- ignore inputs consisting only of space terminatedJSON :: AB.Parser (Maybe Value) terminatedJSON = (fmap Just $ json' <* ...
2,009
false
true
0
25
754
577
277
300
null
null
andgate/GXK
src/Gx/Internal/Backend/GLFW.hs
gpl-2.0
callbackScroll :: IORef GLFWState -> Callbacks -> GLFW.Window -> Double -> Double -> IO () callbackScroll ref callbacks _ amountX amountY = scrollCallback callbacks ref $ V2 amountX amountY
210
callbackScroll :: IORef GLFWState -> Callbacks -> GLFW.Window -> Double -> Double -> IO () callbackScroll ref callbacks _ amountX amountY = scrollCallback callbacks ref $ V2 amountX amountY
210
callbackScroll ref callbacks _ amountX amountY = scrollCallback callbacks ref $ V2 amountX amountY
100
false
true
0
11
49
66
31
35
null
null
k0001/haskell-opaleye
Opaleye/Internal/Order.hs
bsd-3-clause
offset' :: Int -> (a, PQ.PrimQuery, T.Tag) -> (a, PQ.PrimQuery, T.Tag) offset' n (x, q, t) = (x, PQ.Limit (PQ.OffsetOp n) q, t)
127
offset' :: Int -> (a, PQ.PrimQuery, T.Tag) -> (a, PQ.PrimQuery, T.Tag) offset' n (x, q, t) = (x, PQ.Limit (PQ.OffsetOp n) q, t)
127
offset' n (x, q, t) = (x, PQ.Limit (PQ.OffsetOp n) q, t)
56
false
true
0
10
22
89
48
41
null
null
ezyang/ghc
libraries/base/Data/OldList.hs
bsd-3-clause
prependToAll sep (x:xs) = sep : x : prependToAll sep xs
55
prependToAll sep (x:xs) = sep : x : prependToAll sep xs
55
prependToAll sep (x:xs) = sep : x : prependToAll sep xs
55
false
false
0
7
10
31
15
16
null
null
wiggly/functional-pokering
src/Poker.hs
mit
addTally :: ShowdownTally -> ShowdownTally -> ShowdownTally addTally x y = ShowdownTally { win = (win x) + (win y), loss = (loss x) + (loss y), tie = (tie x) + (tie y) }
169
addTally :: ShowdownTally -> ShowdownTally -> ShowdownTally addTally x y = ShowdownTally { win = (win x) + (win y), loss = (loss x) + (loss y), tie = (tie x) + (tie y) }
169
addTally x y = ShowdownTally { win = (win x) + (win y), loss = (loss x) + (loss y), tie = (tie x) + (tie y) }
109
false
true
0
10
34
101
51
50
null
null
mitchellwrosen/llint
src/Static.hs
bsd-3-clause
staticStatement (LocalFunAssign info name body) = do let localPos = firstPos info nameLastPos = lastPos name bodyPos = firstPos body FunctionBody _ _ _ block = body endPos = lastStartPos info when (posCol nameLastPo...
529
staticStatement (LocalFunAssign info name body) = do let localPos = firstPos info nameLastPos = lastPos name bodyPos = firstPos body FunctionBody _ _ _ block = body endPos = lastStartPos info when (posCol nameLastPo...
529
staticStatement (LocalFunAssign info name body) = do let localPos = firstPos info nameLastPos = lastPos name bodyPos = firstPos body FunctionBody _ _ _ block = body endPos = lastStartPos info when (posCol nameLastPo...
529
false
false
0
12
182
121
56
65
null
null
parsonsmatt/cis194
hw10/AParser.hs
apache-2.0
inParser :: ((String -> Maybe (a1, String)) -- Parser function type -> String -- Parser input -> Maybe (a, String)) -- Parser Result -> Parser a1 -- Parser a1 -> Parser a -- Parser a inParser f = Parse...
337
inParser :: ((String -> Maybe (a1, String)) -- Parser function type -> String -- Parser input -> Maybe (a, String)) -- Parser Result -> Parser a1 -- Parser a1 -> Parser a inParser f = Parser . f . runParser
302
inParser f = Parser . f . runParser
35
true
true
0
11
161
77
42
35
null
null
AlexeyRaga/eta
compiler/ETA/CodeGen/Prim.hs
bsd-3-clause
simpleOp FloatSubOp = Just $ normalOp fsub
42
simpleOp FloatSubOp = Just $ normalOp fsub
42
simpleOp FloatSubOp = Just $ normalOp fsub
42
false
false
0
6
6
16
7
9
null
null
kadena-io/pact
src-tool/Pact/Analyze/Eval/Prop.hs
bsd-3-clause
evalPropSpecific Abort = sNot <$> evalPropSpecific Success
58
evalPropSpecific Abort = sNot <$> evalPropSpecific Success
58
evalPropSpecific Abort = sNot <$> evalPropSpecific Success
58
false
false
3
5
6
20
7
13
null
null
mitochon/hoosalind
src/problems/kmer.hs
mit
-- from lexf.hs lexf :: [a] -> Int -> [[a]] lexf gen n | n < 1 = [] | n == 1 = [ x:[] | x <- gen ] | otherwise = [ x:xs | x <- gen, xs <- lexf gen (n-1)]
159
lexf :: [a] -> Int -> [[a]] lexf gen n | n < 1 = [] | n == 1 = [ x:[] | x <- gen ] | otherwise = [ x:xs | x <- gen, xs <- lexf gen (n-1)]
143
lexf gen n | n < 1 = [] | n == 1 = [ x:[] | x <- gen ] | otherwise = [ x:xs | x <- gen, xs <- lexf gen (n-1)]
115
true
true
2
11
50
119
61
58
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Bare/OfType.hs
bsd-3-clause
txParam f πs t = f (txPvar (predMap πs t))
42
txParam f πs t = f (txPvar (predMap πs t))
42
txParam f πs t = f (txPvar (predMap πs t))
42
false
false
0
9
9
30
14
16
null
null
maggy96/haskell
cis194/01-intro/HW01.hs
mit
toDigits :: Integer -> [Integer] toDigits n | n > 0 = toDigits (n `div` 10) ++ [n `mod` 10] | otherwise = []
116
toDigits :: Integer -> [Integer] toDigits n | n > 0 = toDigits (n `div` 10) ++ [n `mod` 10] | otherwise = []
116
toDigits n | n > 0 = toDigits (n `div` 10) ++ [n `mod` 10] | otherwise = []
83
false
true
1
9
31
66
35
31
null
null
alpheccar/Signal
Plot.hs
bsd-3-clause
simplifySignal:: (HasDoubleRepresentation a, Ord b) => ((a,b) -> Point) -> ([(a,b)],SignalStyle) -> ([(a,b)],SignalStyle) simplifySignal pt (l,sty) = (simpl s0 v0 v0 (tail l), sty) where test (c,x) (a,y) = let (ta :+ _) = pt (c,x) (tb :+ _) = pt (a,y) ...
862
simplifySignal:: (HasDoubleRepresentation a, Ord b) => ((a,b) -> Point) -> ([(a,b)],SignalStyle) -> ([(a,b)],SignalStyle) simplifySignal pt (l,sty) = (simpl s0 v0 v0 (tail l), sty) where test (c,x) (a,y) = let (ta :+ _) = pt (c,x) (tb :+ _) = pt (a,y) ...
861
simplifySignal pt (l,sty) = (simpl s0 v0 v0 (tail l), sty) where test (c,x) (a,y) = let (ta :+ _) = pt (c,x) (tb :+ _) = pt (a,y) in floor ta == floor tb getNew l = let (s,v) = head l in (s, v) (s0,v0) = getNew l simpl !c !mi !ma [] = (c,mi):(c,ma):[] si...
695
false
true
5
11
413
461
244
217
null
null
alexandrnikitin/algorithm-sandbox
haskell/adventofcode/main.hs
mit
findFloor :: [Char] -> Int findFloor xs = move 0 xs
51
findFloor :: [Char] -> Int findFloor xs = move 0 xs
51
findFloor xs = move 0 xs
24
false
true
0
6
10
26
13
13
null
null
armoredsoftware/protocol
demos/PaulPractice/BookSimpleTypedLambda.hs
bsd-3-clause
{-- eval (App (Var x) y) = App (Var x) (eval y) eval (App (Varj x) y) = App (Varj x) (eval y) eval (App x y) = (App (eval x) y) --} eval x = x
143
eval x = x
10
eval x = x
10
true
false
0
5
37
10
5
5
null
null
sopvop/cabal
Cabal/Distribution/Types/ComponentEnabledSpec.hs
bsd-3-clause
-- | The default set of enabled components. Historically tests and -- benchmarks are NOT enabled by default. -- -- @since 2.0.0.0 defaultComponentEnabled :: ComponentEnabledSpec defaultComponentEnabled = ComponentEnabledSpec False False
237
defaultComponentEnabled :: ComponentEnabledSpec defaultComponentEnabled = ComponentEnabledSpec False False
106
defaultComponentEnabled = ComponentEnabledSpec False False
58
true
true
0
5
30
20
12
8
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_CLAMP_TO_BORDER_OES :: GLenum gl_CLAMP_TO_BORDER_OES = 0x812D
64
gl_CLAMP_TO_BORDER_OES :: GLenum gl_CLAMP_TO_BORDER_OES = 0x812D
64
gl_CLAMP_TO_BORDER_OES = 0x812D
31
false
true
0
4
5
11
6
5
null
null
emmanueltouzery/cigale-timesheet
src/WebServer/FilePickerServer.hs
mit
fileInfo :: String -> String -> IO FileInfo fileInfo folder fName = do let fullPath = folder </> fName isFile <- doesFileExist fullPath fSize <- if isFile then catch (withFile fullPath ReadMode hFileSize) (\(_ :: SomeException) -> return (-2)) else return (-1) return FileInfo...
358
fileInfo :: String -> String -> IO FileInfo fileInfo folder fName = do let fullPath = folder </> fName isFile <- doesFileExist fullPath fSize <- if isFile then catch (withFile fullPath ReadMode hFileSize) (\(_ :: SomeException) -> return (-2)) else return (-1) return FileInfo...
358
fileInfo folder fName = do let fullPath = folder </> fName isFile <- doesFileExist fullPath fSize <- if isFile then catch (withFile fullPath ReadMode hFileSize) (\(_ :: SomeException) -> return (-2)) else return (-1) return FileInfo { filename = fName, filesize = fSize}
314
false
true
2
12
94
132
66
66
null
null
leshchevds/ganeti
src/Ganeti/BasicTypes.hs
bsd-2-clause
-- | Changes the error message of a @ResultT@ value, if present. withErrorT :: (Monad m, FromString e) => (e' -> e) -> ResultT e' m a -> ResultT e m a withErrorT f = ResultT . liftM (withError f) . runResultT
219
withErrorT :: (Monad m, FromString e) => (e' -> e) -> ResultT e' m a -> ResultT e m a withErrorT f = ResultT . liftM (withError f) . runResultT
154
withErrorT f = ResultT . liftM (withError f) . runResultT
57
true
true
0
9
52
81
39
42
null
null
thomasjm/ot.hs
src/Control/OperationalTransformation/JSON.hs
mit
transformList2 (o:os) ps = do (o', ps') <- transformList1 o ps (os', ps'') <- transformList2 os ps' return (o' ++ os', ps'') -- Handle identities up front
162
transformList2 (o:os) ps = do (o', ps') <- transformList1 o ps (os', ps'') <- transformList2 os ps' return (o' ++ os', ps'') -- Handle identities up front
162
transformList2 (o:os) ps = do (o', ps') <- transformList1 o ps (os', ps'') <- transformList2 os ps' return (o' ++ os', ps'') -- Handle identities up front
162
false
false
0
9
34
71
36
35
null
null
lukexi/ghc
libraries/base/GHC/Event/Thread.hs
bsd-3-clause
startIOManagerThreads :: IO () startIOManagerThreads = withMVar ioManagerLock $ \_ -> do eventManagerArray <- readIORef eventManager let (_, high) = boundsIOArray eventManagerArray forM_ [0..high] (startIOManagerThread eventManagerArray) writeIORef numEnabledEventManagers (high+1)
299
startIOManagerThreads :: IO () startIOManagerThreads = withMVar ioManagerLock $ \_ -> do eventManagerArray <- readIORef eventManager let (_, high) = boundsIOArray eventManagerArray forM_ [0..high] (startIOManagerThread eventManagerArray) writeIORef numEnabledEventManagers (high+1)
299
startIOManagerThreads = withMVar ioManagerLock $ \_ -> do eventManagerArray <- readIORef eventManager let (_, high) = boundsIOArray eventManagerArray forM_ [0..high] (startIOManagerThread eventManagerArray) writeIORef numEnabledEventManagers (high+1)
268
false
true
0
12
46
91
43
48
null
null
uduki/hsQt
Qtc/Gui/QGraphicsTextItem.hs
bsd-2-clause
qGraphicsTextItem_deleteLater :: QGraphicsTextItem a -> IO () qGraphicsTextItem_deleteLater x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QGraphicsTextItem_deleteLater cobj_x0
175
qGraphicsTextItem_deleteLater :: QGraphicsTextItem a -> IO () qGraphicsTextItem_deleteLater x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QGraphicsTextItem_deleteLater cobj_x0
175
qGraphicsTextItem_deleteLater x0 = withObjectPtr x0 $ \cobj_x0 -> qtc_QGraphicsTextItem_deleteLater cobj_x0
113
false
true
0
7
22
41
19
22
null
null
seereason/HJScript
src/HJScript/Lang.hs
bsd-3-clause
string :: String -> JString string = JString
44
string :: String -> JString string = JString
44
string = JString
16
false
true
0
5
7
15
8
7
null
null
brendanhay/gogol
gogol-script/gen/Network/Google/Script/Types/Product.hs
mpl-2.0
-- | Creates a value of 'StatusDetailsItem' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'sdiAddtional' statusDetailsItem :: HashMap Text JSONValue -- ^ 'sdiAddtional' -> StatusDetailsItem statusDetailsItem pSdiAddtional_ = ...
383
statusDetailsItem :: HashMap Text JSONValue -- ^ 'sdiAddtional' -> StatusDetailsItem statusDetailsItem pSdiAddtional_ = StatusDetailsItem' {_sdiAddtional = _Coerce # pSdiAddtional_}
191
statusDetailsItem pSdiAddtional_ = StatusDetailsItem' {_sdiAddtional = _Coerce # pSdiAddtional_}
98
true
true
0
8
62
50
26
24
null
null
tel/hs-etcd
src/System/Etcd/Types.hs
mit
fromCode 202 = EPostTtlNaN
26
fromCode 202 = EPostTtlNaN
26
fromCode 202 = EPostTtlNaN
26
false
false
0
5
3
9
4
5
null
null
AtnNn/degu
Main.hs
bsd-3-clause
main :: IO () main = do runInterface repl
43
main :: IO () main = do runInterface repl
43
main = do runInterface repl
29
false
true
1
8
10
26
10
16
null
null
rueshyna/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
mpl-2.0
-- | The monetizationDetails object encapsulates information about the -- monetization status of the video. vMonetizationDetails :: Lens' Video (Maybe VideoMonetizationDetails) vMonetizationDetails = lens _vMonetizationDetails (\ s a -> s{_vMonetizationDetails = a})
274
vMonetizationDetails :: Lens' Video (Maybe VideoMonetizationDetails) vMonetizationDetails = lens _vMonetizationDetails (\ s a -> s{_vMonetizationDetails = a})
166
vMonetizationDetails = lens _vMonetizationDetails (\ s a -> s{_vMonetizationDetails = a})
97
true
true
0
9
39
49
26
23
null
null
firefrorefiddle/songmaker
src/SongMaker/Write/LatexSongs.hs
gpl-2.0
concatMaybes f (Nothing:rest) = concatMaybes f rest
51
concatMaybes f (Nothing:rest) = concatMaybes f rest
51
concatMaybes f (Nothing:rest) = concatMaybes f rest
51
false
false
0
6
6
25
11
14
null
null
DaMSL/K3
src/Language/K3/Analysis/SEffects/Inference.hs
apache-2.0
{- Analysis entrypoint -} inferProgramEffects :: Maybe (ExtInferF a, a) -> Maybe ParGenSymS -> FPPEnv -> K3 Declaration -> Either String (K3 Declaration, FIEnv) inferProgramEffects extInfOpt symSOpt ppenv prog = do lcenv <- lambdaClosures prog runFInfES (fienv0 symSOpt ppenv...
1,356
inferProgramEffects :: Maybe (ExtInferF a, a) -> Maybe ParGenSymS -> FPPEnv -> K3 Declaration -> Either String (K3 Declaration, FIEnv) inferProgramEffects extInfOpt symSOpt ppenv prog = do lcenv <- lambdaClosures prog runFInfES (fienv0 symSOpt ppenv lcenv) $ doInference prog...
1,330
inferProgramEffects extInfOpt symSOpt ppenv prog = do lcenv <- lambdaClosures prog runFInfES (fienv0 symSOpt ppenv lcenv) $ doInference prog where doInference p = do np <- globalsEff p np' <- inferPlain np {- inferWithSimplify np -} markGlobals np' inferPlain np = mapExpress...
1,155
true
true
12
12
325
300
146
154
null
null
kolmodin/cabal
Cabal/Distribution/PackageDescription/Check.hs
bsd-3-clause
repoTypeDirname :: RepoType -> [FilePath] repoTypeDirname Darcs = ["_darcs"]
81
repoTypeDirname :: RepoType -> [FilePath] repoTypeDirname Darcs = ["_darcs"]
81
repoTypeDirname Darcs = ["_darcs"]
39
false
true
0
6
13
28
14
14
null
null
lukexi/cabal
cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
{- cleanCommand :: CommandUI () cleanCommand = makeCommand name shortDesc longDesc emptyFlags options where name = "clean" shortDesc = "Removes downloaded files" longDesc = Nothing emptyFlags = () options _ = [] -} checkCommand :: CommandUI (Flag Verbosity) checkCommand = CommandUI { ...
918
checkCommand :: CommandUI (Flag Verbosity) checkCommand = CommandUI { commandName = "check", commandSynopsis = "Check the package for common mistakes.", commandDescription = Just $ \_ -> wrapText $ "Expects a .cabal package file in the current directory.\n" ++ "\n" ++ "The...
669
checkCommand = CommandUI { commandName = "check", commandSynopsis = "Check the package for common mistakes.", commandDescription = Just $ \_ -> wrapText $ "Expects a .cabal package file in the current directory.\n" ++ "\n" ++ "The checks correspond to the requirements to pa...
625
true
true
0
13
252
117
67
50
null
null
samstokes/yesodoro-reboot
Model.hs
bsd-2-clause
deleteTask :: PersistQuery SqlPersist m => Entity Task -> SqlPersist m () deleteTask (Entity taskId task) = do deleteCascade taskId maybeM () delete $ taskExtTask task
171
deleteTask :: PersistQuery SqlPersist m => Entity Task -> SqlPersist m () deleteTask (Entity taskId task) = do deleteCascade taskId maybeM () delete $ taskExtTask task
171
deleteTask (Entity taskId task) = do deleteCascade taskId maybeM () delete $ taskExtTask task
97
false
true
0
9
29
68
30
38
null
null
nevrenato/HetsAlloy
Propositional/Morphism.hs
gpl-2.0
idMor :: Sign -> Morphism idMor a = inclusionMap a a
52
idMor :: Sign -> Morphism idMor a = inclusionMap a a
52
idMor a = inclusionMap a a
26
false
true
0
5
10
23
11
12
null
null
ford-prefect/xml2ucm
src/UCM.hs
apache-2.0
writeVerbFile :: Config -> Verb -> (String, String) writeVerbFile conf verb@Verb{..} = (verbName, writeSection 0 "SectionVerb" Nothing writeVerb verb ++ concatMap (writeDevice 0 conf) verbDevices ++ concatMap (writeModifier 0) verbModifiers)
252
writeVerbFile :: Config -> Verb -> (String, String) writeVerbFile conf verb@Verb{..} = (verbName, writeSection 0 "SectionVerb" Nothing writeVerb verb ++ concatMap (writeDevice 0 conf) verbDevices ++ concatMap (writeModifier 0) verbModifiers)
252
writeVerbFile conf verb@Verb{..} = (verbName, writeSection 0 "SectionVerb" Nothing writeVerb verb ++ concatMap (writeDevice 0 conf) verbDevices ++ concatMap (writeModifier 0) verbModifiers)
200
false
true
0
10
40
88
45
43
null
null
olorin/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
mpl-2.0
-- | The ID of the Reserved Instance. rilReservedInstancesId :: Lens' ReservedInstancesListing (Maybe Text) rilReservedInstancesId = lens _rilReservedInstancesId (\ s a -> s{_rilReservedInstancesId = a})
203
rilReservedInstancesId :: Lens' ReservedInstancesListing (Maybe Text) rilReservedInstancesId = lens _rilReservedInstancesId (\ s a -> s{_rilReservedInstancesId = a})
165
rilReservedInstancesId = lens _rilReservedInstancesId (\ s a -> s{_rilReservedInstancesId = a})
95
true
true
0
9
24
46
25
21
null
null