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
blippy/halog
src/Parser.hs
mit
findMonth:: String -> Int -- starting from 1 findMonth mmm = 1 + (fromJust $ findIndex (== mmm) monthNames)
120
findMonth:: String -> Int findMonth mmm = 1 + (fromJust $ findIndex (== mmm) monthNames)
88
findMonth mmm = 1 + (fromJust $ findIndex (== mmm) monthNames)
62
true
true
0
9
31
39
21
18
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
getVesselSurfaceReferenceFrameStream :: KRPCHS.SpaceCenter.Vessel -> RPCContext (KRPCStream (KRPCHS.SpaceCenter.ReferenceFrame)) getVesselSurfaceReferenceFrameStream thisArg = requestStream $ getVesselSurfaceReferenceFrameStreamReq thisArg
239
getVesselSurfaceReferenceFrameStream :: KRPCHS.SpaceCenter.Vessel -> RPCContext (KRPCStream (KRPCHS.SpaceCenter.ReferenceFrame)) getVesselSurfaceReferenceFrameStream thisArg = requestStream $ getVesselSurfaceReferenceFrameStreamReq thisArg
239
getVesselSurfaceReferenceFrameStream thisArg = requestStream $ getVesselSurfaceReferenceFrameStreamReq thisArg
110
false
true
0
10
13
43
22
21
null
null
Lainepress/hledger
tools/simplifyprof.hs
gpl-3.0
main = do args <- getArgs let f = head args s <- readFile f let ls = lines s let (firstpart, secondpart) = break ("individual inherited" `isInfixOf`) ls putStr $ unlines firstpart let fields = map getfields $ filter (not . null) $ drop 2 secondpart let maxnamelen = maximum $ map (length . head) fiel...
461
main = do args <- getArgs let f = head args s <- readFile f let ls = lines s let (firstpart, secondpart) = break ("individual inherited" `isInfixOf`) ls putStr $ unlines firstpart let fields = map getfields $ filter (not . null) $ drop 2 secondpart let maxnamelen = maximum $ map (length . head) fiel...
461
main = do args <- getArgs let f = head args s <- readFile f let ls = lines s let (firstpart, secondpart) = break ("individual inherited" `isInfixOf`) ls putStr $ unlines firstpart let fields = map getfields $ filter (not . null) $ drop 2 secondpart let maxnamelen = maximum $ map (length . head) fiel...
461
false
false
0
14
108
196
90
106
null
null
gscalzo/HaskellTheHardWay
scala/3_7.hs
mit
myStar :: (Num a, Eq a) => a -> a -> a myStar 0 _ = 0
53
myStar :: (Num a, Eq a) => a -> a -> a myStar 0 _ = 0
53
myStar 0 _ = 0
14
false
true
0
7
16
39
20
19
null
null
vTurbine/ghc
compiler/hsSyn/HsBinds.hs
bsd-3-clause
isDefaultMethod :: TcSpecPrags -> Bool isDefaultMethod IsDefaultMethod = True
77
isDefaultMethod :: TcSpecPrags -> Bool isDefaultMethod IsDefaultMethod = True
77
isDefaultMethod IsDefaultMethod = True
38
false
true
0
5
8
18
9
9
null
null
pdmurray/haskell-book-ex
src/ch12/Exercises12.5.hs
bsd-3-clause
-- 3. fromMaybe :: a -> Maybe a -> a fromMaybe a Nothing = a
61
fromMaybe :: a -> Maybe a -> a fromMaybe a Nothing = a
55
fromMaybe a Nothing = a
24
true
true
0
8
15
34
15
19
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Tech.hs
mit
mineralsCost Hallucination = 150
32
mineralsCost Hallucination = 150
32
mineralsCost Hallucination = 150
32
false
false
0
5
3
9
4
5
null
null
urbanslug/ghc
compiler/utils/Outputable.hs
bsd-3-clause
qualName _other mod _ = NameQual (moduleName mod)
59
qualName _other mod _ = NameQual (moduleName mod)
59
qualName _other mod _ = NameQual (moduleName mod)
59
false
false
0
7
17
23
10
13
null
null
DimaSamoz/thodo
src/Printing.hs
mit
exItems :: [Item] exItems = [ Item "Bread" False , Item "Milk" True , Item "Toothpaste" False ]
111
exItems :: [Item] exItems = [ Item "Bread" False , Item "Milk" True , Item "Toothpaste" False ]
111
exItems = [ Item "Bread" False , Item "Milk" True , Item "Toothpaste" False ]
93
false
true
0
6
33
38
20
18
null
null
prasmussen/glot-www
Yesod/Auth/Simple.hs
mit
setPasswordR :: AuthRoute setPasswordR = PluginR "simple" ["set-password"]
74
setPasswordR :: AuthRoute setPasswordR = PluginR "simple" ["set-password"]
74
setPasswordR = PluginR "simple" ["set-password"]
48
false
true
0
6
7
19
10
9
null
null
fgaz/yabi
yabi.hs
mit
bf (Input:commands) (ml, _:mr) = do char <- getChar let m = fromIntegral $ ord char bf commands (ml, m:mr) --loop (brackets)
130
bf (Input:commands) (ml, _:mr) = do char <- getChar let m = fromIntegral $ ord char bf commands (ml, m:mr) --loop (brackets)
130
bf (Input:commands) (ml, _:mr) = do char <- getChar let m = fromIntegral $ ord char bf commands (ml, m:mr) --loop (brackets)
130
false
false
1
12
27
73
35
38
null
null
skedgeme/wrecker
test/Wrecker/RecorderSpec.hs
bsd-3-clause
spec :: Spec spec = describe "Recorder" $ do it "add/read event" $ do pending it "stop recorder closes the queue" $ do pending it "records success is timed correctly" $ do pending it "records status code failure correctly" $ do pending it "records totally failure correctly" $ do pending
317
spec :: Spec spec = describe "Recorder" $ do it "add/read event" $ do pending it "stop recorder closes the queue" $ do pending it "records success is timed correctly" $ do pending it "records status code failure correctly" $ do pending it "records totally failure correctly" $ do pending
317
spec = describe "Recorder" $ do it "add/read event" $ do pending it "stop recorder closes the queue" $ do pending it "records success is timed correctly" $ do pending it "records status code failure correctly" $ do pending it "records totally failure correctly" $ do pending
304
false
true
0
11
79
90
35
55
null
null
ozgurakgun/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
mkIBC (i:is) f = do ist <- getIState logIBC 5 $ show i ++ " " ++ show (L.length is) f' <- ibc ist i f mkIBC is f'
173
mkIBC (i:is) f = do ist <- getIState logIBC 5 $ show i ++ " " ++ show (L.length is) f' <- ibc ist i f mkIBC is f'
173
mkIBC (i:is) f = do ist <- getIState logIBC 5 $ show i ++ " " ++ show (L.length is) f' <- ibc ist i f mkIBC is f'
173
false
false
1
12
88
84
35
49
null
null
clarkcb/xsearch
haskell/hssearch/test/HsSearch/SearchOptionsTest.hs
mit
getDebugTests :: IO [Test] getDebugTests = do let args = ["--debug"] searchOptions <- getSearchOptions --let settings = settingsFromArgs searchOptions args case settingsFromArgs searchOptions args of Left errMsg -> return [] Right settings -> return [ testCase "debug" (debug settings @?= True) ...
393
getDebugTests :: IO [Test] getDebugTests = do let args = ["--debug"] searchOptions <- getSearchOptions --let settings = settingsFromArgs searchOptions args case settingsFromArgs searchOptions args of Left errMsg -> return [] Right settings -> return [ testCase "debug" (debug settings @?= True) ...
393
getDebugTests = do let args = ["--debug"] searchOptions <- getSearchOptions --let settings = settingsFromArgs searchOptions args case settingsFromArgs searchOptions args of Left errMsg -> return [] Right settings -> return [ testCase "debug" (debug settings @?= True) , testCase "verbo...
366
false
true
0
15
96
111
53
58
null
null
iron-codegen/iron
library/Iron/IR.hs
bsd-3-clause
mkCallExpr :: Embeddable t (AnnExpr d b) => ExprAnn -> t -> Vector t -> t mkCallExpr a f = embed . EnvT a . CallExpr f
118
mkCallExpr :: Embeddable t (AnnExpr d b) => ExprAnn -> t -> Vector t -> t mkCallExpr a f = embed . EnvT a . CallExpr f
118
mkCallExpr a f = embed . EnvT a . CallExpr f
44
false
true
2
10
26
69
30
39
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/HTMLOptionsCollection.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLOptionsCollection.add Mozilla HTMLOptionsCollection.add documentation> addBefore :: (MonadDOM m, IsHTMLOptionElementOrGroup element, IsHTMLElementOrLong before) => HTMLOptionsCollection -> element -> Maybe before -> m () addBef...
422
addBefore :: (MonadDOM m, IsHTMLOptionElementOrGroup element, IsHTMLElementOrLong before) => HTMLOptionsCollection -> element -> Maybe before -> m () addBefore self element before = liftDOM (void (self ^. jsf "add" [toJSVal element, toJSVal before]))
291
addBefore self element before = liftDOM (void (self ^. jsf "add" [toJSVal element, toJSVal before]))
108
true
true
0
12
80
93
46
47
null
null
zeitgeist87/HaskellServer
Settings.hs
gpl-3.0
processFlag (Port p) s = case reads p :: [(Int,String)] of (x, _):_ -> validatePort p x s _ -> s { settMsg = Just ("Unable to parse port: " ++ p ++ "\n") } where validatePort p x s | x > 0 && x < 65536 = s { settPort = x } | otherwise ...
427
processFlag (Port p) s = case reads p :: [(Int,String)] of (x, _):_ -> validatePort p x s _ -> s { settMsg = Just ("Unable to parse port: " ++ p ++ "\n") } where validatePort p x s | x > 0 && x < 65536 = s { settPort = x } | otherwise ...
427
processFlag (Port p) s = case reads p :: [(Int,String)] of (x, _):_ -> validatePort p x s _ -> s { settMsg = Just ("Unable to parse port: " ++ p ++ "\n") } where validatePort p x s | x > 0 && x < 65536 = s { settPort = x } | otherwise ...
427
false
false
4
11
202
145
76
69
null
null
piyush-kurur/yesod
yesod/Build.hs
mit
updateFileTime :: FilePath -> FilePath -> IO () updateFileTime x hs = do (_ , modx) <- getFileStatus' x (access, _ ) <- getFileStatus' hs _ <- try' (setFileTimes hs access modx) return ()
201
updateFileTime :: FilePath -> FilePath -> IO () updateFileTime x hs = do (_ , modx) <- getFileStatus' x (access, _ ) <- getFileStatus' hs _ <- try' (setFileTimes hs access modx) return ()
201
updateFileTime x hs = do (_ , modx) <- getFileStatus' x (access, _ ) <- getFileStatus' hs _ <- try' (setFileTimes hs access modx) return ()
153
false
true
0
10
47
89
42
47
null
null
BartAdv/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reflectErr :: Err -> Raw reflectErr (Msg msg) = raw_apply (Var $ reflErrName "Msg") [RConstant (Str msg)]
105
reflectErr :: Err -> Raw reflectErr (Msg msg) = raw_apply (Var $ reflErrName "Msg") [RConstant (Str msg)]
105
reflectErr (Msg msg) = raw_apply (Var $ reflErrName "Msg") [RConstant (Str msg)]
80
false
true
0
9
16
51
25
26
null
null
jaiyalas/sdl2-image
src/SDL/Image/Loading.hs
mit
-- | @.tif@ loader surfaceTIF :: MonadIO m => FilePath -> m SDL.Surface surfaceTIF = surfaceFromFileT Img_TIF
109
surfaceTIF :: MonadIO m => FilePath -> m SDL.Surface surfaceTIF = surfaceFromFileT Img_TIF
90
surfaceTIF = surfaceFromFileT Img_TIF
37
true
true
0
9
16
36
16
20
null
null
jff/TeLLer
src/ReductionRules.hs
gpl-3.0
reduceWithStateIO _ = return Nothing
36
reduceWithStateIO _ = return Nothing
36
reduceWithStateIO _ = return Nothing
36
false
false
0
5
4
12
5
7
null
null
antalsz/hs-to-coq
examples/containers/extraction/src/ExtractedSet.hs
mit
minView :: Set a -> Maybe (a,Set a) minView = S2.minView
56
minView :: Set a -> Maybe (a,Set a) minView = S2.minView
56
minView = S2.minView
20
false
true
0
9
10
38
17
21
null
null
haraldsteinlechner/assimp
viewer/assimp_view.hs
bsd-3-clause
aiTransformVecByMatrix4 :: Vec3 -> Mat4 -> Vec3 aiTransformVecByMatrix4 (Vec3 x y z) (Mat4 (Vec4 a1 a2 a3 a4) (Vec4 b1 b2 b3 b4) (Vec4 c1 c2 c3 c4) (Vec4 d1 d2 d3 d4)) = Vec3 (a1 * x + a2 * y + a3 * z + a4) (b1 * x + b2 *...
373
aiTransformVecByMatrix4 :: Vec3 -> Mat4 -> Vec3 aiTransformVecByMatrix4 (Vec3 x y z) (Mat4 (Vec4 a1 a2 a3 a4) (Vec4 b1 b2 b3 b4) (Vec4 c1 c2 c3 c4) (Vec4 d1 d2 d3 d4)) = Vec3 (a1 * x + a2 * y + a3 * z + a4) (b1 * x + b2 *...
373
aiTransformVecByMatrix4 (Vec3 x y z) (Mat4 (Vec4 a1 a2 a3 a4) (Vec4 b1 b2 b3 b4) (Vec4 c1 c2 c3 c4) (Vec4 d1 d2 d3 d4)) = Vec3 (a1 * x + a2 * y + a3 * z + a4) (b1 * x + b2 * y + b3 * z + b4) (c1 * x + c2 * y + c3 * z ...
325
false
true
0
11
176
184
92
92
null
null
crackleware/hscolour
Language/Haskell/HsColour/ANSI.hs
gpl-2.0
cleareol = "\ESC[K"
22
cleareol = "\ESC[K"
22
cleareol = "\ESC[K"
22
false
false
0
4
5
6
3
3
null
null
markus-git/co-feldspar
src/Feldspar/Hardware/Optimize.hs
bsd-3-clause
-- Simplify and-expressions. simplifyUp (SymP _ And :$ LitP t False :$ _) = LitP t False
88
simplifyUp (SymP _ And :$ LitP t False :$ _) = LitP t False
59
simplifyUp (SymP _ And :$ LitP t False :$ _) = LitP t False
59
true
false
0
9
16
36
17
19
null
null
jlamothe/passman
src/Password.hs
lgpl-3.0
validatePWData :: PWData -- ^ the data to be validated -> Bool -- ^ @"True"@ if valid; @"False"@ otherwise validatePWData x = validatePWPolicy (x^.pwPolicy) && B.length (x^.pwSalt.to runPWSalt) > 0
209
validatePWData :: PWData -- ^ the data to be validated -> Bool validatePWData x = validatePWPolicy (x^.pwPolicy) && B.length (x^.pwSalt.to runPWSalt) > 0
163
validatePWData x = validatePWPolicy (x^.pwPolicy) && B.length (x^.pwSalt.to runPWSalt) > 0
94
true
true
4
8
41
63
29
34
null
null
sgraf812/feed-gipeda
src/FeedGipeda/Master.hs
bsd-3-clause
finalizeRepos :: Event -> Lock -> Paths -> Deployment -> Set Repo -> (UTCTime, Set Repo) -> Map Repo UTCTime -> IO (Map Repo UTCTime) finalizeRepos notFinalizing lock paths deployment activeRepos (timestamp, repos) lastGenerated = foldM finalizeRepo lastGenerated (Set.toList repos) where fin...
795
finalizeRepos :: Event -> Lock -> Paths -> Deployment -> Set Repo -> (UTCTime, Set Repo) -> Map Repo UTCTime -> IO (Map Repo UTCTime) finalizeRepos notFinalizing lock paths deployment activeRepos (timestamp, repos) lastGenerated = foldM finalizeRepo lastGenerated (Set.toList repos) where fin...
795
finalizeRepos notFinalizing lock paths deployment activeRepos (timestamp, repos) lastGenerated = foldM finalizeRepo lastGenerated (Set.toList repos) where finalizeRepo lastGenerated repo = Lock.with lock $ case Map.lookup repo lastGenerated of Just lg | lg > timestamp -> return lastGenerat...
645
false
true
0
15
216
234
107
127
null
null
Hinidu/Arkanoid
src/Hage/Game/Arkanoid/EventHandler.hs
mit
keyUpHandle :: SDL.Keysym -> GameState -> GameState keyUpHandle ks gs = case SDL.symKey ks of SDL.SDLK_LEFT -> changePaddleSpeed gs paddleSpeed SDL.SDLK_RIGHT -> changePaddleSpeed gs (-paddleSpeed) _ -> gs
247
keyUpHandle :: SDL.Keysym -> GameState -> GameState keyUpHandle ks gs = case SDL.symKey ks of SDL.SDLK_LEFT -> changePaddleSpeed gs paddleSpeed SDL.SDLK_RIGHT -> changePaddleSpeed gs (-paddleSpeed) _ -> gs
247
keyUpHandle ks gs = case SDL.symKey ks of SDL.SDLK_LEFT -> changePaddleSpeed gs paddleSpeed SDL.SDLK_RIGHT -> changePaddleSpeed gs (-paddleSpeed) _ -> gs
195
false
true
0
10
69
72
35
37
null
null
kairuku/stack
src/main/Main.hs
bsd-3-clause
-- | List the dependencies listDependenciesCmd :: Text -> GlobalOpts -> IO () listDependenciesCmd sep go = withBuildConfig go (listDependencies sep') where sep' = T.replace "\\t" "\t" (T.replace "\\n" "\n" sep)
212
listDependenciesCmd :: Text -> GlobalOpts -> IO () listDependenciesCmd sep go = withBuildConfig go (listDependencies sep') where sep' = T.replace "\\t" "\t" (T.replace "\\n" "\n" sep)
185
listDependenciesCmd sep go = withBuildConfig go (listDependencies sep') where sep' = T.replace "\\t" "\t" (T.replace "\\n" "\n" sep)
134
true
true
0
8
32
70
34
36
null
null
DimaSamoz/mezzo
src/Mezzo/Compose/Templates.hs
mit
mkTriConvs :: DecsQ mkTriConvs = do triTyNames <- filter (\n -> nameBase n /= "DoubledD") <$> getDataCons ''TriadType let declareFun choTy = do let choStr = tail (choTyFormatter choTy) valName1 = mkName $ choStr ++ "'" valName2 = mkName $ choStr tySig1 <- ...
801
mkTriConvs :: DecsQ mkTriConvs = do triTyNames <- filter (\n -> nameBase n /= "DoubledD") <$> getDataCons ''TriadType let declareFun choTy = do let choStr = tail (choTyFormatter choTy) valName1 = mkName $ choStr ++ "'" valName2 = mkName $ choStr tySig1 <- ...
801
mkTriConvs = do triTyNames <- filter (\n -> nameBase n /= "DoubledD") <$> getDataCons ''TriadType let declareFun choTy = do let choStr = tail (choTyFormatter choTy) valName1 = mkName $ choStr ++ "'" valName2 = mkName $ choStr tySig1 <- sigD valName1 $ ...
781
false
true
0
18
266
200
101
99
null
null
bgamari/text
tests/Tests/Properties.hs
bsd-2-clause
t_findContains = unsquare $ \(NotEmpty s) -> all (T.isPrefixOf s . snd) . T.breakOnAll s . T.intercalate s
110
t_findContains = unsquare $ \(NotEmpty s) -> all (T.isPrefixOf s . snd) . T.breakOnAll s . T.intercalate s
110
t_findContains = unsquare $ \(NotEmpty s) -> all (T.isPrefixOf s . snd) . T.breakOnAll s . T.intercalate s
110
false
false
0
13
21
54
26
28
null
null
olorin/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
mpl-2.0
-- | The ID of the snapshot. Each snapshot receives a unique identifier when -- it is created. sSnapshotId :: Lens' Snapshot Text sSnapshotId = lens _sSnapshotId (\ s a -> s{_sSnapshotId = a})
192
sSnapshotId :: Lens' Snapshot Text sSnapshotId = lens _sSnapshotId (\ s a -> s{_sSnapshotId = a})
97
sSnapshotId = lens _sSnapshotId (\ s a -> s{_sSnapshotId = a})
62
true
true
0
9
33
41
23
18
null
null
thielema/optparse-applicative
Options/Applicative/Builder/Internal.hs
bsd-3-clause
internal :: Mod f a internal = optionMod $ \p -> p { propVisibility = Internal }
80
internal :: Mod f a internal = optionMod $ \p -> p { propVisibility = Internal }
80
internal = optionMod $ \p -> p { propVisibility = Internal }
60
false
true
0
8
16
33
18
15
null
null
facebookincubator/duckling
Duckling/Rules/KM.hs
bsd-3-clause
langRules (Seal Volume) = Volume.rules
38
langRules (Seal Volume) = Volume.rules
38
langRules (Seal Volume) = Volume.rules
38
false
false
0
7
4
17
8
9
null
null
OpenXT/manager
xenmgr/XenMgr/Connect/Xl.hs
gpl-2.0
resumeFromSleep :: Uuid -> IO Bool resumeFromSleep uuid = do domid <- getDomainId uuid exitCode <- system ("xl trigger " ++ domid ++ " s3resume") case exitCode of _ -> waitForAcpiState uuid 0 (Just 10) --Given the uuid, get the domid, if there is one
270
resumeFromSleep :: Uuid -> IO Bool resumeFromSleep uuid = do domid <- getDomainId uuid exitCode <- system ("xl trigger " ++ domid ++ " s3resume") case exitCode of _ -> waitForAcpiState uuid 0 (Just 10) --Given the uuid, get the domid, if there is one
270
resumeFromSleep uuid = do domid <- getDomainId uuid exitCode <- system ("xl trigger " ++ domid ++ " s3resume") case exitCode of _ -> waitForAcpiState uuid 0 (Just 10) --Given the uuid, get the domid, if there is one
235
false
true
0
13
64
84
38
46
null
null
kcharter/spdy-base
test/StreamTests.hs
bsd-3-clause
propM_addIncoming :: PropertyM IO () propM_addIncoming = implements (fromTestStream $ \sm -> oneof [genIncomingContent sm ,genOversizedIncomingContent sm]) (flip addIncoming) specAddIncoming
230
propM_addIncoming :: PropertyM IO () propM_addIncoming = implements (fromTestStream $ \sm -> oneof [genIncomingContent sm ,genOversizedIncomingContent sm]) (flip addIncoming) specAddIncoming
230
propM_addIncoming = implements (fromTestStream $ \sm -> oneof [genIncomingContent sm ,genOversizedIncomingContent sm]) (flip addIncoming) specAddIncoming
193
false
true
0
11
59
60
29
31
null
null
nikhilunni/HaskellBoy
src/GBC.hs
gpl-2.0
tick :: Cycles -> GBC () tick n = do readRef gpu_cycles >>= \cycles -> writeRef gpu_cycles $ cycles + n GPU.tick n
121
tick :: Cycles -> GBC () tick n = do readRef gpu_cycles >>= \cycles -> writeRef gpu_cycles $ cycles + n GPU.tick n
120
tick n = do readRef gpu_cycles >>= \cycles -> writeRef gpu_cycles $ cycles + n GPU.tick n
95
false
true
0
12
29
61
27
34
null
null
CulpaBS/wbBach
src/Futhark/Analysis/HORepresentation/SOAC.hs
bsd-3-clause
inputs (Stream _ _ _ _ arrs) = arrs
40
inputs (Stream _ _ _ _ arrs) = arrs
40
inputs (Stream _ _ _ _ arrs) = arrs
40
false
false
0
7
13
23
11
12
null
null
alexander-at-github/eta
compiler/ETA/Utils/Outputable.hs
bsd-3-clause
dcolon = unicodeSyntax (char '∷') (docToSDoc $ Pretty.ptext (sLit "::"))
76
dcolon = unicodeSyntax (char '∷') (docToSDoc $ Pretty.ptext (sLit "::"))
76
dcolon = unicodeSyntax (char '∷') (docToSDoc $ Pretty.ptext (sLit "::"))
76
false
false
0
10
13
35
17
18
null
null
urbanslug/ghc
testsuite/tests/parser/should_run/ParserMultiWayIf.hs
bsd-3-clause
x7 = (if | True -> 0)
21
x7 = (if | True -> 0)
21
x7 = (if | True -> 0)
21
false
false
0
9
6
18
9
9
null
null
svenpanne/Vulkan
RegistryProcessor/src/MangledRegistry.hs
bsd-3-clause
toRegistry :: ToEnumType -> R.Registry -> Registry toRegistry toEnumType r = Registry { types = fromList' [ (typeNameOf t, toType t) | R.TypesElement te <- rs , t <- R.unTypes te ], groups = fromList' [], enums = M.fromListWith (++) [ (enumName en, [en]) | R.EnumsElement ee <- rs , Left e <- ...
906
toRegistry :: ToEnumType -> R.Registry -> Registry toRegistry toEnumType r = Registry { types = fromList' [ (typeNameOf t, toType t) | R.TypesElement te <- rs , t <- R.unTypes te ], groups = fromList' [], enums = M.fromListWith (++) [ (enumName en, [en]) | R.EnumsElement ee <- rs , Left e <- ...
906
toRegistry toEnumType r = Registry { types = fromList' [ (typeNameOf t, toType t) | R.TypesElement te <- rs , t <- R.unTypes te ], groups = fromList' [], enums = M.fromListWith (++) [ (enumName en, [en]) | R.EnumsElement ee <- rs , Left e <- R.enumsEnumOrUnuseds ee , let en = toEnum' (toEn...
855
false
true
0
18
213
383
194
189
null
null
CulpaBS/wbBach
src/Language/Futhark/Attributes.hs
bsd-3-clause
-- | An empty array with the given row type. emptyArray :: ArrayShape (shape vn) => TypeBase shape as vn -> Value emptyArray = arrayValue []
154
emptyArray :: ArrayShape (shape vn) => TypeBase shape as vn -> Value emptyArray = arrayValue []
109
emptyArray = arrayValue []
26
true
true
0
8
39
41
20
21
null
null
akamaus/gcodec
test/CNC/HCodeTests.hs
bsd-3-clause
hcode_samples = [ (hcode_prog1, "Example1"), (hcode_prog2, "Example2"), (hcode_if_loops, "if_loops - test for compound operators in if branches"), (hcode_for, "for loop"), (hcode_poligon, "Poligon drawer"), (hcode_gwhile_break, "gwhile with break") ]
310
hcode_samples = [ (hcode_prog1, "Example1"), (hcode_prog2, "Example2"), (hcode_if_loops, "if_loops - test for compound operators in if branches"), (hcode_for, "for loop"), (hcode_poligon, "Poligon drawer"), (hcode_gwhile_break, "gwhile with break") ]
310
hcode_samples = [ (hcode_prog1, "Example1"), (hcode_prog2, "Example2"), (hcode_if_loops, "if_loops - test for compound operators in if branches"), (hcode_for, "for loop"), (hcode_poligon, "Poligon drawer"), (hcode_gwhile_break, "gwhile with break") ]
310
false
false
0
6
87
60
39
21
null
null
dmjio/snaplet-typescript
src/Snap/Snaplet/TypeScript.hs
gpl-3.0
typeScriptServe :: Handler b TypeScriptConf () typeScriptServe = do modifyResponse . setContentType $ "text/javascript;charset=utf-8" cfg <- get requestedFile <- (srcDir cfg ++) . requestedTypeScriptFile . BS.unpack . rqURI <$> getRequest when (Development == compileMode cfg) $ lift...
474
typeScriptServe :: Handler b TypeScriptConf () typeScriptServe = do modifyResponse . setContentType $ "text/javascript;charset=utf-8" cfg <- get requestedFile <- (srcDir cfg ++) . requestedTypeScriptFile . BS.unpack . rqURI <$> getRequest when (Development == compileMode cfg) $ lift...
474
typeScriptServe = do modifyResponse . setContentType $ "text/javascript;charset=utf-8" cfg <- get requestedFile <- (srcDir cfg ++) . requestedTypeScriptFile . BS.unpack . rqURI <$> getRequest when (Development == compileMode cfg) $ liftIO $ compileFiles cfg [requestedFile] serve...
427
false
true
0
13
100
113
54
59
null
null
testexplode/testexplode
doc/examples/Te_LA.hs
lgpl-3.0
-- enter SB enterSBcode :: TeLACnf -> TeLAVars -> L.Text enterSBcode cfg locals = [qc| sendGKS(1, \{"Z"=> 3000\}); godistance(10);|]
136
enterSBcode :: TeLACnf -> TeLAVars -> L.Text enterSBcode cfg locals = [qc| sendGKS(1, \{"Z"=> 3000\}); godistance(10);|]
124
enterSBcode cfg locals = [qc| sendGKS(1, \{"Z"=> 3000\}); godistance(10);|]
79
true
true
0
9
22
37
19
18
null
null
ben-schulz/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LSLe ATFloat) [l, r] = v ++ "FLOATBOP(<=," ++ creg l ++ ", " ++ creg r ++ ")"
85
doOp v (LSLe ATFloat) [l, r] = v ++ "FLOATBOP(<=," ++ creg l ++ ", " ++ creg r ++ ")"
85
doOp v (LSLe ATFloat) [l, r] = v ++ "FLOATBOP(<=," ++ creg l ++ ", " ++ creg r ++ ")"
85
false
false
0
9
20
54
25
29
null
null
m4lvin/HasCacBDD
hs/Data/HasCacBDD.hs
gpl-2.0
ravel (Var n nthen nelse) = ifthenelse (var n) (ravel nthen) (ravel nelse)
74
ravel (Var n nthen nelse) = ifthenelse (var n) (ravel nthen) (ravel nelse)
74
ravel (Var n nthen nelse) = ifthenelse (var n) (ravel nthen) (ravel nelse)
74
false
false
0
7
12
45
21
24
null
null
shlevy/ghc
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
genCCall target dest_regs argsAndHints = do dflags <- getDynFlags let platform = targetPlatform dflags case target of PrimTarget (MO_S_QuotRem width) -> divOp1 platform True width dest_regs argsAndHints PrimTarget (MO_U_QuotRem width) ->...
13,659
genCCall target dest_regs argsAndHints = do dflags <- getDynFlags let platform = targetPlatform dflags case target of PrimTarget (MO_S_QuotRem width) -> divOp1 platform True width dest_regs argsAndHints PrimTarget (MO_U_QuotRem width) ->...
13,659
genCCall target dest_regs argsAndHints = do dflags <- getDynFlags let platform = targetPlatform dflags case target of PrimTarget (MO_S_QuotRem width) -> divOp1 platform True width dest_regs argsAndHints PrimTarget (MO_U_QuotRem width) ->...
13,659
false
false
11
17
7,692
2,697
1,326
1,371
null
null
robstewart57/ripl
src/SkeletonTemplates/IUnzipFilter2D.hs
bsd-3-clause
topRightAction width = C.AnActn (C.ActnTagsStmts tag head stmts) where tag = C.ActnTagDecl [C.Ident "topRight"] head = C.ActnHeadGuardedVars [streamInPattern] [streamOutPattern "Out1"] [guardExp] localVars guardExp = C.BEEQ (mkVar "midPtr") (mkInt (width - 1)) loc...
2,063
topRightAction width = C.AnActn (C.ActnTagsStmts tag head stmts) where tag = C.ActnTagDecl [C.Ident "topRight"] head = C.ActnHeadGuardedVars [streamInPattern] [streamOutPattern "Out1"] [guardExp] localVars guardExp = C.BEEQ (mkVar "midPtr") (mkInt (width - 1)) loc...
2,063
topRightAction width = C.AnActn (C.ActnTagsStmts tag head stmts) where tag = C.ActnTagDecl [C.Ident "topRight"] head = C.ActnHeadGuardedVars [streamInPattern] [streamOutPattern "Out1"] [guardExp] localVars guardExp = C.BEEQ (mkVar "midPtr") (mkInt (width - 1)) loc...
2,063
false
false
6
15
746
660
324
336
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Compute/Types/Product.hs
mpl-2.0
-- | [Output Only] Metadata about this warning in key: value format. For -- example: \"data\": [ { \"key\": \"scope\", \"value\": -- \"zones\/us-east1-d\" } dslwData :: Lens' DisksScopedListWarning [DisksScopedListWarningDataItem] dslwData = lens _dslwData (\ s a -> s{_dslwData = a}) . _Default . _Coerce
319
dslwData :: Lens' DisksScopedListWarning [DisksScopedListWarningDataItem] dslwData = lens _dslwData (\ s a -> s{_dslwData = a}) . _Default . _Coerce
162
dslwData = lens _dslwData (\ s a -> s{_dslwData = a}) . _Default . _Coerce
88
true
true
2
9
57
60
30
30
null
null
glutamate/ig
src/Instagram/Types.hs
bsd-3-clause
-- | get client id in ByteString form clientIDBS :: Credentials -> ByteString clientIDBS=TE.encodeUtf8 . cClientID
114
clientIDBS :: Credentials -> ByteString clientIDBS=TE.encodeUtf8 . cClientID
76
clientIDBS=TE.encodeUtf8 . cClientID
36
true
true
0
6
15
22
12
10
null
null
MasseR/shoppinglist
Handler/HouseholdSettings.hs
bsd-2-clause
householdForm name = renderDivs $ HouseholdForm <$> areq textField "Name for the household" name
96
householdForm name = renderDivs $ HouseholdForm <$> areq textField "Name for the household" name
96
householdForm name = renderDivs $ HouseholdForm <$> areq textField "Name for the household" name
96
false
false
0
6
13
24
11
13
null
null
phischu/bsprt
Main.hs
bsd-3-clause
cameraForward :: Camera -> Direction cameraForward (Camera _ theta phi) = V3 (sin phi * sin theta) (sin theta) (cos phi * sin theta)
132
cameraForward :: Camera -> Direction cameraForward (Camera _ theta phi) = V3 (sin phi * sin theta) (sin theta) (cos phi * sin theta)
132
cameraForward (Camera _ theta phi) = V3 (sin phi * sin theta) (sin theta) (cos phi * sin theta)
95
false
true
0
9
23
72
33
39
null
null
tpsinnem/Idris-dev
src/Idris/Docstrings.hs
bsd-3-clause
-- | Check whether a docstring is emtpy nullDocstring :: Docstring a -> Bool nullDocstring (DocString _ blocks) = S.null blocks
127
nullDocstring :: Docstring a -> Bool nullDocstring (DocString _ blocks) = S.null blocks
87
nullDocstring (DocString _ blocks) = S.null blocks
50
true
true
0
7
20
35
17
18
null
null
jstolarek/ghc
compiler/nativeGen/RegAlloc/Linear/Main.hs
bsd-3-clause
newLocation :: SpillLoc -> RealReg -> Loc -- if the tmp was read from a slot, then now its in a reg as well newLocation (ReadMem slot) my_reg = InBoth my_reg slot
162
newLocation :: SpillLoc -> RealReg -> Loc newLocation (ReadMem slot) my_reg = InBoth my_reg slot
96
newLocation (ReadMem slot) my_reg = InBoth my_reg slot
54
true
true
0
10
31
41
19
22
null
null
guoguo12/haskell-ptable
ptable.hs
apache-2.0
gnum "Eu" = -1
14
gnum "Eu" = -1
14
gnum "Eu" = -1
14
false
false
0
5
3
12
5
7
null
null
rimmington/cabal
cabal-install/Distribution/Client/Install.hs
bsd-3-clause
installUnpackedPackage :: Verbosity -> JobLimit -> Lock -> Int -> LibraryName -> SetupScriptOptions -> InstallMisc -> ConfigFlags -> InstallFlags -> HaddockFlags -> CompilerInfo -> Platform -> PackageDescription -> PackageDescriptionOverride -> Maybe FilePath -- ^ Directory to change to be...
7,785
installUnpackedPackage :: Verbosity -> JobLimit -> Lock -> Int -> LibraryName -> SetupScriptOptions -> InstallMisc -> ConfigFlags -> InstallFlags -> HaddockFlags -> CompilerInfo -> Platform -> PackageDescription -> PackageDescriptionOverride -> Maybe FilePath -- ^ Directory to change to be...
7,785
installUnpackedPackage verbosity buildLimit installLock numJobs libname scriptOptions miscOptions configFlags installFlags haddockFlags cinfo platform pkg pkgoverride workingDir useLogFile = do -- Override the .cabal file if necessary case pkgove...
7,361
false
true
23
31
2,338
1,715
788
927
null
null
Fuuzetsu/yi-emacs-colours
src/Yi/Style/EmacsColours.hs
gpl-2.0
-- | Names: @["grey92"]@ -- -- R235 G235 B235, 0xebebeb grey92 :: Color grey92 = RGB 235 235 235
96
grey92 :: Color grey92 = RGB 235 235 235
40
grey92 = RGB 235 235 235
24
true
true
0
6
18
27
13
14
null
null
heathweiss/Tricad
src/Primitives/Cylindrical.hs
gpl-2.0
cylinderSolidNoSlopeSquaredOffLengthenY :: Radius -> Origin -> [Angle] -> Height -> Power -> LengthenFactor -> [CornerPoints] cylinderSolidNoSlopeSquaredOffLengthenY radius origin angles height power lengthenFactor = --createBottomFacesSquaredOffLengthenY :: Origin -> [Radius] -> [Angle] -> Sl...
560
cylinderSolidNoSlopeSquaredOffLengthenY :: Radius -> Origin -> [Angle] -> Height -> Power -> LengthenFactor -> [CornerPoints] cylinderSolidNoSlopeSquaredOffLengthenY radius origin angles height power lengthenFactor = --createBottomFacesSquaredOffLengthenY :: Origin -> [Radius] -> [Angle] -> Sl...
560
cylinderSolidNoSlopeSquaredOffLengthenY radius origin angles height power lengthenFactor = --createBottomFacesSquaredOffLengthenY :: Origin -> [Radius] -> [Angle] -> Slope -> Slope -> Power -> LengthenFactor -> [CornerPoints] createBottomFacesSquaredOffLengthenY origin [radius | x <- [1..]] ...
433
false
true
1
11
90
107
57
50
null
null
GaloisInc/hpb
src/Data/HPB.hs
apache-2.0
emptyMessageRep :: Monoid a => Text -> MessageRep a emptyMessageRep nm = Rep { initMessage = mempty , mergeMessage = mappend , messageName = nm , fieldSerializers = V.empty , fieldDeserializers = HMap.empty , requiredFields = V.empty }
273
emptyMessageRep :: Monoid a => Text -> MessageRep a emptyMessageRep nm = Rep { initMessage = mempty , mergeMessage = mappend , messageName = nm , fieldSerializers = V.empty , fieldDeserializers = HMap.empty , requiredFields = V.empty }
273
emptyMessageRep nm = Rep { initMessage = mempty , mergeMessage = mappend , messageName = nm , fieldSerializers = V.empty , fieldDeserializers = HMap.empty , requiredFields = V.empty }
221
false
true
0
8
75
80
43
37
null
null
DavidAlphaFox/darcs
src/Darcs/Patch/Match.hs
gpl-2.0
getNonrangeMatchS :: (ApplyMonad m (ApplyState p), MonadProgress m, Matchable p, ApplyState p ~ Tree) => [MatchFlag] -> PatchSet p Origin wX -> m () getNonrangeMatchS fs repo = case nonrangeMatcher fs of Just m -> if nonrangeMatcherIsTag fs ...
684
getNonrangeMatchS :: (ApplyMonad m (ApplyState p), MonadProgress m, Matchable p, ApplyState p ~ Tree) => [MatchFlag] -> PatchSet p Origin wX -> m () getNonrangeMatchS fs repo = case nonrangeMatcher fs of Just m -> if nonrangeMatcherIsTag fs ...
684
getNonrangeMatchS fs repo = case nonrangeMatcher fs of Just m -> if nonrangeMatcherIsTag fs then getTagS m repo else getMatcherS Exclusive m repo Nothing -> fail "Pattern not specified in getNonrangeMatch." -- | @firstMatch fs@ tells whether @fs@ impl...
481
false
true
0
9
215
130
64
66
null
null
Arguggi/documentator
data/Lens.hs
gpl-3.0
-- | Build an index-preserving 'Lens' from a 'Control.Lens.Getter.Getter' and a -- 'Control.Lens.Setter.Setter'. iplens :: (s -> a) -> (s -> b -> t) -> IndexPreservingLens s t a b iplens sa sbt pafb = cotabulate $ \ws -> sbt (extract ws) <$> cosieve pafb (sa <$> ws)
266
iplens :: (s -> a) -> (s -> b -> t) -> IndexPreservingLens s t a b iplens sa sbt pafb = cotabulate $ \ws -> sbt (extract ws) <$> cosieve pafb (sa <$> ws)
153
iplens sa sbt pafb = cotabulate $ \ws -> sbt (extract ws) <$> cosieve pafb (sa <$> ws)
86
true
true
2
10
47
94
47
47
null
null
nikki-and-the-robots/nikki
src/Utils.hs
lgpl-3.0
-- applies a given monadic operation n times applyTimesM :: Monad m => Int -> (a -> m a) -> a -> m a applyTimesM 0 _ = return
125
applyTimesM :: Monad m => Int -> (a -> m a) -> a -> m a applyTimesM 0 _ = return
80
applyTimesM 0 _ = return
24
true
true
0
11
28
54
25
29
null
null
enolan/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
c_irts (FArith (ATInt ITNative)) l x = l ++ "MKINT((i_int)(" ++ x ++ "))"
73
c_irts (FArith (ATInt ITNative)) l x = l ++ "MKINT((i_int)(" ++ x ++ "))"
73
c_irts (FArith (ATInt ITNative)) l x = l ++ "MKINT((i_int)(" ++ x ++ "))"
73
false
false
1
12
13
41
18
23
null
null
kim/amazonka
amazonka-sqs/gen/Network/AWS/SQS/GetQueueUrl.hs
mpl-2.0
-- | The AWS account ID of the account that created the queue. gquQueueOwnerAWSAccountId :: Lens' GetQueueUrl (Maybe Text) gquQueueOwnerAWSAccountId = lens _gquQueueOwnerAWSAccountId (\s a -> s { _gquQueueOwnerAWSAccountId = a })
241
gquQueueOwnerAWSAccountId :: Lens' GetQueueUrl (Maybe Text) gquQueueOwnerAWSAccountId = lens _gquQueueOwnerAWSAccountId (\s a -> s { _gquQueueOwnerAWSAccountId = a })
178
gquQueueOwnerAWSAccountId = lens _gquQueueOwnerAWSAccountId (\s a -> s { _gquQueueOwnerAWSAccountId = a })
118
true
true
1
9
43
52
25
27
null
null
HaskVan/tiempo
src/Tiempo.hs
mit
timeToSeconds Days dys = timeToSeconds Hours (dys * hoursPerDay)
64
timeToSeconds Days dys = timeToSeconds Hours (dys * hoursPerDay)
64
timeToSeconds Days dys = timeToSeconds Hours (dys * hoursPerDay)
64
false
false
1
7
8
27
11
16
null
null
Julianporter/Haskell-MapReduce
src/Parallel/MapReduce/WordCount/Interface.hs
bsd-3-clause
tests :: [ATest] tests = [T {testName="Simple totalising test", test=prop_Equal}, T {testName="Detailed test", test=prop_FullCheck} ]
166
tests :: [ATest] tests = [T {testName="Simple totalising test", test=prop_Equal}, T {testName="Detailed test", test=prop_FullCheck} ]
151
tests = [T {testName="Simple totalising test", test=prop_Equal}, T {testName="Detailed test", test=prop_FullCheck} ]
134
false
true
0
7
47
48
30
18
null
null
simonced/haskell-kata
gloss/tree.hs
gpl-3.0
calculatePoint2 :: Point -> Length -> Angle -> Point calculatePoint2 (x, y) l a = (x2, y2) where x2 = l * sin a + x y2 = l * cos a + y
148
calculatePoint2 :: Point -> Length -> Angle -> Point calculatePoint2 (x, y) l a = (x2, y2) where x2 = l * sin a + x y2 = l * cos a + y
148
calculatePoint2 (x, y) l a = (x2, y2) where x2 = l * sin a + x y2 = l * cos a + y
95
false
true
1
9
47
79
40
39
null
null
rueshyna/gogol
gogol-youtube/gen/Network/Google/Resource/YouTube/Videos/List.hs
mpl-2.0
-- | The videoCategoryId parameter identifies the video category for which -- the chart should be retrieved. This parameter can only be used in -- conjunction with the chart parameter. By default, charts are not -- restricted to a particular category. vlVideoCategoryId :: Lens' VideosList Text vlVideoCategoryId = len...
383
vlVideoCategoryId :: Lens' VideosList Text vlVideoCategoryId = lens _vlVideoCategoryId (\ s a -> s{_vlVideoCategoryId = a})
131
vlVideoCategoryId = lens _vlVideoCategoryId (\ s a -> s{_vlVideoCategoryId = a})
88
true
true
0
9
64
45
25
20
null
null
wdanilo/container
src/Data/AutoVector.hs
apache-2.0
-- TODO[WD]: Move to containers as container utility function thaw :: PrimMonad m => AutoVector a -> m (MAutoVector (PrimState m) a) thaw = wrappedM' $ mapM V.thaw
163
thaw :: PrimMonad m => AutoVector a -> m (MAutoVector (PrimState m) a) thaw = wrappedM' $ mapM V.thaw
101
thaw = wrappedM' $ mapM V.thaw
30
true
true
0
12
27
57
26
31
null
null
ganeti/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
qrFilter :: String qrFilter = "filter"
38
qrFilter :: String qrFilter = "filter"
38
qrFilter = "filter"
19
false
true
0
4
5
11
6
5
null
null
patperry/hs-linear-algebra
tests-old/HermMatrix.hs
bsd-3-clause
prop_herm_apply (HermMatrixMV (h :: HM) a x) = h <*> x ~== a <*> x
70
prop_herm_apply (HermMatrixMV (h :: HM) a x) = h <*> x ~== a <*> x
70
prop_herm_apply (HermMatrixMV (h :: HM) a x) = h <*> x ~== a <*> x
70
false
false
0
9
18
38
19
19
null
null
droundy/franchise
Distribution/Franchise/Persistency.hs
bsd-3-clause
checkOnce :: (Read a, Show a, Monoid a) => String -- ^ name of test -> C a -- ^ action to perform -> C a checkOnce name check = require name check `catchC` \_ -> return mempty
195
checkOnce :: (Read a, Show a, Monoid a) => String -- ^ name of test -> C a -- ^ action to perform -> C a checkOnce name check = require name check `catchC` \_ -> return mempty
195
checkOnce name check = require name check `catchC` \_ -> return mempty
70
false
true
0
8
57
72
37
35
null
null
bkoropoff/Idris-dev
src/Idris/Delaborate.hs
bsd-3-clause
showPart ist (TermPart tm) = pprintTerm ist (delabSugared ist tm)
66
showPart ist (TermPart tm) = pprintTerm ist (delabSugared ist tm)
66
showPart ist (TermPart tm) = pprintTerm ist (delabSugared ist tm)
66
false
false
0
7
10
32
14
18
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'V.map' v_map = V.map
25
v_map = V.map
13
v_map = V.map
13
true
false
0
5
4
9
5
4
null
null
snoyberg/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
-- Annotation type checking toAnnotationWrapperName :: Name toAnnotationWrapperName = varQual gHC_DESUGAR (fsLit "toAnnotationWrapper") toAnnotationWrapperIdKey
160
toAnnotationWrapperName :: Name toAnnotationWrapperName = varQual gHC_DESUGAR (fsLit "toAnnotationWrapper") toAnnotationWrapperIdKey
132
toAnnotationWrapperName = varQual gHC_DESUGAR (fsLit "toAnnotationWrapper") toAnnotationWrapperIdKey
100
true
true
0
7
13
25
13
12
null
null
josefs/sbv
Data/SBV/Utils/Lib.hs
bsd-3-clause
-- | Monadic lift over 2-tuples mlift2 :: Monad m => (a' -> b' -> r) -> (a -> m a') -> (b -> m b') -> (a, b) -> m r mlift2 k f g (a, b) = f a >>= \a' -> g b >>= \b' -> return $ k a' b'
184
mlift2 :: Monad m => (a' -> b' -> r) -> (a -> m a') -> (b -> m b') -> (a, b) -> m r mlift2 k f g (a, b) = f a >>= \a' -> g b >>= \b' -> return $ k a' b'
152
mlift2 k f g (a, b) = f a >>= \a' -> g b >>= \b' -> return $ k a' b'
68
true
true
4
12
53
131
66
65
null
null
JoeyEremondi/elm-type-effect
src/Type/Effect/Solve.hs
bsd-3-clause
--TODO implement this case unifyInfo Top Top = return Top
57
unifyInfo Top Top = return Top
30
unifyInfo Top Top = return Top
30
true
false
1
5
9
19
7
12
null
null
urv/fixhs
src/Data/FIX/Spec/FIX43.hs
lgpl-2.1
tTradSesPreCloseTime :: FIXTag tTradSesPreCloseTime = FIXTag { tName = "TradSesPreCloseTime" , tnum = 343 , tparser = toFIXTimestamp , arbitraryValue = FIXTimestamp <$> arbitrary }
193
tTradSesPreCloseTime :: FIXTag tTradSesPreCloseTime = FIXTag { tName = "TradSesPreCloseTime" , tnum = 343 , tparser = toFIXTimestamp , arbitraryValue = FIXTimestamp <$> arbitrary }
193
tTradSesPreCloseTime = FIXTag { tName = "TradSesPreCloseTime" , tnum = 343 , tparser = toFIXTimestamp , arbitraryValue = FIXTimestamp <$> arbitrary }
162
false
true
0
8
37
45
26
19
null
null
lessandro/gridc
src/GridC/Lexer.hs
mit
parens :: Parser u a -> Parser u a parens = P.parens lexer
58
parens :: Parser u a -> Parser u a parens = P.parens lexer
58
parens = P.parens lexer
23
false
true
0
7
12
36
15
21
null
null
alexander-at-github/eta
compiler/ETA/Prelude/ForeignCall.hs
bsd-3-clause
ccallConvToInt CApiConv = panic "ccallConvToInt CApiConv"
60
ccallConvToInt CApiConv = panic "ccallConvToInt CApiConv"
60
ccallConvToInt CApiConv = panic "ccallConvToInt CApiConv"
60
false
false
0
5
8
12
5
7
null
null
graninas/Haskell-Algorithms
Programs/GameOfLifeComonad/SampleCells.hs
gpl-3.0
metaCells = map (map zeroCellCreator) cellsGlider
49
metaCells = map (map zeroCellCreator) cellsGlider
49
metaCells = map (map zeroCellCreator) cellsGlider
49
false
false
0
7
5
17
8
9
null
null
blancas/trex
src/Transform.hs
mit
processFile :: Transfn -> Bool -> String -> IO () processFile f header path = do contents <- LB.readFile path LB.writeFile out $ process f header contents putStrLn path where out = path ++ ".out"
209
processFile :: Transfn -> Bool -> String -> IO () processFile f header path = do contents <- LB.readFile path LB.writeFile out $ process f header contents putStrLn path where out = path ++ ".out"
209
processFile f header path = do contents <- LB.readFile path LB.writeFile out $ process f header contents putStrLn path where out = path ++ ".out"
159
false
true
3
10
48
93
39
54
null
null
muspellsson/hiccup
RToken.hs
lgpl-2.1
compile :: BString -> RTokCmd compile str = clean . tconcat . map toTok . elift . parseSubstAll $ str where clean [r] = r clean rl = CatLst rl tconcat (Lit a:Lit b:xs) = tconcat (Lit (B.append a b):xs) tconcat (x:xs) = x : tconcat xs tconcat [] = [] toTok x = case x of SS...
563
compile :: BString -> RTokCmd compile str = clean . tconcat . map toTok . elift . parseSubstAll $ str where clean [r] = r clean rl = CatLst rl tconcat (Lit a:Lit b:xs) = tconcat (Lit (B.append a b):xs) tconcat (x:xs) = x : tconcat xs tconcat [] = [] toTok x = case x of SS...
563
compile str = clean . tconcat . map toTok . elift . parseSubstAll $ str where clean [r] = r clean rl = CatLst rl tconcat (Lit a:Lit b:xs) = tconcat (Lit (B.append a b):xs) tconcat (x:xs) = x : tconcat xs tconcat [] = [] toTok x = case x of SStr s -> litIfy s SCm...
533
false
true
7
11
232
243
118
125
null
null
aBhallo/AoC2016
Day 4/day4part2.hs
mit
checkSum (x:xs) ((y,_):ys) | x == y = checkSum xs ys
56
checkSum (x:xs) ((y,_):ys) | x == y = checkSum xs ys
56
checkSum (x:xs) ((y,_):ys) | x == y = checkSum xs ys
56
false
false
0
8
14
46
23
23
null
null
balangs/eTeak
src/Graph.hs
bsd-3-clause
findBackLinkDup :: Eq a => Array Int [a] -> Array Int [a] -> (Int, (Int, a)) -> [a] findBackLinkDup fin fout (from, (to, backlink)) | preds `intersect` succs == [] = [] | preds `intersect` (succs `intersect` [backlink]) /= [] = [backlink,backlink] | otherwise = [backlink] where ...
450
findBackLinkDup :: Eq a => Array Int [a] -> Array Int [a] -> (Int, (Int, a)) -> [a] findBackLinkDup fin fout (from, (to, backlink)) | preds `intersect` succs == [] = [] | preds `intersect` (succs `intersect` [backlink]) /= [] = [backlink,backlink] | otherwise = [backlink] where ...
446
findBackLinkDup fin fout (from, (to, backlink)) | preds `intersect` succs == [] = [] | preds `intersect` (succs `intersect` [backlink]) /= [] = [backlink,backlink] | otherwise = [backlink] where preds = fin!from succs = fout!to -- NEW --- misc functions...
362
false
true
2
12
141
178
98
80
null
null
ciderpunx/project_euler_in_haskell
fact.hs
gpl-2.0
-- NB: Use :set -XPostfixOperators if running from GHCi (!) :: Integer -> Integer (!) n = product [1..n]
105
(!) :: Integer -> Integer (!) n = product [1..n]
48
(!) n = product [1..n]
22
true
true
0
6
19
31
18
13
null
null
jaimeMF/mediawiki-dl
mediawiki-dl.hs
bsd-2-clause
printUsageInfo = putStrLn $ usageInfo usageHeader options
57
printUsageInfo = putStrLn $ usageInfo usageHeader options
57
printUsageInfo = putStrLn $ usageInfo usageHeader options
57
false
false
0
6
6
15
7
8
null
null
urbanslug/ghc
testsuite/tests/perf/compiler/T783.hs
bsd-3-clause
foo x | x == 65 = 65
20
foo x | x == 65 = 65
20
foo x | x == 65 = 65
20
false
false
0
8
7
23
9
14
null
null
ocharles/hackage-server
Distribution/Client/Mirror/Session.hs
bsd-3-clause
formatEntity :: Entity -> String formatEntity EntityIndex = "the package index"
89
formatEntity :: Entity -> String formatEntity EntityIndex = "the package index"
89
formatEntity EntityIndex = "the package index"
56
false
true
0
5
20
22
10
12
null
null
bitemyapp/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
pprString :: String -> Doc -- Print newlines as newlines with Haskell string escape notation, -- not as '\n'. For other non-printables use regular escape notation. pprString s = vcat (map text (showMultiLineString s))
218
pprString :: String -> Doc pprString s = vcat (map text (showMultiLineString s))
80
pprString s = vcat (map text (showMultiLineString s))
53
true
true
0
9
34
43
20
23
null
null
sdiehl/ghc
compiler/main/DynFlags.hs
bsd-3-clause
allNonDeprecatedFlags :: [String] allNonDeprecatedFlags = allFlagsDeps False
76
allNonDeprecatedFlags :: [String] allNonDeprecatedFlags = allFlagsDeps False
76
allNonDeprecatedFlags = allFlagsDeps False
42
false
true
0
5
6
17
9
8
null
null
jwiegley/ghc-release
libraries/Cabal/cabal-install/Distribution/Client/Setup.hs
gpl-3.0
usagePackages :: String -> String -> String usagePackages name pname = "Usage: " ++ pname ++ " " ++ name ++ " [PACKAGES]\n\n" ++ "Flags for " ++ name ++ ":"
163
usagePackages :: String -> String -> String usagePackages name pname = "Usage: " ++ pname ++ " " ++ name ++ " [PACKAGES]\n\n" ++ "Flags for " ++ name ++ ":"
163
usagePackages name pname = "Usage: " ++ pname ++ " " ++ name ++ " [PACKAGES]\n\n" ++ "Flags for " ++ name ++ ":"
119
false
true
2
8
37
54
26
28
null
null
phischu/fragnix
builtins/base/GHC.IO.FD.hs
bsd-3-clause
isSeekable :: FD -> IO Bool isSeekable fd = do t <- devType fd return (t == RegularFile || t == RawDevice)
110
isSeekable :: FD -> IO Bool isSeekable fd = do t <- devType fd return (t == RegularFile || t == RawDevice)
110
isSeekable fd = do t <- devType fd return (t == RegularFile || t == RawDevice)
82
false
true
0
12
25
57
25
32
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxLANGUAGE_UZBEK :: Int wxLANGUAGE_UZBEK = 218
46
wxLANGUAGE_UZBEK :: Int wxLANGUAGE_UZBEK = 218
46
wxLANGUAGE_UZBEK = 218
22
false
true
0
4
5
11
6
5
null
null
susisu/Dolce
src/Parser.hs
mit
funcLiteral :: Parser Literal funcLiteral = P.char '{' *> (operationToFuncLiteral <$> dol) <* P.char '}'
104
funcLiteral :: Parser Literal funcLiteral = P.char '{' *> (operationToFuncLiteral <$> dol) <* P.char '}'
104
funcLiteral = P.char '{' *> (operationToFuncLiteral <$> dol) <* P.char '}'
74
false
true
1
8
14
42
19
23
null
null
dnvriend/study-category-theory
funprog/C9_Functional_Programming_Fundamentals/Week5/lists.hs
apache-2.0
concat' :: [[a]] -> [a] concat' xxs = [x | xs <- xxs, x <- xs]
62
concat' :: [[a]] -> [a] concat' xxs = [x | xs <- xxs, x <- xs]
62
concat' xxs = [x | xs <- xxs, x <- xs]
38
false
true
0
7
15
46
25
21
null
null
jbearer/hspl
src/Control/Hspl/Internal/UI.hs
mit
formatPredicate :: Predicate -> String formatPredicate (Predicate _ _ name t) = name ++ "? " ++ parensTerm t
108
formatPredicate :: Predicate -> String formatPredicate (Predicate _ _ name t) = name ++ "? " ++ parensTerm t
108
formatPredicate (Predicate _ _ name t) = name ++ "? " ++ parensTerm t
69
false
true
0
6
18
45
21
24
null
null
yi-editor/yi
yi-core/src/Yi/Interact.hs
gpl-2.0
findWrites _ Fail = Dead
24
findWrites _ Fail = Dead
24
findWrites _ Fail = Dead
24
false
false
0
5
4
11
5
6
null
null
esengie/fpl-exploration-tool
src/specLang/SortCheck.hs
bsd-3-clause
sortCheck :: LangSpec -> SortCheckM () sortCheck lsp = do sortCheckSorts lsp sortCheckFunSyms (AST.funSyms lsp) stabs <~ checkStab (AST.stabilities lsp) sortCheckAxioms (AST.axioms lsp) sortCheckReductions (AST.reductions lsp)
246
sortCheck :: LangSpec -> SortCheckM () sortCheck lsp = do sortCheckSorts lsp sortCheckFunSyms (AST.funSyms lsp) stabs <~ checkStab (AST.stabilities lsp) sortCheckAxioms (AST.axioms lsp) sortCheckReductions (AST.reductions lsp)
246
sortCheck lsp = do sortCheckSorts lsp sortCheckFunSyms (AST.funSyms lsp) stabs <~ checkStab (AST.stabilities lsp) sortCheckAxioms (AST.axioms lsp) sortCheckReductions (AST.reductions lsp)
207
false
true
0
12
45
94
40
54
null
null