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
oldmanmike/ghc
compiler/stgSyn/CoreToStg.hs
bsd-3-clause
-- When removing a binder, remember to add its type variables -- c.f. CoreFVs.delBinderFV elementOfFVInfo :: Id -> FreeVarsInfo -> Bool elementOfFVInfo id fvs = isJust (lookupVarEnv fvs id)
198
elementOfFVInfo :: Id -> FreeVarsInfo -> Bool elementOfFVInfo id fvs = isJust (lookupVarEnv fvs id)
99
elementOfFVInfo id fvs = isJust (lookupVarEnv fvs id)
53
true
true
0
8
37
42
20
22
null
null
tpsinnem/Idris-dev
src/Idris/Primitives.hs
bsd-3-clause
bcBin :: (Char -> Char -> Bool) -> [Const] -> Maybe Const bcBin op [Ch x, Ch y] = let i = (if op x y then 1 else 0) in Just $ I i
153
bcBin :: (Char -> Char -> Bool) -> [Const] -> Maybe Const bcBin op [Ch x, Ch y] = let i = (if op x y then 1 else 0) in Just $ I i
153
bcBin op [Ch x, Ch y] = let i = (if op x y then 1 else 0) in Just $ I i
95
false
true
0
11
58
92
45
47
null
null
gcampax/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
pprStmtContext MDoExpr = ptext (sLit "'mdo' block")
59
pprStmtContext MDoExpr = ptext (sLit "'mdo' block")
59
pprStmtContext MDoExpr = ptext (sLit "'mdo' block")
59
false
false
0
7
14
18
8
10
null
null
dragosboca/xmobar
src/Plugins/Monitors/Batt.hs
bsd-3-clause
readBattery sc files = do a <- grab $ fFull files b <- grab $ fNow files d <- grab $ fCurrent files let sc' = if isCurrent files then sc / 10 else sc return $ Battery (3600 * a / sc') -- wattseconds (3600 * b / sc') -- wattseconds (d / sc')...
477
readBattery sc files = do a <- grab $ fFull files b <- grab $ fNow files d <- grab $ fCurrent files let sc' = if isCurrent files then sc / 10 else sc return $ Battery (3600 * a / sc') -- wattseconds (3600 * b / sc') -- wattseconds (d / sc')...
477
readBattery sc files = do a <- grab $ fFull files b <- grab $ fNow files d <- grab $ fCurrent files let sc' = if isCurrent files then sc / 10 else sc return $ Battery (3600 * a / sc') -- wattseconds (3600 * b / sc') -- wattseconds (d / sc')...
477
false
false
6
11
174
200
92
108
null
null
bmsherman/magma-gpu
Foreign/CUDA/Magma/TH.hs
bsd-3-clause
inT (ArrC t) = inT' (typeDat t) where inT' (TD ct hst c2hs (hs2c,purity)) = TI (pointerify ct) (convertT [t| [ $(hst) ] |] exp) (Just (destroyT [| F.free |])) where exp = case purity of Pure -> [| F.newArray . map $(hs2c) |] ; Monadic -> undefined
269
inT (ArrC t) = inT' (typeDat t) where inT' (TD ct hst c2hs (hs2c,purity)) = TI (pointerify ct) (convertT [t| [ $(hst) ] |] exp) (Just (destroyT [| F.free |])) where exp = case purity of Pure -> [| F.newArray . map $(hs2c) |] ; Monadic -> undefined
269
inT (ArrC t) = inT' (typeDat t) where inT' (TD ct hst c2hs (hs2c,purity)) = TI (pointerify ct) (convertT [t| [ $(hst) ] |] exp) (Just (destroyT [| F.free |])) where exp = case purity of Pure -> [| F.newArray . map $(hs2c) |] ; Monadic -> undefined
269
false
false
1
8
69
129
65
64
null
null
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/SWHS/IMods.hs
bsd-2-clause
eBalanceOnWtrDerivDesc1 :: Sentence -> Sentence-> Sentence -> ConceptInstance -> Sentence eBalanceOnWtrDerivDesc1 htEnd oa ea htA = foldlSentCol [ S "To find the", phrase rOfChng `sOf` E (sy tempW) `sC` S "we look at the", phrase energy, S "balance on" +:+. phrase water, S "The", phrase vol, S "being considered" ...
1,097
eBalanceOnWtrDerivDesc1 :: Sentence -> Sentence-> Sentence -> ConceptInstance -> Sentence eBalanceOnWtrDerivDesc1 htEnd oa ea htA = foldlSentCol [ S "To find the", phrase rOfChng `sOf` E (sy tempW) `sC` S "we look at the", phrase energy, S "balance on" +:+. phrase water, S "The", phrase vol, S "being considered" ...
1,097
eBalanceOnWtrDerivDesc1 htEnd oa ea htA = foldlSentCol [ S "To find the", phrase rOfChng `sOf` E (sy tempW) `sC` S "we look at the", phrase energy, S "balance on" +:+. phrase water, S "The", phrase vol, S "being considered" `isThe` (phrase vol `sOf` phrase water), S "in the", phrase tank, E (sy wVol) `sC` S "wh...
1,007
false
true
0
13
199
434
223
211
null
null
holzensp/ghc
libraries/base/Data/List.hs
bsd-3-clause
-- | The 'elemIndices' function extends 'elemIndex', by returning the -- indices of all elements equal to the query element, in ascending order. elemIndices :: Eq a => a -> [a] -> [Int] elemIndices x = findIndices (x==)
225
elemIndices :: Eq a => a -> [a] -> [Int] elemIndices x = findIndices (x==)
80
elemIndices x = findIndices (x==)
35
true
true
0
10
43
49
25
24
null
null
andreasabel/helf
src/DynArray.hs
mit
fromFreqList :: [(Int,a)] -> DynArray a fromFreqList l = let n = length l in if n <= 0 then empty else fromFreqList' n l
122
fromFreqList :: [(Int,a)] -> DynArray a fromFreqList l = let n = length l in if n <= 0 then empty else fromFreqList' n l
122
fromFreqList l = let n = length l in if n <= 0 then empty else fromFreqList' n l
82
false
true
0
9
26
61
31
30
null
null
opqdonut/riot
Ginsu/GenUtil.hs
gpl-2.0
oldl1M :: Monad m => (a -> a -> m a) -> [a] -> m a foldl1M f (x:xs) = foldlM f x xs
85
foldl1M :: Monad m => (a -> a -> m a) -> [a] -> m a foldl1M f (x:xs) = foldlM f x xs
85
foldl1M f (x:xs) = foldlM f x xs
32
false
true
0
10
25
69
33
36
null
null
sixears/getopt
src/Console/Getopt/ArgArity.hs
mit
liftAA ArgMaybe = ConE 'ArgMaybe
37
liftAA ArgMaybe = ConE 'ArgMaybe
37
liftAA ArgMaybe = ConE 'ArgMaybe
37
false
false
0
5
9
13
6
7
null
null
dmbarbour/Sirea
src/Sirea/Clock.hs
bsd-3-clause
-- frequency to clockspeck freqToCS :: Rational -> ClockSpec freqToCS r = if (0 == r) then ClockSpec 0 0 else ClockSpec (recip r) 0
131
freqToCS :: Rational -> ClockSpec freqToCS r = if (0 == r) then ClockSpec 0 0 else ClockSpec (recip r) 0
104
freqToCS r = if (0 == r) then ClockSpec 0 0 else ClockSpec (recip r) 0
70
true
true
0
8
24
50
26
24
null
null
neothemachine/monadiccp
examples/AllInterval.hs
bsd-3-clause
model :: ExampleModel ModelInt -- type signature model n = -- function 'model' takes argument n exists $ \x -> do -- request a (collection) variable x size x @= n -- whose size must be n d <- diffList x -- d becomes the diffList of ...
776
model :: ExampleModel ModelInt model n = -- function 'model' takes argument n exists $ \x -> do -- request a (collection) variable x size x @= n -- whose size must be n d <- diffList x -- d becomes the diffList of x x `allin` (cte 0...
754
model n = -- function 'model' takes argument n exists $ \x -> do -- request a (collection) variable x size x @= n -- whose size must be n d <- diffList x -- d becomes the diffList of x x `allin` (cte 0,n-1) -- all x element...
723
true
true
3
11
334
161
81
80
null
null
FranklinChen/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
lookupBinder :: Eq n => n -> EnvTT n -> Maybe (Binder (TT n)) lookupBinder n = lookup n . envBinders
100
lookupBinder :: Eq n => n -> EnvTT n -> Maybe (Binder (TT n)) lookupBinder n = lookup n . envBinders
100
lookupBinder n = lookup n . envBinders
38
false
true
0
13
20
59
26
33
null
null
NorfairKing/super-user-spark
src/SuperUserSpark/OptParse.hs
mit
parseDeploy :: ParserInfo Dispatch parseDeploy = info parser modifier where parser = DispatchDeploy <$> parseDeployArgs modifier = fullDesc <> progDesc "Deploy a spark card."
184
parseDeploy :: ParserInfo Dispatch parseDeploy = info parser modifier where parser = DispatchDeploy <$> parseDeployArgs modifier = fullDesc <> progDesc "Deploy a spark card."
184
parseDeploy = info parser modifier where parser = DispatchDeploy <$> parseDeployArgs modifier = fullDesc <> progDesc "Deploy a spark card."
149
false
true
6
6
33
58
22
36
null
null
acowley/roshask
src/Ros/Internal/DepFinder.hs
bsd-3-clause
-- Find the path to a package based on the given search paths. findPackagePath :: [FilePath] -> Package -> Maybe FilePath findPackagePath search pkg = find ((== pkg) . last . splitPath) search
192
findPackagePath :: [FilePath] -> Package -> Maybe FilePath findPackagePath search pkg = find ((== pkg) . last . splitPath) search
129
findPackagePath search pkg = find ((== pkg) . last . splitPath) search
70
true
true
0
9
32
51
27
24
null
null
wxwxwwxxx/ghc
compiler/basicTypes/SrcLoc.hs
bsd-3-clause
combineLocs :: Located a -> Located b -> SrcSpan combineLocs a b = combineSrcSpans (getLoc a) (getLoc b)
104
combineLocs :: Located a -> Located b -> SrcSpan combineLocs a b = combineSrcSpans (getLoc a) (getLoc b)
104
combineLocs a b = combineSrcSpans (getLoc a) (getLoc b)
55
false
true
0
7
17
47
22
25
null
null
CIFASIS/QuickFuzz
src/Test/QuickFuzz/Derive/Mutation.hs
gpl-3.0
muttC c vars = doE $ map (\ (b,x) -> bindS (varP x) (freqE b x)) vars ++ [ noBindS $ appE (varE 'return) $ foldl (\r (_,x) -> appE r (varE x)) (conE c) vars]
186
muttC c vars = doE $ map (\ (b,x) -> bindS (varP x) (freqE b x)) vars ++ [ noBindS $ appE (varE 'return) $ foldl (\r (_,x) -> appE r (varE x)) (conE c) vars]
186
muttC c vars = doE $ map (\ (b,x) -> bindS (varP x) (freqE b x)) vars ++ [ noBindS $ appE (varE 'return) $ foldl (\r (_,x) -> appE r (varE x)) (conE c) vars]
186
false
false
5
13
64
126
61
65
null
null
lukexi/ghc-7.8-arm64
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
emitPrimOp _ res ReadByteArrayOp_Double args = doIndexByteArrayOp Nothing f64 res args
103
emitPrimOp _ res ReadByteArrayOp_Double args = doIndexByteArrayOp Nothing f64 res args
103
emitPrimOp _ res ReadByteArrayOp_Double args = doIndexByteArrayOp Nothing f64 res args
103
false
false
1
5
27
28
11
17
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
3934 = 3933
11
3934 = 3933
11
3934 = 3933
11
false
false
1
5
2
10
3
7
null
null
GaloisInc/verification-game
web-prover/src/SolutionMap.hs
bsd-3-clause
-- | Update the HEAD to point to the given solution. setHead :: Writeable (Shared s) => SiteState s -> FunName -> TaskGroup -> Text -> IO () setHead siteState fun tg nm = do let cont = L.fromStrict (Text.encodeUtf8 (nm `Text.append` "\n")) let headFile = taskGroupSolutionHEADFile fun tg storageWriteFile (...
524
setHead :: Writeable (Shared s) => SiteState s -> FunName -> TaskGroup -> Text -> IO () setHead siteState fun tg nm = do let cont = L.fromStrict (Text.encodeUtf8 (nm `Text.append` "\n")) let headFile = taskGroupSolutionHEADFile fun tg storageWriteFile (siteSharedStorage siteState) headFile cont {- | Sav...
471
setHead siteState fun tg nm = do let cont = L.fromStrict (Text.encodeUtf8 (nm `Text.append` "\n")) let headFile = taskGroupSolutionHEADFile fun tg storageWriteFile (siteSharedStorage siteState) headFile cont {- | Save an axiomatic solution and return its name. Assumes that the pre- and post-condition expr...
381
true
true
0
15
94
127
60
67
null
null
RaminHAL9001/Dao
src/Language/Interpreter/Dao/DefaultBIFs.hs
agpl-3.0
_daoget :: (DaoDecode dict, DaoDecode key, Show key) -- TODO remove Show => (key -> dict -> Maybe DaoExpr) -> DaoMacro DaoExpr _daoget lookup = do let getatom = DaoAtom "get" let badkey = DaoString "incorrect key type for lookup target" let info = [("reason", badkey), ("function", getatom)] (listLen, keys...
2,642
_daoget :: (DaoDecode dict, DaoDecode key, Show key) -- TODO remove Show => (key -> dict -> Maybe DaoExpr) -> DaoMacro DaoExpr _daoget lookup = do let getatom = DaoAtom "get" let badkey = DaoString "incorrect key type for lookup target" let info = [("reason", badkey), ("function", getatom)] (listLen, keys...
2,642
_daoget lookup = do let getatom = DaoAtom "get" let badkey = DaoString "incorrect key type for lookup target" let info = [("reason", badkey), ("function", getatom)] (listLen, keys) <- mplus (((,) Nothing) . pure <$> argDecode info) (do keysList <- argDecode info liftM ((,) $ Just $ length keysL...
2,509
false
true
0
24
606
466
242
224
null
null
elieux/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
lookupEvBind :: EvBindMap -> EvVar -> Maybe EvBind lookupEvBind bs = lookupDVarEnv (ev_bind_varenv bs)
102
lookupEvBind :: EvBindMap -> EvVar -> Maybe EvBind lookupEvBind bs = lookupDVarEnv (ev_bind_varenv bs)
102
lookupEvBind bs = lookupDVarEnv (ev_bind_varenv bs)
51
false
true
0
7
13
34
16
18
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
primOpOutOfLine CasArrayOp = True
33
primOpOutOfLine CasArrayOp = True
33
primOpOutOfLine CasArrayOp = True
33
false
false
0
4
3
10
4
6
null
null
nightscape/platform
shared/src/Unison/Var.hs
mit
freshNamed :: Var v => Set v -> Text -> v freshNamed used n = freshIn used (named n)
84
freshNamed :: Var v => Set v -> Text -> v freshNamed used n = freshIn used (named n)
84
freshNamed used n = freshIn used (named n)
42
false
true
0
9
18
50
22
28
null
null
anchor/haskell-opensrs
lib/Data/OpenSRS/ToXML.hs
bsd-3-clause
-- | Pack a maybe string value into an itemNode mayPair :: String -> Maybe String -> Node mayPair k v = itemNode k $ fromMaybe "" v
131
mayPair :: String -> Maybe String -> Node mayPair k v = itemNode k $ fromMaybe "" v
83
mayPair k v = itemNode k $ fromMaybe "" v
41
true
true
0
7
27
40
19
21
null
null
nlander/bazaari
src/Bazaari/Http.hs
bsd-3-clause
renderGregorian :: (Integer, Int, Int) -> ByteString renderGregorian (year, month, day) = rendY year <> "-" <> rendInt month <> "-" <> rendInt day where rendY = LB.toStrict . toLazyByteString . integerDec
246
renderGregorian :: (Integer, Int, Int) -> ByteString renderGregorian (year, month, day) = rendY year <> "-" <> rendInt month <> "-" <> rendInt day where rendY = LB.toStrict . toLazyByteString . integerDec
246
renderGregorian (year, month, day) = rendY year <> "-" <> rendInt month <> "-" <> rendInt day where rendY = LB.toStrict . toLazyByteString . integerDec
186
false
true
0
8
73
81
41
40
null
null
nickbart1980/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
circ 'c' = "ĉ"
14
circ 'c' = "ĉ"
14
circ 'c' = "ĉ"
14
false
false
0
5
3
9
4
5
null
null
soupi/pureli
src/Language/Pureli/Module.hs
bsd-3-clause
envIfNoDups :: Monad m => Name -> Env -> MT.ExceptT Error m Env envIfNoDups mName env = do let dups = duplicates $ map fst (M.toList env) if not (null dups) then MT.throwE $ Error Nothing $ "Duplicate definitions in module: " ++ withYellow mName ++ withRed "\n*** " ++ show (map withBlue dups) else return env
317
envIfNoDups :: Monad m => Name -> Env -> MT.ExceptT Error m Env envIfNoDups mName env = do let dups = duplicates $ map fst (M.toList env) if not (null dups) then MT.throwE $ Error Nothing $ "Duplicate definitions in module: " ++ withYellow mName ++ withRed "\n*** " ++ show (map withBlue dups) else return env
317
envIfNoDups mName env = do let dups = duplicates $ map fst (M.toList env) if not (null dups) then MT.throwE $ Error Nothing $ "Duplicate definitions in module: " ++ withYellow mName ++ withRed "\n*** " ++ show (map withBlue dups) else return env
253
false
true
0
14
64
131
61
70
null
null
OpenXT/manager
xenmgr/XenMgr/Expose/HostObject.hs
gpl-2.0
_ListDiskDevices :: Rpc [Map String String] _ListDiskDevices = do devs <- liftIO getHostStorageDevices return . map fromStorageDev $ devs where fromStorageDev d = M.fromList [ ("udi", storageUDI d) , ("block-device", storageBlockDevPath d) ]
298
_ListDiskDevices :: Rpc [Map String String] _ListDiskDevices = do devs <- liftIO getHostStorageDevices return . map fromStorageDev $ devs where fromStorageDev d = M.fromList [ ("udi", storageUDI d) , ("block-device", storageBlockDevPath d) ]
298
_ListDiskDevices = do devs <- liftIO getHostStorageDevices return . map fromStorageDev $ devs where fromStorageDev d = M.fromList [ ("udi", storageUDI d) , ("block-device", storageBlockDevPath d) ]
254
false
true
0
9
89
86
42
44
null
null
arnabgho/RLearnHaskell
examples/CatMouse.hs
mit
coordToInteger :: Pair -> Integer coordToInteger (x, y) = (x - 1) * boardDim + y - 1
84
coordToInteger :: Pair -> Integer coordToInteger (x, y) = (x - 1) * boardDim + y - 1
84
coordToInteger (x, y) = (x - 1) * boardDim + y - 1
50
false
true
0
9
17
49
24
25
null
null
m4lvin/robbed
src/Data/ROBDD/Types.hs
bsd-3-clause
varBddCmp v (BDD _ b _ _ _) = v `compare` b
43
varBddCmp v (BDD _ b _ _ _) = v `compare` b
43
varBddCmp v (BDD _ b _ _ _) = v `compare` b
43
false
false
0
6
11
33
16
17
null
null
haskellbr/missingh
missingh-all/src/Data/BinPacking.hs
mit
packLargeFirst :: BinPacker packLargeFirst bins sizes = packLargeFirst' bins (sortBy fstSort sizes) where fstSort a b = compare (fst a) (fst b)
147
packLargeFirst :: BinPacker packLargeFirst bins sizes = packLargeFirst' bins (sortBy fstSort sizes) where fstSort a b = compare (fst a) (fst b)
147
packLargeFirst bins sizes = packLargeFirst' bins (sortBy fstSort sizes) where fstSort a b = compare (fst a) (fst b)
119
false
true
1
7
25
68
29
39
null
null
dpac-vlsi/Sigil-Trace-Visualizer
haskell/stgraph/app/Main.hs
bsd-2-clause
one = zero + 1
14
one = zero + 1
14
one = zero + 1
14
false
false
0
5
4
10
5
5
null
null
linusyang/barrelfish
tools/flounder/LMP.hs
mit
lmp_init_function_proto :: String -> C.Unit lmp_init_function_proto n = C.GVarDecl C.Extern C.NonConst (C.Function C.NoScope C.Void params) name Nothing where name = lmp_init_fn_name n params = [C.Param (C.Ptr $ C.Struct (lmp_bind_type n)) "b", C.Param (C.Ptr $ C.Struct "...
340
lmp_init_function_proto :: String -> C.Unit lmp_init_function_proto n = C.GVarDecl C.Extern C.NonConst (C.Function C.NoScope C.Void params) name Nothing where name = lmp_init_fn_name n params = [C.Param (C.Ptr $ C.Struct (lmp_bind_type n)) "b", C.Param (C.Ptr $ C.Struct "...
340
lmp_init_function_proto n = C.GVarDecl C.Extern C.NonConst (C.Function C.NoScope C.Void params) name Nothing where name = lmp_init_fn_name n params = [C.Param (C.Ptr $ C.Struct (lmp_bind_type n)) "b", C.Param (C.Ptr $ C.Struct "waitset") "waitset"]
296
false
true
1
12
84
124
61
63
null
null
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/StringQueries.hs
bsd-3-clause
shadingLanguageVersion :: GettableStateVar String shadingLanguageVersion = makeGettableStateVar (getString gl_SHADING_LANGUAGE_VERSION)
135
shadingLanguageVersion :: GettableStateVar String shadingLanguageVersion = makeGettableStateVar (getString gl_SHADING_LANGUAGE_VERSION)
135
shadingLanguageVersion = makeGettableStateVar (getString gl_SHADING_LANGUAGE_VERSION)
85
false
true
0
7
8
23
11
12
null
null
gbataille/pandoc
src/Text/Pandoc/Writers/EPUB.hs
gpl-2.0
metaValueToString (MetaBool b) = show b
39
metaValueToString (MetaBool b) = show b
39
metaValueToString (MetaBool b) = show b
39
false
false
0
7
5
18
8
10
null
null
DaMSL/K3
src/Language/K3/Runtime/Engine.hs
apache-2.0
externalEndpointId :: Identifier -> Bool externalEndpointId = not . isPrefixOf internalEndpointPrefix
101
externalEndpointId :: Identifier -> Bool externalEndpointId = not . isPrefixOf internalEndpointPrefix
101
externalEndpointId = not . isPrefixOf internalEndpointPrefix
60
false
true
0
6
10
22
11
11
null
null
AlexanderPankiv/ghc
compiler/main/DynFlags.hs
bsd-3-clause
xFlags :: [FlagSpec ExtensionFlag] xFlags = [ -- See Note [Updating flag description in the User's Guide] -- See Note [Supporting CLI completion] -- Please keep the list of flags below sorted alphabetically flagSpec "AllowAmbiguousTypes" Opt_AllowAmbiguousTypes, flagSpec "AlternativeLayoutRule" ...
8,008
xFlags :: [FlagSpec ExtensionFlag] xFlags = [ -- See Note [Updating flag description in the User's Guide] -- See Note [Supporting CLI completion] -- Please keep the list of flags below sorted alphabetically flagSpec "AllowAmbiguousTypes" Opt_AllowAmbiguousTypes, flagSpec "AlternativeLayoutRule" ...
8,008
xFlags = [ -- See Note [Updating flag description in the User's Guide] -- See Note [Supporting CLI completion] -- Please keep the list of flags below sorted alphabetically flagSpec "AllowAmbiguousTypes" Opt_AllowAmbiguousTypes, flagSpec "AlternativeLayoutRule" Opt_AlternativeLayoutRule, fl...
7,973
false
true
0
13
2,622
956
478
478
null
null
onponomarev/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
confdReqqIplist :: String confdReqqIplist = ConstantUtils.confdReqqIplist
73
confdReqqIplist :: String confdReqqIplist = ConstantUtils.confdReqqIplist
73
confdReqqIplist = ConstantUtils.confdReqqIplist
47
false
true
0
6
5
20
8
12
null
null
RedMoonStudios/cryptd-lib
Cryptd/Lib/TLS.hs
gpl-3.0
-- | Do the TLS handshake, call the handler and cleanup. doFinalize :: Handle -> TunnelHandle -> HandlerCmd -> IO (Maybe String) doFinalize tcpHandle tlsHandle handler = TLS.handshake tlsHandle >> handle tcpHandle tlsHandle where handle tcp tls = do EX.finally (handler tls) (TLS.bye...
426
doFinalize :: Handle -> TunnelHandle -> HandlerCmd -> IO (Maybe String) doFinalize tcpHandle tlsHandle handler = TLS.handshake tlsHandle >> handle tcpHandle tlsHandle where handle tcp tls = do EX.finally (handler tls) (TLS.bye tls >> hClose tcp) return Nothing -- | Do a TCP...
369
doFinalize tcpHandle tlsHandle handler = TLS.handshake tlsHandle >> handle tcpHandle tlsHandle where handle tcp tls = do EX.finally (handler tls) (TLS.bye tls >> hClose tcp) return Nothing -- | Do a TCP connect using the values specified by 'LoopCmd'.
297
true
true
0
11
106
104
49
55
null
null
luke-clifton/memorable-bits
src/Data/Memorable/Theme/Words.hs
bsd-2-clause
flw8 :: Proxy FLW8 flw8 = leftSide flw9
39
flw8 :: Proxy FLW8 flw8 = leftSide flw9
39
flw8 = leftSide flw9
20
false
true
0
5
7
17
8
9
null
null
Proclivis/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSQL_FETCH_NEXT :: Int wxSQL_FETCH_NEXT = 1
44
wxSQL_FETCH_NEXT :: Int wxSQL_FETCH_NEXT = 1
44
wxSQL_FETCH_NEXT = 1
20
false
true
0
4
5
11
6
5
null
null
AlexanderPankiv/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
translateOp dflags OrIOp = Just (mo_wordOr dflags)
59
translateOp dflags OrIOp = Just (mo_wordOr dflags)
59
translateOp dflags OrIOp = Just (mo_wordOr dflags)
59
false
false
0
7
15
20
9
11
null
null
nomeata/sat-britney
ZArray.hs
gpl-2.0
sort :: Array -> Array sort v@(Array a) = if len <= 1 then v else fromList (Data.List.sort (toList v)) where len = PA.sizeofByteArray a `div` I# (sizeOf# (undefined :: Int32))
177
sort :: Array -> Array sort v@(Array a) = if len <= 1 then v else fromList (Data.List.sort (toList v)) where len = PA.sizeofByteArray a `div` I# (sizeOf# (undefined :: Int32))
177
sort v@(Array a) = if len <= 1 then v else fromList (Data.List.sort (toList v)) where len = PA.sizeofByteArray a `div` I# (sizeOf# (undefined :: Int32))
154
false
true
0
10
32
91
48
43
null
null
grnet/snf-ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pDelayOnMaster :: Field pDelayOnMaster = withDoc "on_master field for 'OpTestDelay'" . renameField "DelayOnMaster" $ defaultTrue "on_master"
146
pDelayOnMaster :: Field pDelayOnMaster = withDoc "on_master field for 'OpTestDelay'" . renameField "DelayOnMaster" $ defaultTrue "on_master"
146
pDelayOnMaster = withDoc "on_master field for 'OpTestDelay'" . renameField "DelayOnMaster" $ defaultTrue "on_master"
122
false
true
0
7
21
28
13
15
null
null
xmonad/xmonad-contrib
tests/Selective.hs
bsd-3-clause
-- selection has the form [0..l] ++ [m..n] -- relies on the Arbitrary instance for Stack Int generating stacks like [0..k] prop_select_two_consec :: Selection l -> Stack Int -> Bool prop_select_two_consec sel (stk :: Stack Int) = let wins = integrate $ select sel stk in (length . filter not . zipWith ((==) . (...
347
prop_select_two_consec :: Selection l -> Stack Int -> Bool prop_select_two_consec sel (stk :: Stack Int) = let wins = integrate $ select sel stk in (length . filter not . zipWith ((==) . (+1)) wins $ tail wins) <= 1
224
prop_select_two_consec sel (stk :: Stack Int) = let wins = integrate $ select sel stk in (length . filter not . zipWith ((==) . (+1)) wins $ tail wins) <= 1
165
true
true
0
14
69
105
53
52
null
null
karljs/blunderbot
src/BlunderLib.hs
bsd-3-clause
randomMove :: IORef Board -> IO () randomMove brdref = do brd <- readIORef brdref -- log $ "now finding move for: " ++ show (turn brd) let ms = everyMove brd if null ms then sendCheckmate else randomlyChoose brdref ms -- Getting a new generator each time is ridiculously slow
292
randomMove :: IORef Board -> IO () randomMove brdref = do brd <- readIORef brdref -- log $ "now finding move for: " ++ show (turn brd) let ms = everyMove brd if null ms then sendCheckmate else randomlyChoose brdref ms -- Getting a new generator each time is ridiculously slow
292
randomMove brdref = do brd <- readIORef brdref -- log $ "now finding move for: " ++ show (turn brd) let ms = everyMove brd if null ms then sendCheckmate else randomlyChoose brdref ms -- Getting a new generator each time is ridiculously slow
257
false
true
0
10
67
69
32
37
null
null
tjakway/ghcjvm
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
pprLit i (FloatPrimL x) = parensIf (i > noPrec && x < 0) (float (fromRational x) <> char '#')
130
pprLit i (FloatPrimL x) = parensIf (i > noPrec && x < 0) (float (fromRational x) <> char '#')
130
pprLit i (FloatPrimL x) = parensIf (i > noPrec && x < 0) (float (fromRational x) <> char '#')
130
false
false
0
10
55
56
27
29
null
null
tolysz/prepare-ghcjs
spec-lts8/base/GHC/Storable.hs
bsd-3-clause
readPtrOffPtr (Ptr a) (I# i) = IO $ \s -> case readAddrOffAddr# a i s of (# s2, x #) -> (# s2, Ptr x #)
110
readPtrOffPtr (Ptr a) (I# i) = IO $ \s -> case readAddrOffAddr# a i s of (# s2, x #) -> (# s2, Ptr x #)
110
readPtrOffPtr (Ptr a) (I# i) = IO $ \s -> case readAddrOffAddr# a i s of (# s2, x #) -> (# s2, Ptr x #)
110
false
false
0
11
32
62
31
31
null
null
jwiegley/ghc-release
utils/haddock/src/Haddock/Backends/Xhtml/Names.hs
gpl-3.0
ppIPName :: HsIPName -> Html ppIPName = toHtml . ('?':) . unpackFS . hsIPNameFS
79
ppIPName :: HsIPName -> Html ppIPName = toHtml . ('?':) . unpackFS . hsIPNameFS
79
ppIPName = toHtml . ('?':) . unpackFS . hsIPNameFS
50
false
true
2
7
13
39
18
21
null
null
alfpark/bond
compiler/src/Language/Bond/Parser.hs
mit
-- containers parser complexType :: Parser Type complexType = keyword "list" *> angles (BT_List <$> type_) <|> keyword "blob" *> pure BT_Blob <|> keyword "vector" *> angles (BT_Vector <$> type_) <|> keyword "nullable" *> angles (BT_Nullable <$> type_) <|> keyword "set" *> angles (BT_Set <$> keyT...
1,005
complexType :: Parser Type complexType = keyword "list" *> angles (BT_List <$> type_) <|> keyword "blob" *> pure BT_Blob <|> keyword "vector" *> angles (BT_Vector <$> type_) <|> keyword "nullable" *> angles (BT_Nullable <$> type_) <|> keyword "set" *> angles (BT_Set <$> keyType) <|> keyword ...
984
complexType = keyword "list" *> angles (BT_List <$> type_) <|> keyword "blob" *> pure BT_Blob <|> keyword "vector" *> angles (BT_Vector <$> type_) <|> keyword "nullable" *> angles (BT_Nullable <$> type_) <|> keyword "set" *> angles (BT_Set <$> keyType) <|> keyword "map" *> angles (BT_Map <$>...
957
true
true
24
10
250
315
155
160
null
null
phylake/avm3
vm/store.hs
mit
xform_opCode {- 0x11 -} i u d s m t (Abc.IfTrue s24) = [IfTrue s24]
67
xform_opCode {- 0x11 -} i u d s m t (Abc.IfTrue s24) = [IfTrue s24]
67
xform_opCode {- 0x11 -} i u d s m t (Abc.IfTrue s24) = [IfTrue s24]
67
false
false
0
8
14
36
18
18
null
null
hmb-ba/protocol
test/SpecFixtures.hs
mit
getMessageFixture :: Payload -> Message getMessageFixture p = Message { mgCrc = 0 , mgPayload = p }
121
getMessageFixture :: Payload -> Message getMessageFixture p = Message { mgCrc = 0 , mgPayload = p }
121
getMessageFixture p = Message { mgCrc = 0 , mgPayload = p }
81
false
true
0
7
39
36
19
17
null
null
fmthoma/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
magicDictKey :: Unique magicDictKey = mkPreludeMiscIdUnique 156
80
magicDictKey :: Unique magicDictKey = mkPreludeMiscIdUnique 156
80
magicDictKey = mkPreludeMiscIdUnique 156
57
false
true
1
5
23
17
7
10
null
null
seckcoder/lang-learn
haskell/lambda-calculus/src/Main.hs
unlicense
eval0 env (Lambda s exp) = FunVal env s exp
43
eval0 env (Lambda s exp) = FunVal env s exp
43
eval0 env (Lambda s exp) = FunVal env s exp
43
false
false
0
6
9
28
12
16
null
null
travitch/foreign-inference
src/Foreign/Inference/Analysis/Output.hs
bsd-3-clause
isAnyOut _ = False
18
isAnyOut _ = False
18
isAnyOut _ = False
18
false
false
0
5
3
9
4
5
null
null
fehu/itesm-ga
src/Parcial2/Examples/Data.hs
mit
edgesN = [ (3,0) --> (4,0) , (4,0) --> (8,0), (4,0) --> (4,1) , (4,1) --> (6,1), (6,1) --> (7,1) , (7,1) --> (8,0) ]
128
edgesN = [ (3,0) --> (4,0) , (4,0) --> (8,0), (4,0) --> (4,1) , (4,1) --> (6,1), (6,1) --> (7,1) , (7,1) --> (8,0) ]
128
edgesN = [ (3,0) --> (4,0) , (4,0) --> (8,0), (4,0) --> (4,1) , (4,1) --> (6,1), (6,1) --> (7,1) , (7,1) --> (8,0) ]
128
false
false
1
8
36
124
75
49
null
null
josefs/autosar
ARSim/arsim/AUTOSAR/ARSim.hs
bsd-3-clause
hear conn (DELTA d) (Run b t act n m s f) = Update $ Run b (t-d) act n m s f
92
hear conn (DELTA d) (Run b t act n m s f) = Update $ Run b (t-d) act n m s f
92
hear conn (DELTA d) (Run b t act n m s f) = Update $ Run b (t-d) act n m s f
92
false
false
1
8
38
67
31
36
null
null
shockkolate/etch
src/Etch/Analysis/Semantics.hs
apache-2.0
functionAnalysis :: MonadAnalysis m => Syntax.Function -> m (Typed Function) functionAnalysis (Syntax.Function (Syntax.ParamList params) expr) = do args <- traverse paramAnalysis params e <- exprAnalysis expr let paramTys = typedTy <$> args pure $ Function (ParamList args) e `As` FunctionType paramTys (...
330
functionAnalysis :: MonadAnalysis m => Syntax.Function -> m (Typed Function) functionAnalysis (Syntax.Function (Syntax.ParamList params) expr) = do args <- traverse paramAnalysis params e <- exprAnalysis expr let paramTys = typedTy <$> args pure $ Function (ParamList args) e `As` FunctionType paramTys (...
330
functionAnalysis (Syntax.Function (Syntax.ParamList params) expr) = do args <- traverse paramAnalysis params e <- exprAnalysis expr let paramTys = typedTy <$> args pure $ Function (ParamList args) e `As` FunctionType paramTys (typedTy e)
253
false
true
0
11
58
128
59
69
null
null
ThermalSpan/haskell-euler
src/BinarySearchTree.hs
bsd-3-clause
mergeL (x:xs) (y:ys) = case compare x y of LT -> x : mergeL xs (y:ys) EQ -> x : mergeL xs ys GT -> y : mergeL ys (x:xs) -- | The `search` method returns whether a given element is in a BST
298
mergeL (x:xs) (y:ys) = case compare x y of LT -> x : mergeL xs (y:ys) EQ -> x : mergeL xs ys GT -> y : mergeL ys (x:xs) -- | The `search` method returns whether a given element is in a BST
298
mergeL (x:xs) (y:ys) = case compare x y of LT -> x : mergeL xs (y:ys) EQ -> x : mergeL xs ys GT -> y : mergeL ys (x:xs) -- | The `search` method returns whether a given element is in a BST
298
false
false
0
11
153
96
47
49
null
null
kolmodin/binary-bits
BitsQC.hs
bsd-3-clause
prop_putget_applicative_with_bitreq :: (BinaryBit a, Num a, Bits a, Ord a) => W [(a,a,a)] -> Property prop_putget_applicative_with_bitreq (W ts) = property $ let p = mapM_ (\(a,b,c) -> do putBits (bitreq a) a putBits (bitreq b) b putBits (bitreq c) c) ts...
648
prop_putget_applicative_with_bitreq :: (BinaryBit a, Num a, Bits a, Ord a) => W [(a,a,a)] -> Property prop_putget_applicative_with_bitreq (W ts) = property $ let p = mapM_ (\(a,b,c) -> do putBits (bitreq a) a putBits (bitreq b) b putBits (bitreq c) c) ts...
648
prop_putget_applicative_with_bitreq (W ts) = property $ let p = mapM_ (\(a,b,c) -> do putBits (bitreq a) a putBits (bitreq b) b putBits (bitreq c) c) ts g = mapM (\(a,b,c) -> (,,) <$> getBits a <*> getBits b <*> getBits c) bitlist lbs = runPu...
546
false
true
0
17
193
281
146
135
null
null
bj4rtmar/sdl2
src/SDL/Raw/Haptic.hs
bsd-3-clause
hapticRunEffect :: MonadIO m => Haptic -> CInt -> Word32 -> m CInt hapticRunEffect v1 v2 v3 = liftIO $ hapticRunEffect' v1 v2 v3
128
hapticRunEffect :: MonadIO m => Haptic -> CInt -> Word32 -> m CInt hapticRunEffect v1 v2 v3 = liftIO $ hapticRunEffect' v1 v2 v3
128
hapticRunEffect v1 v2 v3 = liftIO $ hapticRunEffect' v1 v2 v3
61
false
true
0
9
23
51
24
27
null
null
mortberg/AlgTop
Algebra/SNF_SparseF2.hs
bsd-3-clause
fromDim (Plus x y) = fromDim x + fromDim y
42
fromDim (Plus x y) = fromDim x + fromDim y
42
fromDim (Plus x y) = fromDim x + fromDim y
42
false
false
0
7
9
27
12
15
null
null
etu-fkti5301-bgu/alt-exam_automated_theorem_proving
src/Logic.hs
bsd-3-clause
psimplify' (Or atom False') = atom
34
psimplify' (Or atom False') = atom
34
psimplify' (Or atom False') = atom
34
false
false
0
7
5
17
8
9
null
null
jamessanders/hsysadmin
src/chronos/chronos.hs
bsd-2-clause
split :: Char -> String -> [String] split delim s | [] == rest = [token] | otherwise = token : split delim (tail rest) where (token,rest) = span (/=delim) s -- | capitalize a string
194
split :: Char -> String -> [String] split delim s | [] == rest = [token] | otherwise = token : split delim (tail rest) where (token,rest) = span (/=delim) s -- | capitalize a string
194
split delim s | [] == rest = [token] | otherwise = token : split delim (tail rest) where (token,rest) = span (/=delim) s -- | capitalize a string
158
false
true
0
9
48
90
46
44
null
null
adept/hledger
hledger-lib/Hledger/Read/JournalReader.hs
gpl-3.0
tmpostingrulep :: Maybe Year -> JournalParser m TMPostingRule tmpostingrulep = fmap (uncurry TMPostingRule) . postingphelper True
129
tmpostingrulep :: Maybe Year -> JournalParser m TMPostingRule tmpostingrulep = fmap (uncurry TMPostingRule) . postingphelper True
129
tmpostingrulep = fmap (uncurry TMPostingRule) . postingphelper True
67
false
true
0
8
15
39
18
21
null
null
phischu/fragnix
tests/packages/scotty/System.FilePath.Posix.hs
bsd-3-clause
-- breakEnd (< 2) [1,2,3,4,1,2,3,4] == ([1,2,3,4,1],[2,3,4]) breakEnd :: (a -> Bool) -> [a] -> ([a], [a]) breakEnd p = spanEnd (not . p)
136
breakEnd :: (a -> Bool) -> [a] -> ([a], [a]) breakEnd p = spanEnd (not . p)
75
breakEnd p = spanEnd (not . p)
30
true
true
0
8
23
55
31
24
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/shows_2.hs
mit
primCmpInt (Pos x) (Neg y) = GT
31
primCmpInt (Pos x) (Neg y) = GT
31
primCmpInt (Pos x) (Neg y) = GT
31
false
false
0
7
6
23
11
12
null
null
forsyde/forsyde-atom
src/ForSyDe/Atom/Utility/Tuple.hs
bsd-3-clause
at33 (_,_,x) = x
26
at33 (_,_,x) = x
26
at33 (_,_,x) = x
26
false
false
0
6
13
18
10
8
null
null
reiddraper/cauterize
src/Cauterize/Dynamic/Pack.hs
bsd-3-clause
dynamicPackArray :: TyMap -> T.Text -> [CautDetails] -> Put dynamicPackArray m n elems = let t = checkedTypeLookup m n isArray "array" a = S.unArray t el = fromIntegral $ length elems al = C.arrayLen a etype = C.arrayRef a in if al /= el then throw $ IncorrectArrayLength al el ...
365
dynamicPackArray :: TyMap -> T.Text -> [CautDetails] -> Put dynamicPackArray m n elems = let t = checkedTypeLookup m n isArray "array" a = S.unArray t el = fromIntegral $ length elems al = C.arrayLen a etype = C.arrayRef a in if al /= el then throw $ IncorrectArrayLength al el ...
365
dynamicPackArray m n elems = let t = checkedTypeLookup m n isArray "array" a = S.unArray t el = fromIntegral $ length elems al = C.arrayLen a etype = C.arrayRef a in if al /= el then throw $ IncorrectArrayLength al el else mapM_ (dynamicPackDetails m etype) elems
305
false
true
0
10
98
137
66
71
null
null
olsner/ghc
compiler/main/HscTypes.hs
bsd-3-clause
-- | Get the 'DataCon' from a 'TyThing' if it is a data constructor thing. Panics otherwise tyThingDataCon :: TyThing -> DataCon tyThingDataCon (AConLike (RealDataCon dc)) = dc
176
tyThingDataCon :: TyThing -> DataCon tyThingDataCon (AConLike (RealDataCon dc)) = dc
84
tyThingDataCon (AConLike (RealDataCon dc)) = dc
47
true
true
0
8
27
35
17
18
null
null
robx/puzzle-draw
src/Data/Compose.hs
mit
handle f CoralLITSO = f R.coralLitso D.coralLitso
49
handle f CoralLITSO = f R.coralLitso D.coralLitso
49
handle f CoralLITSO = f R.coralLitso D.coralLitso
49
false
false
0
6
6
21
9
12
null
null
FranklinChen/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
pEraseType (App s f a) = App s (pEraseType f) (pEraseType a)
60
pEraseType (App s f a) = App s (pEraseType f) (pEraseType a)
60
pEraseType (App s f a) = App s (pEraseType f) (pEraseType a)
60
false
false
0
7
11
39
18
21
null
null
acowley/ghc
compiler/basicTypes/BasicTypes.hs
bsd-3-clause
-- Show needed for Lexer.x {- Note [InlinePragma] ~~~~~~~~~~~~~~~~~~~ This data type mirrors what you can write in an INLINE or NOINLINE pragma in the source program. If you write nothing at all, you get defaultInlinePragma: inl_inline = False inl_act = AlwaysActive inl_rule = FunLike It's not possible...
1,903
isConLike :: RuleMatchInfo -> Bool isConLike ConLike = True
59
isConLike ConLike = True
24
true
true
0
5
390
20
11
9
null
null
AKST/jsgen
src/Language/JSGen/IRUtil.hs
mit
jnot = JSUnaOpt Not
19
jnot = JSUnaOpt Not
19
jnot = JSUnaOpt Not
19
false
false
0
5
3
9
4
5
null
null
xnning/fcore
lib/Inliner.hs
bsd-2-clause
inliner (App e1 e2) = App (inliner e1) (inliner e2)
51
inliner (App e1 e2) = App (inliner e1) (inliner e2)
51
inliner (App e1 e2) = App (inliner e1) (inliner e2)
51
false
false
0
7
9
34
16
18
null
null
bergey/gooey
bouncing-canvas/src/Main.hs
bsd-3-clause
intersect :: State -> Edge -> (Edge, TimeDelta) intersect s e = (e, t) where t = case e of East -> (1 - x) / vx West -> -x / vx North -> (1 - y) / vy South -> -y / vy (V2 x y) = pos s (V2 vx vy) = velocity s
229
intersect :: State -> Edge -> (Edge, TimeDelta) intersect s e = (e, t) where t = case e of East -> (1 - x) / vx West -> -x / vx North -> (1 - y) / vy South -> -y / vy (V2 x y) = pos s (V2 vx vy) = velocity s
229
intersect s e = (e, t) where t = case e of East -> (1 - x) / vx West -> -x / vx North -> (1 - y) / vy South -> -y / vy (V2 x y) = pos s (V2 vx vy) = velocity s
181
false
true
0
12
77
139
72
67
null
null
GaloisInc/halvm-ghc
compiler/basicTypes/RdrName.hs
bsd-3-clause
plusParent p1 p2@(FldParent _ _) = hasParent p2 p1
50
plusParent p1 p2@(FldParent _ _) = hasParent p2 p1
50
plusParent p1 p2@(FldParent _ _) = hasParent p2 p1
50
false
false
0
8
8
27
13
14
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Instances/Reset.hs
mpl-2.0
-- | The name of the zone for this request. irZone :: Lens' InstancesReset Text irZone = lens _irZone (\ s a -> s{_irZone = a})
127
irZone :: Lens' InstancesReset Text irZone = lens _irZone (\ s a -> s{_irZone = a})
83
irZone = lens _irZone (\ s a -> s{_irZone = a})
47
true
true
0
9
25
40
22
18
null
null
batterseapower/temporary
System/IO/Temp.hs
bsd-3-clause
writeSystemTempFile :: String -- ^ File name template. -> String -- ^ Data to store in the file. -> IO FilePath -- ^ Path to the (written and closed) file. writeSystemTempFile template content = getTemporaryDirectory >>= \tmpDir -> writeTempFile tmpDir template cont...
323
writeSystemTempFile :: String -- ^ File name template. -> String -- ^ Data to store in the file. -> IO FilePath writeSystemTempFile template content = getTemporaryDirectory >>= \tmpDir -> writeTempFile tmpDir template content
279
writeSystemTempFile template content = getTemporaryDirectory >>= \tmpDir -> writeTempFile tmpDir template content
117
true
true
2
8
95
52
26
26
null
null
snoyberg/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
-- Map from evidence variables to evidence terms -- We use @DVarEnv@ here to get deterministic ordering when we -- turn it into a Bag. -- If we don't do that, when we generate let bindings for -- dictionaries in dsTcEvBinds they will be generated in random -- ...
876
emptyEvBindMap :: EvBindMap emptyEvBindMap = EvBindMap { ev_bind_varenv = emptyDVarEnv }
88
emptyEvBindMap = EvBindMap { ev_bind_varenv = emptyDVarEnv }
60
true
true
0
6
329
38
30
8
null
null
stu-smith/rendering-in-haskell
src/experiment07/Core.hs
mit
toRayPosition :: Double -> RayPosition toRayPosition = RayPosition
70
toRayPosition :: Double -> RayPosition toRayPosition = RayPosition
70
toRayPosition = RayPosition
31
false
true
0
5
11
15
8
7
null
null
YoshikuniJujo/funpaala
samples/12_syntaxes/synonym1.hs
bsd-3-clause
dist0 :: Point -> Double dist0 (x, y) = sqrt $ x ^ 2 + y ^ 2
60
dist0 :: Point -> Double dist0 (x, y) = sqrt $ x ^ 2 + y ^ 2
60
dist0 (x, y) = sqrt $ x ^ 2 + y ^ 2
35
false
true
0
8
17
40
21
19
null
null
alios/iho-s57
Main.hs
bsd-3-clause
groomRecord :: Monad m => Conduit S57Record m Text groomRecord = do v <- await case v of Just r -> do yield $ T.pack $ groom r ++ "\n" groomRecord Nothing -> return ()
190
groomRecord :: Monad m => Conduit S57Record m Text groomRecord = do v <- await case v of Just r -> do yield $ T.pack $ groom r ++ "\n" groomRecord Nothing -> return ()
190
groomRecord = do v <- await case v of Just r -> do yield $ T.pack $ groom r ++ "\n" groomRecord Nothing -> return ()
139
false
true
0
16
57
83
37
46
null
null
fatho/ninja
src/Graphics/Ninja/GL2D/Sprite.hs
mit
-- | Size of the SpriteVertex data. spriteVertexSize :: Int spriteVertexSize = sizeOf (undefined :: SpriteVertex)
113
spriteVertexSize :: Int spriteVertexSize = sizeOf (undefined :: SpriteVertex)
77
spriteVertexSize = sizeOf (undefined :: SpriteVertex)
53
true
true
0
6
15
21
12
9
null
null
jozefg/folds-common
test/L'.hs
mit
propNub :: TestTree propNub = testProperty "Nub Works" $ \l -> C.run l C.nub == nub (l :: [Int])
106
propNub :: TestTree propNub = testProperty "Nub Works" $ \l -> C.run l C.nub == nub (l :: [Int])
106
propNub = testProperty "Nub Works" $ \l -> C.run l C.nub == nub (l :: [Int])
86
false
true
0
10
28
48
25
23
null
null
sboosali/commands-spiros
config/Commands/Plugins/Spiros/Phrase/Run.hs
gpl-2.0
insertD = mungeDictation >>> insert
35
insertD = mungeDictation >>> insert
35
insertD = mungeDictation >>> insert
35
false
false
0
5
4
10
5
5
null
null
d0kt0r0/estuary
client/src/Estuary/Help/Saborts.hs
gpl-3.0
exampleText "v" = ":> v"
24
exampleText "v" = ":> v"
24
exampleText "v" = ":> v"
24
false
false
0
5
4
9
4
5
null
null
lpeterse/koka
src/Common/NamePrim.hs
apache-2.0
nameTpST = preludeName "st"
37
nameTpST = preludeName "st"
37
nameTpST = preludeName "st"
37
false
false
0
5
13
9
4
5
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/Resource/Content/Returnpolicy/Delete.hs
mpl-2.0
-- | OAuth access token. retAccessToken :: Lens' ReturnpolicyDelete (Maybe Text) retAccessToken = lens _retAccessToken (\ s a -> s{_retAccessToken = a})
160
retAccessToken :: Lens' ReturnpolicyDelete (Maybe Text) retAccessToken = lens _retAccessToken (\ s a -> s{_retAccessToken = a})
135
retAccessToken = lens _retAccessToken (\ s a -> s{_retAccessToken = a})
79
true
true
0
8
29
49
25
24
null
null
izmailoff/haskell-h99
src/H99/Q1to10.hs
mit
myButLast (x:xs) = myButLast xs
31
myButLast (x:xs) = myButLast xs
31
myButLast (x:xs) = myButLast xs
31
false
false
0
7
4
19
9
10
null
null
gridaphobe/ghc
utils/genapply/Main.hs
bsd-3-clause
argSize V = 0
15
argSize V = 0
15
argSize V = 0
15
false
false
0
5
5
9
4
5
null
null
graninas/Haskell-Algorithms
Tests/ArrowsAndFrees/ArrEff.hs
gpl-3.0
runArrEff :: Monad m => ArrEff m b c -> [b] -> m [c] runArrEff = runArrEffList []
81
runArrEff :: Monad m => ArrEff m b c -> [b] -> m [c] runArrEff = runArrEffList []
81
runArrEff = runArrEffList []
28
false
true
0
10
17
52
24
28
null
null
zakharvoit/haskell-homework
Base.hs
gpl-3.0
sinDouble = P.sin
18
sinDouble = P.sin
18
sinDouble = P.sin
18
false
false
1
6
3
12
4
8
null
null
muhbaasu/pfennig-server
src/Pfennig/NetworkHelper.hs
mit
textHTML :: MediaType textHTML = "text" // "html"
49
textHTML :: MediaType textHTML = "text" // "html"
49
textHTML = "text" // "html"
27
false
true
0
5
7
15
8
7
null
null
mikeizbicki/homoiconic
src/Homoiconic/Homogeneous/Example.hs
bsd-3-clause
logexpAST4 :: View Floating alg => AST alg a -> AST alg a logexpAST4 (AST_log (AST_exp a)) = a
94
logexpAST4 :: View Floating alg => AST alg a -> AST alg a logexpAST4 (AST_log (AST_exp a)) = a
94
logexpAST4 (AST_log (AST_exp a)) = a
36
false
true
0
8
18
53
24
29
null
null
np/hlatex
Language/LaTeX/Printer.hs
bsd-3-clause
brackets = between "[" "]"
26
brackets = between "[" "]"
26
brackets = between "[" "]"
26
false
false
1
5
4
15
5
10
null
null
sdiehl/ghc
compiler/GHC/HsToCore/PmCheck.hs
bsd-3-clause
checkGrdTree :: GrdTree -> Deltas -> DsM CheckResult checkGrdTree guards deltas = do tracePm "checkGrdTree {" $ vcat [ ppr guards , ppr deltas ] res <- checkGrdTree' guards deltas tracePm "}:" (ppr res) -- braces are easier to match by tooling return res -- -------------------...
1,574
checkGrdTree :: GrdTree -> Deltas -> DsM CheckResult checkGrdTree guards deltas = do tracePm "checkGrdTree {" $ vcat [ ppr guards , ppr deltas ] res <- checkGrdTree' guards deltas tracePm "}:" (ppr res) -- braces are easier to match by tooling return res -- -------------------...
1,574
checkGrdTree guards deltas = do tracePm "checkGrdTree {" $ vcat [ ppr guards , ppr deltas ] res <- checkGrdTree' guards deltas tracePm "}:" (ppr res) -- braces are easier to match by tooling return res -- ------------------------------------------------------------------------...
1,521
false
true
0
10
356
88
41
47
null
null
spacekitteh/smcghc
compiler/cmm/PprC.hs
bsd-3-clause
-- Print in C hex format: 0x13fa pprHexVal :: Integer -> Width -> SDoc pprHexVal 0 _ = ptext (sLit "0x0")
105
pprHexVal :: Integer -> Width -> SDoc pprHexVal 0 _ = ptext (sLit "0x0")
72
pprHexVal 0 _ = ptext (sLit "0x0")
34
true
true
0
7
20
34
17
17
null
null
green-haskell/ghc
compiler/basicTypes/OccName.hs
bsd-3-clause
isDataOcc _ = False
38
isDataOcc _ = False
38
isDataOcc _ = False
38
false
false
0
5
22
9
4
5
null
null