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
alphaHeavy/cabal
Cabal/Distribution/InstalledPackageInfo.hs
bsd-3-clause
noVersion :: Version noVersion = Version{ versionBranch=[], versionTags=[] }
76
noVersion :: Version noVersion = Version{ versionBranch=[], versionTags=[] }
76
noVersion = Version{ versionBranch=[], versionTags=[] }
55
false
true
0
7
8
29
17
12
null
null
fpco/fay
tests/ExportQualified_Export.hs
bsd-3-clause
main :: Fay () main = return ()
31
main :: Fay () main = return ()
31
main = return ()
16
false
true
0
7
7
27
11
16
null
null
tcsc/ffs
test/Ffs/CommandLineSpec.hs
mit
spec :: Spec spec = it "Needs tests" $ 1 `shouldBe` 1
53
spec :: Spec spec = it "Needs tests" $ 1 `shouldBe` 1
53
spec = it "Needs tests" $ 1 `shouldBe` 1
40
false
true
0
6
11
31
14
17
null
null
mcschroeder/ghc
compiler/main/DynFlags.hs
bsd-3-clause
wayOptc _ WayEventLog = ["-DTRACING"]
39
wayOptc _ WayEventLog = ["-DTRACING"]
39
wayOptc _ WayEventLog = ["-DTRACING"]
39
false
false
1
6
6
16
7
9
null
null
hguenther/smtlib2
extras/emulated-modulus/Language/SMTLib2/ModulusEmulator.hs
gpl-3.0
addEmulation :: Emulation b -> ModulusEmulator b -> ModulusEmulator b addEmulation emul b = b2 where b1 = case addAssertions b of Nothing -> b Just stack -> b { addAssertions = Just $ emul:stack } b2 = b1 { emulations = emul:emulations b1 }
264
addEmulation :: Emulation b -> ModulusEmulator b -> ModulusEmulator b addEmulation emul b = b2 where b1 = case addAssertions b of Nothing -> b Just stack -> b { addAssertions = Just $ emul:stack } b2 = b1 { emulations = emul:emulations b1 }
264
addEmulation emul b = b2 where b1 = case addAssertions b of Nothing -> b Just stack -> b { addAssertions = Just $ emul:stack } b2 = b1 { emulations = emul:emulations b1 }
194
false
true
2
11
68
113
51
62
null
null
thoughtbot/typebot
src/Bot.hs
bsd-3-clause
engine _ = Hoogle
17
engine _ = Hoogle
17
engine _ = Hoogle
17
false
false
0
4
3
10
4
6
null
null
shayan-najd/HsParser
OutputableInstances.hs
gpl-3.0
-- Don't print the type; it's only a place-holder before typechecking -- Exported to HsBinds, which can't see the defn of HsMatchContext pprFunBind :: (OutputableBndr idR, Outputable body) => MatchGroup idR body -> SDoc pprFunBind matches = pprMatches matches
271
pprFunBind :: (OutputableBndr idR, Outputable body) => MatchGroup idR body -> SDoc pprFunBind matches = pprMatches matches
133
pprFunBind matches = pprMatches matches
39
true
true
0
8
50
48
23
25
null
null
AlexanderPankiv/ghc
compiler/ghci/ByteCodeGen.hs
bsd-3-clause
-- treated just like a variable V pushAtom d p (AnnVar v) | UnaryRep rep_ty <- repType (idType v) , V <- typeArgRep rep_ty = return (nilOL, 0) | isFCallId v = pprPanic "pushAtom: shouldn't get an FCallId here" (ppr v) | Just primop <- isPrimOpId_maybe v = return (unitOL (PUSH_PRIMOP primop), 1) ...
1,334
pushAtom d p (AnnVar v) | UnaryRep rep_ty <- repType (idType v) , V <- typeArgRep rep_ty = return (nilOL, 0) | isFCallId v = pprPanic "pushAtom: shouldn't get an FCallId here" (ppr v) | Just primop <- isPrimOpId_maybe v = return (unitOL (PUSH_PRIMOP primop), 1) | Just d_v <- lookupBCEnv_maybe...
1,299
pushAtom d p (AnnVar v) | UnaryRep rep_ty <- repType (idType v) , V <- typeArgRep rep_ty = return (nilOL, 0) | isFCallId v = pprPanic "pushAtom: shouldn't get an FCallId here" (ppr v) | Just primop <- isPrimOpId_maybe v = return (unitOL (PUSH_PRIMOP primop), 1) | Just d_v <- lookupBCEnv_maybe...
1,299
true
false
1
15
500
328
159
169
null
null
SKA-ScienceDataProcessor/RC
MS4/lib/DNA/Run.hs
apache-2.0
runReadP :: ReadP a -> String -> a runReadP p s = case readP_to_S p s of [(a,"")] -> a _ -> error $ "Cannot parse string: '" ++ s ++ "'" ---------------------------------------------------------------- -- UNIX start ---------------------------------------------------------------- -- Startup of progra...
321
runReadP :: ReadP a -> String -> a runReadP p s = case readP_to_S p s of [(a,"")] -> a _ -> error $ "Cannot parse string: '" ++ s ++ "'" ---------------------------------------------------------------- -- UNIX start ---------------------------------------------------------------- -- Startup of progra...
321
runReadP p s = case readP_to_S p s of [(a,"")] -> a _ -> error $ "Cannot parse string: '" ++ s ++ "'" ---------------------------------------------------------------- -- UNIX start ---------------------------------------------------------------- -- Startup of program
286
false
true
0
10
59
73
39
34
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_TANGENT_ARRAY_EXT :: GLenum gl_TANGENT_ARRAY_EXT = 0x8439
60
gl_TANGENT_ARRAY_EXT :: GLenum gl_TANGENT_ARRAY_EXT = 0x8439
60
gl_TANGENT_ARRAY_EXT = 0x8439
29
false
true
0
4
5
11
6
5
null
null
siddhanathan/ghc
compiler/hsSyn/HsUtils.hs
bsd-3-clause
nlConVarPatName :: Name -> [Name] -> LPat Name nlConVarPatName con vars = nlConPatName con (map nlVarPat vars)
110
nlConVarPatName :: Name -> [Name] -> LPat Name nlConVarPatName con vars = nlConPatName con (map nlVarPat vars)
110
nlConVarPatName con vars = nlConPatName con (map nlVarPat vars)
63
false
true
0
7
16
43
21
22
null
null
lfritz/python-type-inference
python-type-inference/src/Language/Python/TypeInference/Analysis/Analysis.hs
bsd-3-clause
pow (a, b) | isNum a && isNum b = case commonArithmeticType a b of IntType -> oneType IntType `join` oneType FloatType t -> oneType t | otherwise = bot
297
pow (a, b) | isNum a && isNum b = case commonArithmeticType a b of IntType -> oneType IntType `join` oneType FloatType t -> oneType t | otherwise = bot
297
pow (a, b) | isNum a && isNum b = case commonArithmeticType a b of IntType -> oneType IntType `join` oneType FloatType t -> oneType t | otherwise = bot
297
false
false
0
10
175
77
35
42
null
null
A1-Triard/solid
src/Solid/Gui.hs
apache-2.0
queueFrame :: UI -> System -> IO () queueFrame ui s = do Rectangle _ _ w h <- widgetGetAllocation $ canvas ui let y0 = fromIntegral h - 30.0 draw_id <- on (canvas ui) draw $ do drawSystem (V2 (fromIntegral w / 2.0) (50.0 + (fromIntegral h - 300.0) / 2.0)) s setLineWidth 1.0 setSourceRGB 0.8 0.8 0.8 ...
622
queueFrame :: UI -> System -> IO () queueFrame ui s = do Rectangle _ _ w h <- widgetGetAllocation $ canvas ui let y0 = fromIntegral h - 30.0 draw_id <- on (canvas ui) draw $ do drawSystem (V2 (fromIntegral w / 2.0) (50.0 + (fromIntegral h - 300.0) / 2.0)) s setLineWidth 1.0 setSourceRGB 0.8 0.8 0.8 ...
622
queueFrame ui s = do Rectangle _ _ w h <- widgetGetAllocation $ canvas ui let y0 = fromIntegral h - 30.0 draw_id <- on (canvas ui) draw $ do drawSystem (V2 (fromIntegral w / 2.0) (50.0 + (fromIntegral h - 300.0) / 2.0)) s setLineWidth 1.0 setSourceRGB 0.8 0.8 0.8 moveTo 20.0 y0 lineTo 1040.0 y...
586
false
true
0
20
160
312
141
171
null
null
anton-k/language-css
src/Language/Css/Build/Idents.hs
bsd-3-clause
-- | table-row-group tableRowGroup :: Idents a => a tableRowGroup = ident "table-row-group"
91
tableRowGroup :: Idents a => a tableRowGroup = ident "table-row-group"
70
tableRowGroup = ident "table-row-group"
39
true
true
0
6
12
22
11
11
null
null
DamienCassou/HYahtzee
Game/HYahtzee/Engine/Logic.hs
bsd-3-clause
changeTable :: YTable -> YData -> YData changeTable newTable ydata = case splitAt (ydCurPlayer ydata) (ydTables ydata) of (before, _:after) -> ydata {ydTables = before ++ [newTable] ++ after} _ -> ydata
231
changeTable :: YTable -> YData -> YData changeTable newTable ydata = case splitAt (ydCurPlayer ydata) (ydTables ydata) of (before, _:after) -> ydata {ydTables = before ++ [newTable] ++ after} _ -> ydata
231
changeTable newTable ydata = case splitAt (ydCurPlayer ydata) (ydTables ydata) of (before, _:after) -> ydata {ydTables = before ++ [newTable] ++ after} _ -> ydata
191
false
true
0
12
60
91
46
45
null
null
isomorphism/webgl
src/Graphics/Rendering/WebGL/Constants.hs
mit
gl_TEXTURE12 :: GLenum gl_TEXTURE12 = 0x84CC
44
gl_TEXTURE12 :: GLenum gl_TEXTURE12 = 0x84CC
44
gl_TEXTURE12 = 0x84CC
21
false
true
0
4
5
11
6
5
null
null
xmonad/xmonad-contrib
XMonad/Hooks/Place.hs
bsd-3-clause
r2rr :: Rectangle -> Rectangle -> S.RationalRect r2rr (Rectangle x0 y0 w0 h0) (Rectangle x y w h) = S.RationalRect ((fi x-fi x0) % fi w0) ((fi y-fi y0) % fi h0) (fi w % fi w0) (fi h % fi h0)
249
r2rr :: Rectangle -> Rectangle -> S.RationalRect r2rr (Rectangle x0 y0 w0 h0) (Rectangle x y w h) = S.RationalRect ((fi x-fi x0) % fi w0) ((fi y-fi y0) % fi h0) (fi w % fi w0) (fi h % fi h0)
249
r2rr (Rectangle x0 y0 w0 h0) (Rectangle x y w h) = S.RationalRect ((fi x-fi x0) % fi w0) ((fi y-fi y0) % fi h0) (fi w % fi w0) (fi h % fi h0)
200
false
true
0
10
100
142
65
77
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/HTMLIFrameElement.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement.allowFullscreen Mozilla HTMLIFrameElement.allowFullscreen documentation> setAllowFullscreen :: (MonadDOM m) => HTMLIFrameElement -> Bool -> m () setAllowFullscreen self val = liftDOM (self ^. jss "allowFullscreen" (toJSVal va...
323
setAllowFullscreen :: (MonadDOM m) => HTMLIFrameElement -> Bool -> m () setAllowFullscreen self val = liftDOM (self ^. jss "allowFullscreen" (toJSVal val))
176
setAllowFullscreen self val = liftDOM (self ^. jss "allowFullscreen" (toJSVal val))
85
true
true
0
10
49
60
30
30
null
null
dvolk/hoodie
Main.hs
gpl-3.0
runGame1 :: GameState -> Game a -> Curses GameState runGame1 s (GameT f) = execStateT f s
89
runGame1 :: GameState -> Game a -> Curses GameState runGame1 s (GameT f) = execStateT f s
89
runGame1 s (GameT f) = execStateT f s
37
false
true
0
7
16
46
20
26
null
null
frontrowed/stratosphere
library-gen/Stratosphere/Resources/S3Bucket.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-s3-bucket.html#cfn-s3-bucket-analyticsconfigurations sbAnalyticsConfigurations :: Lens' S3Bucket (Maybe [S3BucketAnalyticsConfiguration]) sbAnalyticsConfigurations = lens _s3BucketAnalyticsConfigurations (\s a -> s { _s3BucketAnalyticsCon...
338
sbAnalyticsConfigurations :: Lens' S3Bucket (Maybe [S3BucketAnalyticsConfiguration]) sbAnalyticsConfigurations = lens _s3BucketAnalyticsConfigurations (\s a -> s { _s3BucketAnalyticsConfigurations = a })
203
sbAnalyticsConfigurations = lens _s3BucketAnalyticsConfigurations (\s a -> s { _s3BucketAnalyticsConfigurations = a })
118
true
true
0
9
21
49
27
22
null
null
SASinestro/lil-render
src/LilRender/Color/Named.hs
isc
royalBlue = RGBColor { _red=65, _green=105, _blue=225 }
55
royalBlue = RGBColor { _red=65, _green=105, _blue=225 }
55
royalBlue = RGBColor { _red=65, _green=105, _blue=225 }
55
false
false
0
6
7
26
16
10
null
null
kajigor/uKanren_transformations
test/resources/Program/Prop.hs
bsd-3-clause
query2 = Program evalo $ fresh ["st"] (call "evalo" [V "st", fm1, trueo])
73
query2 = Program evalo $ fresh ["st"] (call "evalo" [V "st", fm1, trueo])
73
query2 = Program evalo $ fresh ["st"] (call "evalo" [V "st", fm1, trueo])
73
false
false
0
10
12
41
21
20
null
null
beni55/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
grave 'E' = 'È'
15
grave 'E' = 'È'
15
grave 'E' = 'È'
15
false
false
0
5
3
9
4
5
null
null
mightymoose/liquidhaskell
tests/pos/OrdList.hs
bsd-3-clause
a `appOL` b = Two a b
29
a `appOL` b = Two a b
29
a `appOL` b = Two a b
29
false
false
0
5
14
22
10
12
null
null
savannidgerinel/health
src/LuminescentDreams/Text/TimeParsers.hs
bsd-3-clause
parseZonedTime :: MonadError TimeParseError m => Text -> m UTCTime parseZonedTime t = case words t of date:time:tz:_ -> localTimeToUTC <$> parseTimeZone tz <*> (LocalTime <$> parseDate date <*> parseTime time) date:time:_ -> localTimeToUTC utc ...
671
parseZonedTime :: MonadError TimeParseError m => Text -> m UTCTime parseZonedTime t = case words t of date:time:tz:_ -> localTimeToUTC <$> parseTimeZone tz <*> (LocalTime <$> parseDate date <*> parseTime time) date:time:_ -> localTimeToUTC utc ...
671
parseZonedTime t = case words t of date:time:tz:_ -> localTimeToUTC <$> parseTimeZone tz <*> (LocalTime <$> parseDate date <*> parseTime time) date:time:_ -> localTimeToUTC utc <$> (LocalTime <$> parseDate date <...
604
false
true
0
12
246
175
82
93
null
null
ndaniels/strain-assay-minimization
Barcode.hs
mit
-- if cost of all the chosen is 1.0, then we just return them -- else, choose the best one from CANDIDATES, removing it from candidates, -- and recurse. -- if candidates is empty, return chosen -- take a list of Barcodes and a list of Snp indices. -- return the set of Snp indices to use chooseSnps :: [Barcode] -> [Int...
370
chooseSnps :: [Barcode] -> [Int] -> [Int] chooseSnps bs is = chooseSnps' bs is []
81
chooseSnps bs is = chooseSnps' bs is []
39
true
true
0
7
72
48
28
20
null
null
teleshoes/taffybar
src/System/Taffybar/Information/SafeX11.hs
bsd-3-clause
requestQueue :: Chan IORequest requestQueue = unsafePerformIO newChan
69
requestQueue :: Chan IORequest requestQueue = unsafePerformIO newChan
69
requestQueue = unsafePerformIO newChan
38
false
true
1
5
7
20
8
12
null
null
raphway/json-xml-translator
translator.hs
apache-2.0
{-| This function encodes a ResultData data type into XML. -} encodeResultData :: ResultData -> Int -> String encodeResultData resultData tabs = (addTabs tabs) ++ "<resultsData>\n" ++ (addXMLElements [ ("updateDate", (updatedDate resultData)), ("totalItems", (show (totalItems resultData))), ("startInd...
537
encodeResultData :: ResultData -> Int -> String encodeResultData resultData tabs = (addTabs tabs) ++ "<resultsData>\n" ++ (addXMLElements [ ("updateDate", (updatedDate resultData)), ("totalItems", (show (totalItems resultData))), ("startIndex", (show (startIndex resultData))), ("itemsPerPage", (show...
473
encodeResultData resultData tabs = (addTabs tabs) ++ "<resultsData>\n" ++ (addXMLElements [ ("updateDate", (updatedDate resultData)), ("totalItems", (show (totalItems resultData))), ("startIndex", (show (startIndex resultData))), ("itemsPerPage", (show (itemsPerPage resultData))) ] (tabs + 1)) ++ ...
425
true
true
8
13
91
188
98
90
null
null
vTurbine/ghc
compiler/hsSyn/HsDecls.hs
bsd-3-clause
getConNames ConDeclGADT {con_names = names} = names
51
getConNames ConDeclGADT {con_names = names} = names
51
getConNames ConDeclGADT {con_names = names} = names
51
false
false
0
8
6
18
9
9
null
null
mgmeier/extra
src/Control/Exception/Extra.hs
bsd-3-clause
-- | Catch an exception if the predicate passes, then call the handler with the original exception. -- As an example: -- -- @ -- readFileExists x == catchBool isDoesNotExistError (readFile \"myfile\") (const $ return \"\") -- @ catchBool :: Exception e => (e -> Bool) -> IO a -> (e -> IO a) -> IO a catchBool f a b = c...
341
catchBool :: Exception e => (e -> Bool) -> IO a -> (e -> IO a) -> IO a catchBool f a b = catchJust (bool f) a b
111
catchBool f a b = catchJust (bool f) a b
40
true
true
0
11
68
79
41
38
null
null
Daniel-Diaz/processing
Graphics/Web/Processing/Core/Primal.hs
bsd-3-clause
(Sequence xs) >>. p = if Seq.null xs then p else Sequence $ xs Seq.|> p
122
(Sequence xs) >>. p = if Seq.null xs then p else Sequence $ xs Seq.|> p
122
(Sequence xs) >>. p = if Seq.null xs then p else Sequence $ xs Seq.|> p
122
false
false
0
7
66
41
20
21
null
null
dmcclean/dimensional-dk-linalg
src/Numeric/LinearAlgebra/Dimensional/DK/QuasiQuotes.hs
bsd-3-clause
makeVectorExp :: [Q Exp] -> Q Exp makeVectorExp [] = fail "Empty vectors not permitted."
88
makeVectorExp :: [Q Exp] -> Q Exp makeVectorExp [] = fail "Empty vectors not permitted."
88
makeVectorExp [] = fail "Empty vectors not permitted."
54
false
true
0
8
14
36
16
20
null
null
mainland/dph
icebox/examples/runbench.hs
bsd-3-clause
systemWithCheck :: String -> IO () systemWithCheck cmd = do -- printf "Invoking '%s'\n" cmd ec <- system cmd case ec of ExitSuccess -> return () ExitFailure c -> printf "execution failed (exit %d)\n" c -- Main script -- -----------
271
systemWithCheck :: String -> IO () systemWithCheck cmd = do -- printf "Invoking '%s'\n" cmd ec <- system cmd case ec of ExitSuccess -> return () ExitFailure c -> printf "execution failed (exit %d)\n" c -- Main script -- -----------
271
systemWithCheck cmd = do -- printf "Invoking '%s'\n" cmd ec <- system cmd case ec of ExitSuccess -> return () ExitFailure c -> printf "execution failed (exit %d)\n" c -- Main script -- -----------
236
false
true
0
11
79
68
32
36
null
null
jd823592/puppeteer
src/Puppet/Master/Colour.hs
mit
tokencls Keyglyph = "hs-keyglyph"
35
tokencls Keyglyph = "hs-keyglyph"
35
tokencls Keyglyph = "hs-keyglyph"
35
false
false
0
4
5
10
4
6
null
null
redfish64/IrcScanner
src/IrcScanner/KeywordRulesParser.hs
bsd-3-clause
parseKwFile :: [T.Text] -> Either [T.Text] [Index] parseKwFile lns = listEitherToEitherLists (fmap (evalState $ runEitherT kwLine) lns ) ""
139
parseKwFile :: [T.Text] -> Either [T.Text] [Index] parseKwFile lns = listEitherToEitherLists (fmap (evalState $ runEitherT kwLine) lns ) ""
139
parseKwFile lns = listEitherToEitherLists (fmap (evalState $ runEitherT kwLine) lns ) ""
88
false
true
0
10
18
59
30
29
null
null
shlevy/ghc
libraries/base/tests/T13525.hs
bsd-3-clause
main :: IO () main = do createNamedPipe "test" accessModes h <- openFile "test" ReadMode hWaitForInput h (5 * 1000) return ()
141
main :: IO () main = do createNamedPipe "test" accessModes h <- openFile "test" ReadMode hWaitForInput h (5 * 1000) return ()
141
main = do createNamedPipe "test" accessModes h <- openFile "test" ReadMode hWaitForInput h (5 * 1000) return ()
127
false
true
0
10
37
65
27
38
null
null
spinda/liquidhaskell
src/Language/Haskell/Liquid/GhcMisc.hs
bsd-3-clause
unTickExpr (Lam b e) = Lam b (unTickExpr e)
52
unTickExpr (Lam b e) = Lam b (unTickExpr e)
52
unTickExpr (Lam b e) = Lam b (unTickExpr e)
52
false
false
0
7
17
29
13
16
null
null
meiersi-11ce/stack
src/Stack/Setup.hs
bsd-3-clause
sanityCheck :: (MonadIO m, MonadMask m, MonadLogger m, MonadBaseControl IO m) => EnvOverride -> WhichCompiler -> m () sanityCheck menv wc = withCanonicalizedSystemTempDirectory "stack-sanity-check" $ \dir -> do let fp = toFilePath $ dir </> $(mkRelFile "Main.hs") liftIO $ wri...
905
sanityCheck :: (MonadIO m, MonadMask m, MonadLogger m, MonadBaseControl IO m) => EnvOverride -> WhichCompiler -> m () sanityCheck menv wc = withCanonicalizedSystemTempDirectory "stack-sanity-check" $ \dir -> do let fp = toFilePath $ dir </> $(mkRelFile "Main.hs") liftIO $ wri...
905
sanityCheck menv wc = withCanonicalizedSystemTempDirectory "stack-sanity-check" $ \dir -> do let fp = toFilePath $ dir </> $(mkRelFile "Main.hs") liftIO $ writeFile fp $ unlines [ "import Distribution.Simple" -- ensure Cabal library is present , "main = putStrLn \"Hello World\"" ] le...
751
false
true
0
15
250
237
112
125
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/GT_2.hs
mit
esEsOrdering GT GT = MyTrue
27
esEsOrdering GT GT = MyTrue
27
esEsOrdering GT GT = MyTrue
27
false
false
1
5
4
16
5
11
null
null
uvNikita/SyntacticAnalyzer
src/Main.hs
mit
writeText = scale 12 . pad 2.1 . centerXY . text
48
writeText = scale 12 . pad 2.1 . centerXY . text
48
writeText = scale 12 . pad 2.1 . centerXY . text
48
false
false
0
8
10
24
11
13
null
null
wfleming/advent-of-code-2016
2016/src/D22Lib.hs
bsd-3-clause
sourceNode (n0:n1:t) = case pos n0 of (x0, 0) -> let (x1, y1) = pos n1 in if 0 == y1 && x1 > x0 then sourceNode (n1:t) else sourceNode (n0:t) _ -> sourceNode (n1:t)
186
sourceNode (n0:n1:t) = case pos n0 of (x0, 0) -> let (x1, y1) = pos n1 in if 0 == y1 && x1 > x0 then sourceNode (n1:t) else sourceNode (n0:t) _ -> sourceNode (n1:t)
186
sourceNode (n0:n1:t) = case pos n0 of (x0, 0) -> let (x1, y1) = pos n1 in if 0 == y1 && x1 > x0 then sourceNode (n1:t) else sourceNode (n0:t) _ -> sourceNode (n1:t)
186
false
false
2
10
56
117
59
58
null
null
ghc-android/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
narrowOp Narrow8WordOp = Just (MO_UU_Conv, W8)
47
narrowOp Narrow8WordOp = Just (MO_UU_Conv, W8)
47
narrowOp Narrow8WordOp = Just (MO_UU_Conv, W8)
47
false
false
0
6
6
18
9
9
null
null
michaelt/pipes-bytestring-mmap
tests/pressure.hs
bsd-3-clause
time :: IO t -> IO t time a = do start <- getCPUTime v <- a v `seq` return () end <- getCPUTime let diff = (fromIntegral (end - start)) / (10^12) printf "Computation time: %0.3f sec\n" (diff :: Double) return v
240
time :: IO t -> IO t time a = do start <- getCPUTime v <- a v `seq` return () end <- getCPUTime let diff = (fromIntegral (end - start)) / (10^12) printf "Computation time: %0.3f sec\n" (diff :: Double) return v
240
time a = do start <- getCPUTime v <- a v `seq` return () end <- getCPUTime let diff = (fromIntegral (end - start)) / (10^12) printf "Computation time: %0.3f sec\n" (diff :: Double) return v
219
false
true
0
15
72
116
54
62
null
null
laszlopandy/elm-package
src/Elm/Package/Constraint.hs
bsd-3-clause
-- CREATE CONSTRAINTS untilNextMajor :: Package.Version -> Constraint untilNextMajor version = Range version LessOrEqual Less (Package.bumpMajor version)
156
untilNextMajor :: Package.Version -> Constraint untilNextMajor version = Range version LessOrEqual Less (Package.bumpMajor version)
133
untilNextMajor version = Range version LessOrEqual Less (Package.bumpMajor version)
85
true
true
0
8
19
47
20
27
null
null
grnet/snf-ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- * Exclusive storage -- | Error margin used to compare physical disks partMargin :: Double partMargin = 0.01
111
partMargin :: Double partMargin = 0.01
38
partMargin = 0.01
17
true
true
0
6
19
20
9
11
null
null
arnizamani/aiw
Instances.hs
gpl-2.0
varConstBinding (Binary (OVar op1) p1 p2) (Binary (Oper op2) e1 e2) = let result1 = varConstBinding p1 e1 result2 = varConstBinding p2 e2 in if (isNothing result1 || isNothing result2) then Just $ (Map.singleton op1 op2) else let result = mergeSubstitutions (fromJust ...
530
varConstBinding (Binary (OVar op1) p1 p2) (Binary (Oper op2) e1 e2) = let result1 = varConstBinding p1 e1 result2 = varConstBinding p2 e2 in if (isNothing result1 || isNothing result2) then Just $ (Map.singleton op1 op2) else let result = mergeSubstitutions (fromJust ...
530
varConstBinding (Binary (OVar op1) p1 p2) (Binary (Oper op2) e1 e2) = let result1 = varConstBinding p1 e1 result2 = varConstBinding p2 e2 in if (isNothing result1 || isNothing result2) then Just $ (Map.singleton op1 op2) else let result = mergeSubstitutions (fromJust ...
530
false
false
1
14
171
182
87
95
null
null
AlexanderPankiv/ghc
compiler/nativeGen/PPC/Ppr.hs
bsd-3-clause
pprInstr (CMPL fmt reg ri) = hcat [ char '\t', op, char '\t', pprReg reg, ptext (sLit ", "), pprRI ri ] where op = hcat [ ptext (sLit "cmpl"), pprFormat fmt, case ri of RIReg _ -> empty ...
371
pprInstr (CMPL fmt reg ri) = hcat [ char '\t', op, char '\t', pprReg reg, ptext (sLit ", "), pprRI ri ] where op = hcat [ ptext (sLit "cmpl"), pprFormat fmt, case ri of RIReg _ -> empty ...
371
pprInstr (CMPL fmt reg ri) = hcat [ char '\t', op, char '\t', pprReg reg, ptext (sLit ", "), pprRI ri ] where op = hcat [ ptext (sLit "cmpl"), pprFormat fmt, case ri of RIReg _ -> empty ...
371
false
false
1
10
208
122
57
65
null
null
ethanpailes/bbc
src/GenC2.hs
bsd-3-clause
uniqueId :: [String] -> GenM IId uniqueId base = do st <- get put $ st { counter = (counter st) + 1 } return $ IId base (Just (counter st)) -- makes a nekked id. beware of name capture
197
uniqueId :: [String] -> GenM IId uniqueId base = do st <- get put $ st { counter = (counter st) + 1 } return $ IId base (Just (counter st)) -- makes a nekked id. beware of name capture
197
uniqueId base = do st <- get put $ st { counter = (counter st) + 1 } return $ IId base (Just (counter st)) -- makes a nekked id. beware of name capture
164
false
true
0
12
52
81
40
41
null
null
naushadh/persistent
persistent-template/Database/Persist/TH.hs
mit
foreignReference :: FieldDef -> Maybe HaskellName foreignReference field = case fieldReference field of ForeignRef ref _ -> Just ref _ -> Nothing -- fieldSqlType at parse time can be an Exp -- This helps delay setting fieldSqlType until lift time
269
foreignReference :: FieldDef -> Maybe HaskellName foreignReference field = case fieldReference field of ForeignRef ref _ -> Just ref _ -> Nothing -- fieldSqlType at parse time can be an Exp -- This helps delay setting fieldSqlType until lift time
269
foreignReference field = case fieldReference field of ForeignRef ref _ -> Just ref _ -> Nothing -- fieldSqlType at parse time can be an Exp -- This helps delay setting fieldSqlType until lift time
219
false
true
0
8
62
54
25
29
null
null
Forkk/ChatCore
ChatCore/State.hs
mit
-- | Executes `UpdateEvent`s from the given FRP event stream. execAcidUpdates :: (UpdateEvent evt, EventResult evt ~ ()) => AcidState (EventState evt) -> Event evt -> Reactive (IO ()) execAcidUpdates acid eUpdate = listen eUpdate $ update' acid
302
execAcidUpdates :: (UpdateEvent evt, EventResult evt ~ ()) => AcidState (EventState evt) -> Event evt -> Reactive (IO ()) execAcidUpdates acid eUpdate = listen eUpdate $ update' acid
240
execAcidUpdates acid eUpdate = listen eUpdate $ update' acid
64
true
true
0
11
95
80
38
42
null
null
jaalonso/I1M-Cod-Temas
src/Tema_20/MonticuloPropiedades.hs
gpl-2.0
-- Comprobación. -- λ> quickCheck prop_resto_es_valida -- +++ OK, passed 100 tests. -- Propiedad. El resto de (inserta x m) es m si m es el montículo vacío -- o x es menor o igual que el menor elemento de m o (inserta x (resto m)), -- en caso contrario. prop_resto_inserta :: Int -> Monticulo Int -> Bool prop_res...
434
prop_resto_inserta :: Int -> Monticulo Int -> Bool prop_resto_inserta x m = resto (inserta x m) == if esVacio m || x <= menor m then m else inserta x (resto m)
173
prop_resto_inserta x m = resto (inserta x m) == if esVacio m || x <= menor m then m else inserta x (resto m)
122
true
true
2
7
102
80
42
38
null
null
olsner/ghc
compiler/coreSyn/CoreTidy.hs
bsd-3-clause
tidyExpr env (Type ty) = Type (tidyType env ty)
51
tidyExpr env (Type ty) = Type (tidyType env ty)
51
tidyExpr env (Type ty) = Type (tidyType env ty)
51
false
false
0
7
12
30
13
17
null
null
blanu/arbre
Arbre/NewPrint.hs
gpl-2.0
printMapping :: Environment -> Mapping -> String printMapping env (Mapping mapping) = if length (M.toList mapping) == 0 then printEnvironment env ++ "None" else L.intercalate "," $ map (printBinding (printEnvironment env)) (M.toList mapping)
251
printMapping :: Environment -> Mapping -> String printMapping env (Mapping mapping) = if length (M.toList mapping) == 0 then printEnvironment env ++ "None" else L.intercalate "," $ map (printBinding (printEnvironment env)) (M.toList mapping)
251
printMapping env (Mapping mapping) = if length (M.toList mapping) == 0 then printEnvironment env ++ "None" else L.intercalate "," $ map (printBinding (printEnvironment env)) (M.toList mapping)
202
false
true
0
11
42
94
46
48
null
null
unhammer/Dawg.hs
Test.hs
gpl-3.0
testmin3 = let root = finish $ insert "bb" $ insert "aa" emptyView in do a <- Map.lookup 'a' (edges root) b <- Map.lookup 'b' (edges root) return (not (a===b))
179
testmin3 = let root = finish $ insert "bb" $ insert "aa" emptyView in do a <- Map.lookup 'a' (edges root) b <- Map.lookup 'b' (edges root) return (not (a===b))
179
testmin3 = let root = finish $ insert "bb" $ insert "aa" emptyView in do a <- Map.lookup 'a' (edges root) b <- Map.lookup 'b' (edges root) return (not (a===b))
179
false
false
0
13
49
92
42
50
null
null
stevedonnelly/haskell
code/Physics/RigidBody2d.hs
mit
setOrientation = setThird4
26
setOrientation = setThird4
26
setOrientation = setThird4
26
false
false
1
5
2
10
3
7
null
null
jinankjain/Programming-Problems
20 - ExpandList/expand_list.hs
gpl-2.0
expandList (x:xs) = r x x ++ expandList xs
42
expandList (x:xs) = r x x ++ expandList xs
42
expandList (x:xs) = r x x ++ expandList xs
42
false
false
2
6
8
31
13
18
null
null
int-index/singletons
src/Data/Singletons/CustomStar.hs
bsd-3-clause
-- | Produce a representation and singleton for the collection of types given. -- -- A datatype @Rep@ is created, with one constructor per type in the declared -- universe. When this type is promoted by the singletons library, the -- constructors become full types in @*@, not just promoted data constructors. -- -- For ...
4,384
singletonStar :: DsMonad q => [Name] -- ^ A list of Template Haskell @Name@s for types -> q [Dec] singletonStar names = do kinds <- mapM getKind names ctors <- zipWithM (mkCtor True) names kinds let repDecl = DDataD Data [] repName [] ctors [DConPr ''Eq, D...
3,411
singletonStar names = do kinds <- mapM getKind names ctors <- zipWithM (mkCtor True) names kinds let repDecl = DDataD Data [] repName [] ctors [DConPr ''Eq, DConPr ''Show, DConPr ''Read] fakeCtors <- zipWithM (mkCtor False) names kinds let dataDecl = DataDecl Data repName [] fakeCtors ...
3,278
true
true
57
14
1,421
1,036
526
510
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Autoscalers/Update.hs
mpl-2.0
-- | Project ID for this request. auProject :: Lens' AutoscalersUpdate Text auProject = lens _auProject (\ s a -> s{_auProject = a})
134
auProject :: Lens' AutoscalersUpdate Text auProject = lens _auProject (\ s a -> s{_auProject = a})
100
auProject = lens _auProject (\ s a -> s{_auProject = a})
58
true
true
0
9
24
42
22
20
null
null
dcreager/cabal
Distribution/System.hs
bsd-3-clause
osAliases Permissive Solaris = ["solaris2"]
43
osAliases Permissive Solaris = ["solaris2"]
43
osAliases Permissive Solaris = ["solaris2"]
43
false
false
0
5
4
14
7
7
null
null
foreverbell/project-euler-solutions
src/511.hs
bsd-3-clause
solve = poly ! (n `mod` k) where d = map (\x -> k - (x `mod` k)) divisor base = V.fromList $ map (\x -> count x d) [0 .. k - 1] where count x xs = length $ filter (== x) xs poly = power base n
212
solve = poly ! (n `mod` k) where d = map (\x -> k - (x `mod` k)) divisor base = V.fromList $ map (\x -> count x d) [0 .. k - 1] where count x xs = length $ filter (== x) xs poly = power base n
212
solve = poly ! (n `mod` k) where d = map (\x -> k - (x `mod` k)) divisor base = V.fromList $ map (\x -> count x d) [0 .. k - 1] where count x xs = length $ filter (== x) xs poly = power base n
212
false
false
0
12
69
126
69
57
null
null
uriba/dwarf
src/Data/Dwarf.hs
bsd-3-clause
stepLineMachine :: Bool -> Word8 -> DW_LNE -> [DW_LNI] -> [DW_LNE] stepLineMachine _ _ _ [] = []
96
stepLineMachine :: Bool -> Word8 -> DW_LNE -> [DW_LNI] -> [DW_LNE] stepLineMachine _ _ _ [] = []
96
stepLineMachine _ _ _ [] = []
29
false
true
0
9
17
46
24
22
null
null
jqyu/bustle-chi
src/Rad/QL/Define/Field.hs
bsd-3-clause
-- filler token resolve :: () resolve = ()
42
resolve :: () resolve = ()
26
resolve = ()
12
true
true
0
5
8
16
9
7
null
null
green-haskell/ghc
compiler/main/DriverPipeline.hs
bsd-3-clause
haveRtsOptsFlags :: DynFlags -> Bool haveRtsOptsFlags dflags = isJust (rtsOpts dflags) || case rtsOptsEnabled dflags of RtsOptsSafeOnly -> False _ -> True -- | Find out path to @ghcversion.h@ file
286
haveRtsOptsFlags :: DynFlags -> Bool haveRtsOptsFlags dflags = isJust (rtsOpts dflags) || case rtsOptsEnabled dflags of RtsOptsSafeOnly -> False _ -> True -- | Find out path to @ghcversion.h@ file
286
haveRtsOptsFlags dflags = isJust (rtsOpts dflags) || case rtsOptsEnabled dflags of RtsOptsSafeOnly -> False _ -> True -- | Find out path to @ghcversion.h@ file
249
false
true
0
8
119
51
25
26
null
null
CulpaBS/wbBach
src/Futhark/Optimise/InliningDeadFun.hs
bsd-3-clause
doInlineInCaller :: FunDef -> [FunDef] -> FunDef doInlineInCaller (FunDef entry name rtp args body) inlcallees = let body' = inlineInBody inlcallees body in FunDef entry name rtp args body'
194
doInlineInCaller :: FunDef -> [FunDef] -> FunDef doInlineInCaller (FunDef entry name rtp args body) inlcallees = let body' = inlineInBody inlcallees body in FunDef entry name rtp args body'
194
doInlineInCaller (FunDef entry name rtp args body) inlcallees = let body' = inlineInBody inlcallees body in FunDef entry name rtp args body'
144
false
true
0
9
33
69
33
36
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/SVGMatrix.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGMatrix.flipX Mozilla SVGMatrix.flipX documentation> flipX :: (MonadDOM m) => SVGMatrix -> m SVGMatrix flipX self = liftDOM ((self ^. jsf "flipX" ()) >>= fromJSValUnchecked)
233
flipX :: (MonadDOM m) => SVGMatrix -> m SVGMatrix flipX self = liftDOM ((self ^. jsf "flipX" ()) >>= fromJSValUnchecked)
122
flipX self = liftDOM ((self ^. jsf "flipX" ()) >>= fromJSValUnchecked)
72
true
true
0
11
28
60
29
31
null
null
nevrenato/Hets_Fork
Syntax/Parse_AS_Structured.hs
gpl-2.0
fitArgs :: LogicGraph -> AParser st ([Annoted FIT_ARG], Range) fitArgs l = do fas <- many (fitArg l) let (fas1, ps) = unzip fas return (fas1, concatMapRange id ps)
169
fitArgs :: LogicGraph -> AParser st ([Annoted FIT_ARG], Range) fitArgs l = do fas <- many (fitArg l) let (fas1, ps) = unzip fas return (fas1, concatMapRange id ps)
169
fitArgs l = do fas <- many (fitArg l) let (fas1, ps) = unzip fas return (fas1, concatMapRange id ps)
106
false
true
0
10
34
87
42
45
null
null
ksaveljev/hake-2
src/Game/Monsters/MBerserk.hs
bsd-3-clause
framePainC1 :: Int framePainC1 = 199
36
framePainC1 :: Int framePainC1 = 199
36
framePainC1 = 199
17
false
true
0
4
5
11
6
5
null
null
dmitmel/goiteens-hw-in-haskell
Utils/Math/MoreMath/BigInt.hs
apache-2.0
bigIntLength :: BigInt -> Int bigIntLength (BigInt bs) = length bs
66
bigIntLength :: BigInt -> Int bigIntLength (BigInt bs) = length bs
66
bigIntLength (BigInt bs) = length bs
36
false
true
0
7
10
27
13
14
null
null
pairyo/elm-compiler
src/Parse/Helpers.hs
bsd-3-clause
escaped :: Char -> IParser String escaped delim = try $ do char '\\' c <- char '\\' <|> char delim return ['\\', c]
129
escaped :: Char -> IParser String escaped delim = try $ do char '\\' c <- char '\\' <|> char delim return ['\\', c]
129
escaped delim = try $ do char '\\' c <- char '\\' <|> char delim return ['\\', c]
95
false
true
2
10
37
66
28
38
null
null
YuichiroSato/Scheme
src/Parser/SchemeParser.hs
bsd-3-clause
createPlainAST (ValExp (DoubleVal d)) = ValAST $ DoubleAST d
60
createPlainAST (ValExp (DoubleVal d)) = ValAST $ DoubleAST d
60
createPlainAST (ValExp (DoubleVal d)) = ValAST $ DoubleAST d
60
false
false
0
9
8
28
13
15
null
null
IreneKnapp/Faction
libfaction/Distribution/Simple/Utils.hs
bsd-3-clause
-- | Writes a Unicode String as a UTF8 encoded text file. -- -- Uses 'writeFileAtomic', so provides the same guarantees. -- writeUTF8File :: FilePath -> String -> IO () writeUTF8File path = writeFileAtomic path . toUTF8
219
writeUTF8File :: FilePath -> String -> IO () writeUTF8File path = writeFileAtomic path . toUTF8
95
writeUTF8File path = writeFileAtomic path . toUTF8
50
true
true
0
8
36
38
20
18
null
null
mdsteele/fallback
src/Fallback/Scenario/Triggers/FrozenPass.hs
gpl-3.0
------------------------------------------------------------------------------- compileFrozenPass :: Globals -> CompileScenario () compileFrozenPass globals = compileArea FrozenPass Nothing $ do makeExit Holmgare ["ToHolmgare"] "FromHolmgare" onStartDaily 028371 $ do addUnlockedDoors globals uniqueDevice ...
12,430
compileFrozenPass :: Globals -> CompileScenario () compileFrozenPass globals = compileArea FrozenPass Nothing $ do makeExit Holmgare ["ToHolmgare"] "FromHolmgare" onStartDaily 028371 $ do addUnlockedDoors globals uniqueDevice 981323 "Signpost" signRadius $ \_ _ -> do narrate "This signpost looks like i...
12,349
compileFrozenPass globals = compileArea FrozenPass Nothing $ do makeExit Holmgare ["ToHolmgare"] "FromHolmgare" onStartDaily 028371 $ do addUnlockedDoors globals uniqueDevice 981323 "Signpost" signRadius $ \_ _ -> do narrate "This signpost looks like it has seen better days, but you can\ \ still ...
12,298
true
true
0
23
3,217
1,001
446
555
null
null
haskell-distributed/distributed-process-platform
src/Control/Distributed/Process/Platform/Execution/Mailbox.hs
bsd-3-clause
-- | A /do-nothing/ filter that accepts all messages (i.e., returns @Keep@ -- for any input). acceptEverything :: Closure (Message -> Process FilterResult) acceptEverything = $(mkStaticClosure 'everything)
205
acceptEverything :: Closure (Message -> Process FilterResult) acceptEverything = $(mkStaticClosure 'everything)
111
acceptEverything = $(mkStaticClosure 'everything)
49
true
true
0
8
26
34
18
16
null
null
michael-j-clark/hjs99
src/46to50/BinPred.hs
bsd-3-clause
nor :: BinPredSig nor False False = True
40
nor :: BinPredSig nor False False = True
40
nor False False = True
22
false
true
0
6
7
22
9
13
null
null
nevrenato/HetsAlloy
Maude/Maude2DG.hs
gpl-2.0
-- | extracts the types of the terms while they are variables getTypes :: [Term] -> Symbols getTypes (Var _ (TypeSort s) : ts) = Sort (HasName.getName s) : getTypes ts
167
getTypes :: [Term] -> Symbols getTypes (Var _ (TypeSort s) : ts) = Sort (HasName.getName s) : getTypes ts
105
getTypes (Var _ (TypeSort s) : ts) = Sort (HasName.getName s) : getTypes ts
75
true
true
0
12
30
63
30
33
null
null
samscott89/tamarin-prover
lib/term/src/Term/LTerm.hs
gpl-3.0
-- | @s `renameAvoiding` t@ replaces all free variables in @s@ by -- fresh variables avoiding variables in @t@. renameAvoidingIgnoring :: (HasFrees s, HasFrees t) => s -> t -> [LVar] -> s renameAvoidingIgnoring s t vars = renameIgnoring vars s `evalFreshAvoiding` t
267
renameAvoidingIgnoring :: (HasFrees s, HasFrees t) => s -> t -> [LVar] -> s renameAvoidingIgnoring s t vars = renameIgnoring vars s `evalFreshAvoiding` t
153
renameAvoidingIgnoring s t vars = renameIgnoring vars s `evalFreshAvoiding` t
77
true
true
0
9
44
61
33
28
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'IntMapS.unionsWith' ims_unionsWith = IntMapS.unionsWith
60
ims_unionsWith = IntMapS.unionsWith
35
ims_unionsWith = IntMapS.unionsWith
35
true
false
0
5
4
9
5
4
null
null
Operational-Transformation/ot.hs
src/Control/OperationalTransformation/Properties.hs
mit
-- | @b' ∘ a = a' ∘ b@ where /a/ and /b/ are random operations and -- @(a', b') = transform(a, b)@. Note that this is a stronger property than -- 'prop_transform_apply_comm', because 'prop_transform_comm' and -- 'prop_apply_functorial' imply 'prop_transform_apply_comm'. prop_transform_comm :: TestableOTSystem doc op ...
564
prop_transform_comm :: TestableOTSystem doc op => ConcurrentDocHistories doc op One One -> Result prop_transform_comm (CDH (SS _ a _) (SS _ b _)) = eitherResult (transform a b) $ \(a', b') -> eitherResult (compose a b') $ \ab' -> eitherResult (compose b a') $ \ba' -> ab' ==? ba'
293
prop_transform_comm (CDH (SS _ a _) (SS _ b _)) = eitherResult (transform a b) $ \(a', b') -> eitherResult (compose a b') $ \ab' -> eitherResult (compose b a') $ \ba' -> ab' ==? ba'
189
true
true
1
12
102
147
73
74
null
null
qmenoret/gitlab-report-generator
src/json-parser/User.hs
bsd-3-clause
getColumnValue :: String -> User -> String getColumnValue "name" = User.name
83
getColumnValue :: String -> User -> String getColumnValue "name" = User.name
83
getColumnValue "name" = User.name
40
false
true
0
6
17
24
12
12
null
null
andorp/grin
grin/src/Test/Test.hs
bsd-3-clause
select xs = do n <- gen $ choose (0, length xs - 1) case (splitAt n xs) of ([] , []) -> mzero ((a:as), []) -> pure (a, as) ([] , (b:bs)) -> pure (b, bs) (as , (b:bs)) -> pure (b, as ++ bs)
226
select xs = do n <- gen $ choose (0, length xs - 1) case (splitAt n xs) of ([] , []) -> mzero ((a:as), []) -> pure (a, as) ([] , (b:bs)) -> pure (b, bs) (as , (b:bs)) -> pure (b, as ++ bs)
226
select xs = do n <- gen $ choose (0, length xs - 1) case (splitAt n xs) of ([] , []) -> mzero ((a:as), []) -> pure (a, as) ([] , (b:bs)) -> pure (b, bs) (as , (b:bs)) -> pure (b, as ++ bs)
226
false
false
0
12
83
159
85
74
null
null
ice1000/OI-codes
codewars/301-400/checking-groups.hs
agpl-3.0
begins :: Eq a => [a] -> [a] -> Maybe [a] begins haystack [] = Just haystack
91
begins :: Eq a => [a] -> [a] -> Maybe [a] begins haystack [] = Just haystack
91
begins haystack [] = Just haystack
49
false
true
0
10
31
52
25
27
null
null
dosenfrucht/tlc
src/Highlevel/Indent.hs
gpl-2.0
beforeTok :: Token -> LocSpan beforeTok t = LocSpan l l where l = start . getLoc $ t
89
beforeTok :: Token -> LocSpan beforeTok t = LocSpan l l where l = start . getLoc $ t
89
beforeTok t = LocSpan l l where l = start . getLoc $ t
59
false
true
0
8
23
38
19
19
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Sizes/List.hs
mpl-2.0
-- | Select only sizes with this height. slHeight :: Lens' SizesList (Maybe Int32) slHeight = lens _slHeight (\ s a -> s{_slHeight = a}) . mapping _Coerce
162
slHeight :: Lens' SizesList (Maybe Int32) slHeight = lens _slHeight (\ s a -> s{_slHeight = a}) . mapping _Coerce
121
slHeight = lens _slHeight (\ s a -> s{_slHeight = a}) . mapping _Coerce
79
true
true
1
10
35
59
28
31
null
null
timthelion/archivemount-hs
src/System/Directory/Archivemount.hs
gpl-3.0
optToArg :: Option -> String optToArg ReadOnly = "readonly"
59
optToArg :: Option -> String optToArg ReadOnly = "readonly"
59
optToArg ReadOnly = "readonly"
30
false
true
0
5
8
18
9
9
null
null
copumpkin/charm
src/Architecture/ARM/Pretty.hs
bsd-3-clause
showInstruction (SMLAWT rd rn rm ra) = printf "SMLAWT%%s %s, %s, %s, %s" (showRegister rd) (showRegister rn) (showRegister rm) (showRegister ra)
146
showInstruction (SMLAWT rd rn rm ra) = printf "SMLAWT%%s %s, %s, %s, %s" (showRegister rd) (showRegister rn) (showRegister rm) (showRegister ra)
146
showInstruction (SMLAWT rd rn rm ra) = printf "SMLAWT%%s %s, %s, %s, %s" (showRegister rd) (showRegister rn) (showRegister rm) (showRegister ra)
146
false
false
0
7
22
56
27
29
null
null
Am3ra/CS
CS4/languages/HW10.hs
mit
getImaginary :: Complex -> Int getImaginary (Complex _ b) = b
61
getImaginary :: Complex -> Int getImaginary (Complex _ b) = b
61
getImaginary (Complex _ b) = b
30
false
true
0
7
10
26
13
13
null
null
yliu120/K3
src/Language/K3/Analysis/Provenance/Inference.hs
apache-2.0
chaseLambda env path (tnc -> (PProject _, [_,r])) = chaseLambda env path r
76
chaseLambda env path (tnc -> (PProject _, [_,r])) = chaseLambda env path r
76
chaseLambda env path (tnc -> (PProject _, [_,r])) = chaseLambda env path r
76
false
false
0
8
14
45
22
23
null
null
monky-hs/monky
Monky/Blkid.hs
lgpl-3.0
evaluateTag :: String -> String -> IO (Maybe String) evaluateTag t v = withLibBlkid $ evaluateTag' t v
102
evaluateTag :: String -> String -> IO (Maybe String) evaluateTag t v = withLibBlkid $ evaluateTag' t v
102
evaluateTag t v = withLibBlkid $ evaluateTag' t v
49
false
true
0
9
17
42
20
22
null
null
orbitgray/ProjectEuler
haskell/common/Factors.hs
lgpl-3.0
all_dividers :: Int -> [Int] -> [Int] all_dividers a (s:xs) | a == 1 = [] | res_mod == 0 = s:all_dividers res_div (s:xs) | otherwise = all_dividers a xs where (res_div, res_mod) = a `divMod` s -- Returns all deviders for a number -- It uses function above that does most of the work
299
all_dividers :: Int -> [Int] -> [Int] all_dividers a (s:xs) | a == 1 = [] | res_mod == 0 = s:all_dividers res_div (s:xs) | otherwise = all_dividers a xs where (res_div, res_mod) = a `divMod` s -- Returns all deviders for a number -- It uses function above that does most of the work
299
all_dividers a (s:xs) | a == 1 = [] | res_mod == 0 = s:all_dividers res_div (s:xs) | otherwise = all_dividers a xs where (res_div, res_mod) = a `divMod` s -- Returns all deviders for a number -- It uses function above that does most of the work
261
false
true
0
9
71
125
62
63
null
null
josiah14/hackerrank
Algorithms/GraphTheory/Matrix/Haskell/Main.hs
mit
numRoads :: CityCount Int -> Int numRoads numCities = fromCityCount numCities - 1
81
numRoads :: CityCount Int -> Int numRoads numCities = fromCityCount numCities - 1
81
numRoads numCities = fromCityCount numCities - 1
48
false
true
0
6
12
28
13
15
null
null
eklavya/Idris-dev
src/Idris/AbsSyntaxTree.hs
bsd-3-clause
mapPTermFC f g (PAlternative ns ty ts) = PAlternative ns ty (map (mapPTermFC f g) ts)
92
mapPTermFC f g (PAlternative ns ty ts) = PAlternative ns ty (map (mapPTermFC f g) ts)
92
mapPTermFC f g (PAlternative ns ty ts) = PAlternative ns ty (map (mapPTermFC f g) ts)
92
false
false
0
9
22
46
22
24
null
null
chip2n/tin172-project
haskell/src/Shrdlite/Planner.hs
gpl-3.0
idHeight' :: Id -> [Id] -> Maybe Int idHeight' i ws = case L.elemIndex i ws of Nothing -> Nothing Just index -> return $ (length ws - 1) - index -- | Returns an objects height in a column where 0 is the bottom.
218
idHeight' :: Id -> [Id] -> Maybe Int idHeight' i ws = case L.elemIndex i ws of Nothing -> Nothing Just index -> return $ (length ws - 1) - index -- | Returns an objects height in a column where 0 is the bottom.
218
idHeight' i ws = case L.elemIndex i ws of Nothing -> Nothing Just index -> return $ (length ws - 1) - index -- | Returns an objects height in a column where 0 is the bottom.
181
false
true
4
7
52
77
37
40
null
null
ComputationWithBoundedResources/tct-config-mischel
RC.hs
bsd-3-clause
mxCP dim deg = matrixCP' dim deg Algebraic ?ua ?ur
50
mxCP dim deg = matrixCP' dim deg Algebraic ?ua ?ur
50
mxCP dim deg = matrixCP' dim deg Algebraic ?ua ?ur
50
false
false
1
5
9
26
10
16
null
null
aisamanra/matterhorn
src/Draw/Main.hs
bsd-3-clause
doHighlightMisspellings :: HighlightSet -> S.Set Text -> [Text] -> Widget Name doHighlightMisspellings hSet misspellings contents = -- Traverse the input, gathering non-whitespace into tokens and -- checking if they appear in the misspelling collection let whitelist = S.union (hUserSet hSet) (hChannelSet hS...
2,943
doHighlightMisspellings :: HighlightSet -> S.Set Text -> [Text] -> Widget Name doHighlightMisspellings hSet misspellings contents = -- Traverse the input, gathering non-whitespace into tokens and -- checking if they appear in the misspelling collection let whitelist = S.union (hUserSet hSet) (hChannelSet hS...
2,943
doHighlightMisspellings hSet misspellings contents = -- Traverse the input, gathering non-whitespace into tokens and -- checking if they appear in the misspelling collection let whitelist = S.union (hUserSet hSet) (hChannelSet hSet) handleLine t | t == "" = txt " " handleLine t = ...
2,864
false
true
4
19
1,193
941
460
481
null
null
fmthoma/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
tcIsTyVarTy :: Type -> Bool tcIsTyVarTy ty = isJust (tcGetTyVar_maybe ty)
73
tcIsTyVarTy :: Type -> Bool tcIsTyVarTy ty = isJust (tcGetTyVar_maybe ty)
73
tcIsTyVarTy ty = isJust (tcGetTyVar_maybe ty)
45
false
true
0
7
10
33
14
19
null
null
alemedeiros/musicdb
src/MusicBrainz.hs
bsd-3-clause
searchArtist :: String -> Int -> IO [(String, String)] searchArtist art lim = do srch <- uriDownload $ uriSearchArtist art lim return $ getSearchResult srch -- |Download a given uri and return its content as a String -- TODO: return error in a better way (i.e Either or Maybe)
293
searchArtist :: String -> Int -> IO [(String, String)] searchArtist art lim = do srch <- uriDownload $ uriSearchArtist art lim return $ getSearchResult srch -- |Download a given uri and return its content as a String -- TODO: return error in a better way (i.e Either or Maybe)
293
searchArtist art lim = do srch <- uriDownload $ uriSearchArtist art lim return $ getSearchResult srch -- |Download a given uri and return its content as a String -- TODO: return error in a better way (i.e Either or Maybe)
238
false
true
0
9
65
64
32
32
null
null
frosch03/arrowVHDL
src/System/ArrowVHDL/Circuit/Show/VHDL.hs
cc0-1.0
vhdl_architecture :: CircuitDescriptor -> String vhdl_architecture g = "ARCHITECTURE " ++ (label.nodeDesc $ g) ++ "Struct OF " ++ (label.nodeDesc $ g) ++ " IS"
164
vhdl_architecture :: CircuitDescriptor -> String vhdl_architecture g = "ARCHITECTURE " ++ (label.nodeDesc $ g) ++ "Struct OF " ++ (label.nodeDesc $ g) ++ " IS"
164
vhdl_architecture g = "ARCHITECTURE " ++ (label.nodeDesc $ g) ++ "Struct OF " ++ (label.nodeDesc $ g) ++ " IS"
115
false
true
0
11
29
52
27
25
null
null
matkli/hscheme
Types.hs
gpl-3.0
showError (ParseError err) = "Parse error " ++ show err
55
showError (ParseError err) = "Parse error " ++ show err
55
showError (ParseError err) = "Parse error " ++ show err
55
false
false
0
7
9
22
10
12
null
null
antalsz/hs-to-coq
src/lib/HsToCoq/Coq/Pretty.hs
mit
-- Module-local render_args_ty :: (Functor f, Foldable f, Gallina a) => Orientation -> f a -> Term -> Doc render_args_ty o args t = group $ render_args o args <$$> render_type t
177
render_args_ty :: (Functor f, Foldable f, Gallina a) => Orientation -> f a -> Term -> Doc render_args_ty o args t = group $ render_args o args <$$> render_type t
161
render_args_ty o args t = group $ render_args o args <$$> render_type t
71
true
true
0
8
31
71
35
36
null
null
mokus0/s-expression
sexpr-compat/src/Codec/Sexpr.hs
bsd-3-clause
-- |Extract the sub-S-expressions of a List. If all you intend to do -- is traverse or map over that list, the Functor instance of -- S-expressions may work just fine. unList :: Sexpr s -> [Sexpr s] unList = fmap Sexpr . S.unList . unSexpr
240
unList :: Sexpr s -> [Sexpr s] unList = fmap Sexpr . S.unList . unSexpr
71
unList = fmap Sexpr . S.unList . unSexpr
40
true
true
1
9
46
48
22
26
null
null