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
gsnewmark/cis194
src/Cis194/Week2/LogAnalysis.hs
apache-2.0
inOrder (Node l n r) = inOrder l ++ [n] ++ inOrder r
52
inOrder (Node l n r) = inOrder l ++ [n] ++ inOrder r
52
inOrder (Node l n r) = inOrder l ++ [n] ++ inOrder r
52
false
false
0
7
12
37
17
20
null
null
morae/SortNet
Visualize.hs
gpl-2.0
netToGraph (Layer{..}:net) = evalState (netToGraph' net graph >>= closure) (numInputs + numNeurons) where inpNodes = zip [0..numInputs-1] (repeat "input") fstLayer = zip [numInputs .. ] (map show actFuns) ledges = [ ( i, n+numInputs, edgeLabel n i) | i <- [0..numInputs-1], n<-[0..n...
735
netToGraph (Layer{..}:net) = evalState (netToGraph' net graph >>= closure) (numInputs + numNeurons) where inpNodes = zip [0..numInputs-1] (repeat "input") fstLayer = zip [numInputs .. ] (map show actFuns) ledges = [ ( i, n+numInputs, edgeLabel n i) | i <- [0..numInputs-1], n<-[0..n...
735
netToGraph (Layer{..}:net) = evalState (netToGraph' net graph >>= closure) (numInputs + numNeurons) where inpNodes = zip [0..numInputs-1] (repeat "input") fstLayer = zip [numInputs .. ] (map show actFuns) ledges = [ ( i, n+numInputs, edgeLabel n i) | i <- [0..numInputs-1], n<-[0..n...
735
false
false
8
13
253
306
158
148
null
null
diku-dk/futhark
src/Language/Futhark/Interpreter.hs
isc
evalDec env (OpenDec me _) = do me' <- evalModExp env me case me' of Module me'' -> return $ me'' <> env _ -> error "Expected Module"
145
evalDec env (OpenDec me _) = do me' <- evalModExp env me case me' of Module me'' -> return $ me'' <> env _ -> error "Expected Module"
145
evalDec env (OpenDec me _) = do me' <- evalModExp env me case me' of Module me'' -> return $ me'' <> env _ -> error "Expected Module"
145
false
false
0
11
39
64
29
35
null
null
utsav2601/cmpe295A
tools/flounder/LMP.hs
mit
-- Name of the destroy function lmp_destroy_fn_name n = ifscope n "lmp_destroy"
79
lmp_destroy_fn_name n = ifscope n "lmp_destroy"
47
lmp_destroy_fn_name n = ifscope n "lmp_destroy"
47
true
false
1
5
11
18
7
11
null
null
Zemyla/these
Data/These.hs
bsd-3-clause
these _ _ lr (These a x) = lr a x
33
these _ _ lr (These a x) = lr a x
33
these _ _ lr (These a x) = lr a x
33
false
false
1
7
10
28
12
16
null
null
AlexanderPankiv/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
getAmode' _ (CmmMachOp (MO_Add _) [x, CmmMachOp (MO_Add _) [CmmMachOp (MO_Shl _) [y, CmmLit (CmmInt shift _)], CmmLit (CmmInt offset _)]]) | shift == 0 || shift == 1 || shift == 2 || shift == 3 && is32BitInteger offset = x86_complex_amode x y shift ...
326
getAmode' _ (CmmMachOp (MO_Add _) [x, CmmMachOp (MO_Add _) [CmmMachOp (MO_Shl _) [y, CmmLit (CmmInt shift _)], CmmLit (CmmInt offset _)]]) | shift == 0 || shift == 1 || shift == 2 || shift == 3 && is32BitInteger offset = x86_complex_amode x y shift ...
326
getAmode' _ (CmmMachOp (MO_Add _) [x, CmmMachOp (MO_Add _) [CmmMachOp (MO_Shl _) [y, CmmLit (CmmInt shift _)], CmmLit (CmmInt offset _)]]) | shift == 0 || shift == 1 || shift == 2 || shift == 3 && is32BitInteger offset = x86_complex_amode x y shift ...
326
false
false
1
15
116
140
67
73
null
null
olsner/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
fractionalClassKey = mkPreludeClassUnique 6
48
fractionalClassKey = mkPreludeClassUnique 6
48
fractionalClassKey = mkPreludeClassUnique 6
48
false
false
0
5
8
9
4
5
null
null
ku00/aoj-haskell
src/ITP1_6_C.hs
bsd-3-clause
limitFloor = 3
17
limitFloor = 3
17
limitFloor = 3
17
false
false
1
5
5
10
3
7
null
null
plaprade/haskoin-wallet
tests/Network/Haskoin/Wallet/Units.hs
unlicense
tests :: [Test] tests = [ testGroup "KeyRing creation" [ testCase "Calling newKeyRing with an empty seed should fail" $ assertException (WalletException "The seed is empty") (newKeyRing "main" BS.empty) , testCase "Creating two KeyRings with the same name...
7,346
tests :: [Test] tests = [ testGroup "KeyRing creation" [ testCase "Calling newKeyRing with an empty seed should fail" $ assertException (WalletException "The seed is empty") (newKeyRing "main" BS.empty) , testCase "Creating two KeyRings with the same name...
7,346
tests = [ testGroup "KeyRing creation" [ testCase "Calling newKeyRing with an empty seed should fail" $ assertException (WalletException "The seed is empty") (newKeyRing "main" BS.empty) , testCase "Creating two KeyRings with the same name should fail" $ ...
7,330
false
true
0
18
2,590
1,712
801
911
null
null
pparkkin/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
floatTyConKey = mkPreludeTyConUnique 12
65
floatTyConKey = mkPreludeTyConUnique 12
65
floatTyConKey = mkPreludeTyConUnique 12
65
false
false
0
5
29
9
4
5
null
null
ucsd-progsys/nanomaly
src/NanoML/Prim.hs
bsd-3-clause
pprint_endline :: MonadEval m => Value -> m Value pprint_endline (VS _ s) = do -- opts <- ask -- when (enablePrint opts) $ -- liftIO $ putStrLn s withCurrentProv VU
174
pprint_endline :: MonadEval m => Value -> m Value pprint_endline (VS _ s) = do -- opts <- ask -- when (enablePrint opts) $ -- liftIO $ putStrLn s withCurrentProv VU
174
pprint_endline (VS _ s) = do -- opts <- ask -- when (enablePrint opts) $ -- liftIO $ putStrLn s withCurrentProv VU
124
false
true
0
10
40
50
23
27
null
null
hargettp/raft
src/Control/Consensus/Raft/Log.hs
mit
raftCurrentTerm :: (RaftLog l e v) => RaftContext l e v -> Term raftCurrentTerm raft = raftStateCurrentTerm $ raftState raft
124
raftCurrentTerm :: (RaftLog l e v) => RaftContext l e v -> Term raftCurrentTerm raft = raftStateCurrentTerm $ raftState raft
124
raftCurrentTerm raft = raftStateCurrentTerm $ raftState raft
60
false
true
0
7
19
45
22
23
null
null
bgamari/ring-buffer
src/Data/RingBuffer.hs
bsd-3-clause
-- | The maximum number of items the ring can contain capacity' :: (VGM.MVector v a, MonadIO m) => RingM m v a Int capacity' = asks VGM.length
142
capacity' :: (VGM.MVector v a, MonadIO m) => RingM m v a Int capacity' = asks VGM.length
88
capacity' = asks VGM.length
27
true
true
0
8
27
50
24
26
null
null
jean-edouard/xclibs
xch-rpc/Rpc/Dispatch.hs
lgpl-2.1
connectBus :: D.DBusContext -> IO (Dispatcher, BusName) connectBus c = do d <- newDispatcher c D.authenticateWithRealUID c forkIO $ dispatch d name <- hello d return (d, name)
197
connectBus :: D.DBusContext -> IO (Dispatcher, BusName) connectBus c = do d <- newDispatcher c D.authenticateWithRealUID c forkIO $ dispatch d name <- hello d return (d, name)
197
connectBus c = do d <- newDispatcher c D.authenticateWithRealUID c forkIO $ dispatch d name <- hello d return (d, name)
141
false
true
0
8
49
79
36
43
null
null
rleshchinskiy/vector
Data/Vector/Generic/New.hs
bsd-3-clause
tail m = apply MVector.tail m
29
tail m = apply MVector.tail m
29
tail m = apply MVector.tail m
29
false
false
0
6
5
16
7
9
null
null
unisonweb/platform
parser-typechecker/unison/System/Path.hs
mit
-- | Returns a list of nodes in a tree via a depth-first walk. mtreeList :: Monad m => (a -> m [a]) -> a -> m [a] mtreeList children root = do xs <- children root subChildren <- mapM (mtreeList children) xs return $ root : concat subChildren -- | Get a list of files in path, but not recursively. Removes '.' and ...
325
mtreeList :: Monad m => (a -> m [a]) -> a -> m [a] mtreeList children root = do xs <- children root subChildren <- mapM (mtreeList children) xs return $ root : concat subChildren -- | Get a list of files in path, but not recursively. Removes '.' and '..'.
262
mtreeList children root = do xs <- children root subChildren <- mapM (mtreeList children) xs return $ root : concat subChildren -- | Get a list of files in path, but not recursively. Removes '.' and '..'.
211
true
true
0
10
71
94
45
49
null
null
apyrgio/snf-ganeti
src/Ganeti/Errors.hs
bsd-2-clause
formatError err = "Unhandled exception: " ++ show err
55
formatError err = "Unhandled exception: " ++ show err
55
formatError err = "Unhandled exception: " ++ show err
55
false
false
0
6
10
16
7
9
null
null
nickbart1980/pandoc
src/Text/Pandoc/Pretty.hs
gpl-2.0
-- | Wraps a 'Doc' in double quotes. doubleQuotes :: Doc -> Doc doubleQuotes = inside (char '"') (char '"')
107
doubleQuotes :: Doc -> Doc doubleQuotes = inside (char '"') (char '"')
70
doubleQuotes = inside (char '"') (char '"')
43
true
true
0
7
19
33
17
16
null
null
nevrenato/Hets_Fork
OWL2/XML.hs
gpl-2.0
getLiteral :: XMLBase -> Element -> Literal getLiteral b e = case getName e of "Literal" -> let lf = strContent e mdt = findAttr (unqual "datatypeIRI") e mattr = vFindAttrBy (isSmth "lang") e in case mdt of Nothing -> case mattr of Just lang -> Literal lf $ Unt...
770
getLiteral :: XMLBase -> Element -> Literal getLiteral b e = case getName e of "Literal" -> let lf = strContent e mdt = findAttr (unqual "datatypeIRI") e mattr = vFindAttrBy (isSmth "lang") e in case mdt of Nothing -> case mattr of Just lang -> Literal lf $ Unt...
770
getLiteral b e = case getName e of "Literal" -> let lf = strContent e mdt = findAttr (unqual "datatypeIRI") e mattr = vFindAttrBy (isSmth "lang") e in case mdt of Nothing -> case mattr of Just lang -> Literal lf $ Untyped $ Just lang Nothing -> Lit...
726
false
true
4
20
301
219
107
112
null
null
573/leksah
src/IDE/Package.hs
gpl-2.0
buildPackage :: Bool -> Bool -> Bool -> IDEPackage -> (Bool -> IDEAction) -> IDEAction buildPackage backgroundBuild jumpToWarnings withoutLinking package continuation = catchIDE (do ideR <- ask prefs <- readIDE prefs maybeDebug <- readIDE debugState case maybeDebug of Nothing -> do ...
2,111
buildPackage :: Bool -> Bool -> Bool -> IDEPackage -> (Bool -> IDEAction) -> IDEAction buildPackage backgroundBuild jumpToWarnings withoutLinking package continuation = catchIDE (do ideR <- ask prefs <- readIDE prefs maybeDebug <- readIDE debugState case maybeDebug of Nothing -> do ...
2,111
buildPackage backgroundBuild jumpToWarnings withoutLinking package continuation = catchIDE (do ideR <- ask prefs <- readIDE prefs maybeDebug <- readIDE debugState case maybeDebug of Nothing -> do alreadyRunning <- isRunning if alreadyRunning then ...
2,024
false
true
0
28
922
502
230
272
null
null
msullivan/advent-of-code
2018/A21b.hs
mit
eadOut :: String -> [Int] ireadOut = readOut
46
ireadOut :: String -> [Int] ireadOut = readOut
46
ireadOut = readOut
18
false
true
0
8
9
24
11
13
null
null
scravy/nicify-lib
src/Text/Nicify.hs
mit
rSep = do char ',' spaces return XSep
49
rSep = do char ',' spaces return XSep
49
rSep = do char ',' spaces return XSep
49
false
false
1
8
19
25
8
17
null
null
ezyang/ghc
compiler/simplCore/SimplEnv.hs
bsd-3-clause
mkSimplEnv :: SimplMode -> SimplEnv mkSimplEnv mode = SimplEnv { seMode = mode , seInScope = init_in_scope , seTvSubst = emptyVarEnv , seCvSubst = emptyVarEnv , seIdSubst = emptyVarEnv }
240
mkSimplEnv :: SimplMode -> SimplEnv mkSimplEnv mode = SimplEnv { seMode = mode , seInScope = init_in_scope , seTvSubst = emptyVarEnv , seCvSubst = emptyVarEnv , seIdSubst = emptyVarEnv }
240
mkSimplEnv mode = SimplEnv { seMode = mode , seInScope = init_in_scope , seTvSubst = emptyVarEnv , seCvSubst = emptyVarEnv , seIdSubst = emptyVarEnv }
204
false
true
0
7
83
59
32
27
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxPRINTER_CANCELLED :: Int wxPRINTER_CANCELLED = 1
50
wxPRINTER_CANCELLED :: Int wxPRINTER_CANCELLED = 1
50
wxPRINTER_CANCELLED = 1
23
false
true
0
4
5
11
6
5
null
null
RyanGlScott/hermit-bluetooth
Setup.hs
bsd-3-clause
customInstall :: FilePath -> PackageDescription -> LocalBuildInfo -> UserHooks -> InstallFlags -> IO () customInstall sourceDir desc = instHook simpleUserHooks $ patchDesc sourceDir desc
186
customInstall :: FilePath -> PackageDescription -> LocalBuildInfo -> UserHooks -> InstallFlags -> IO () customInstall sourceDir desc = instHook simpleUserHooks $ patchDesc sourceDir desc
186
customInstall sourceDir desc = instHook simpleUserHooks $ patchDesc sourceDir desc
82
false
true
0
12
23
57
26
31
null
null
phischu/fragnix
builtins/base/GHC.Show.hs
bsd-3-clause
showList__ :: (a -> ShowS) -> [a] -> ShowS showList__ _ [] s = "[]" ++ s
81
showList__ :: (a -> ShowS) -> [a] -> ShowS showList__ _ [] s = "[]" ++ s
81
showList__ _ [] s = "[]" ++ s
37
false
true
2
9
25
49
23
26
null
null
fmapfmapfmap/amazonka
amazonka-dynamodb-streams/gen/Network/AWS/DynamoDBStreams/Types/Product.hs
mpl-2.0
-- | A Number data type. avN :: Lens' AttributeValue (Maybe Text) avN = lens _avN (\ s a -> s{_avN = a})
104
avN :: Lens' AttributeValue (Maybe Text) avN = lens _avN (\ s a -> s{_avN = a})
79
avN = lens _avN (\ s a -> s{_avN = a})
38
true
true
0
9
22
46
25
21
null
null
fmapfmapfmap/amazonka
gen/src/Gen/Types/Map.hs
mpl-2.0
kvInvert :: (Eq v, Hashable v) => Map k v -> Map v k kvInvert = kvTraversal %~ swap
83
kvInvert :: (Eq v, Hashable v) => Map k v -> Map v k kvInvert = kvTraversal %~ swap
83
kvInvert = kvTraversal %~ swap
30
false
true
0
7
18
44
22
22
null
null
CGenie/platform
shared/src/Unison/Type.hs
mit
existential :: Ord v => v -> Type v existential v = ABT.tm (Existential (ABT.var v))
84
existential :: Ord v => v -> Type v existential v = ABT.tm (Existential (ABT.var v))
84
existential v = ABT.tm (Existential (ABT.var v))
48
false
true
0
10
15
52
23
29
null
null
amccausl/RDF4H
testsuite/tests/Data/RDF/TriplesGraph_Test.hs
bsd-3-clause
_mkRdf :: Triples -> Maybe BaseUrl -> PrefixMappings -> TriplesGraph _mkRdf = mkRdf
83
_mkRdf :: Triples -> Maybe BaseUrl -> PrefixMappings -> TriplesGraph _mkRdf = mkRdf
83
_mkRdf = mkRdf
14
false
true
0
7
12
26
13
13
null
null
fmthoma/ghc
compiler/types/Type.hs
bsd-3-clause
tyConAppArgs :: Type -> [Type] tyConAppArgs ty = tyConAppArgs_maybe ty `orElse` pprPanic "tyConAppArgs" (ppr ty)
112
tyConAppArgs :: Type -> [Type] tyConAppArgs ty = tyConAppArgs_maybe ty `orElse` pprPanic "tyConAppArgs" (ppr ty)
112
tyConAppArgs ty = tyConAppArgs_maybe ty `orElse` pprPanic "tyConAppArgs" (ppr ty)
81
false
true
0
8
14
41
21
20
null
null
brendanhay/gogol
gogol-redis/gen/Network/Google/Resource/Redis/Projects/Locations/Instances/Upgrade.hs
mpl-2.0
-- | V1 error format. pliuXgafv :: Lens' ProjectsLocationsInstancesUpgrade (Maybe Xgafv) pliuXgafv = lens _pliuXgafv (\ s a -> s{_pliuXgafv = a})
147
pliuXgafv :: Lens' ProjectsLocationsInstancesUpgrade (Maybe Xgafv) pliuXgafv = lens _pliuXgafv (\ s a -> s{_pliuXgafv = a})
125
pliuXgafv = lens _pliuXgafv (\ s a -> s{_pliuXgafv = a})
58
true
true
0
9
23
48
25
23
null
null
bonnefoa/Shaker
src/Shaker/Action/Compile.hs
isc
-- | Run haskell compilation on all haskell files runFullCompile :: Plugin runFullCompile = applyPreprocessSources >> convertModuleDataToFullCompileInput >>= foldM runUntilFail Succeeded >> return()
204
runFullCompile :: Plugin runFullCompile = applyPreprocessSources >> convertModuleDataToFullCompileInput >>= foldM runUntilFail Succeeded >> return()
154
runFullCompile = applyPreprocessSources >> convertModuleDataToFullCompileInput >>= foldM runUntilFail Succeeded >> return()
129
true
true
6
6
28
38
18
20
null
null
aneksteind/Core
src/Core/Compiler.hs
mit
-- compiles the code for an alternative for R context compileAR :: Int -> Int -> GmCompiler compileAR d offset expr env = [Split offset] ++ compileR (offset + d) expr env
170
compileAR :: Int -> Int -> GmCompiler compileAR d offset expr env = [Split offset] ++ compileR (offset + d) expr env
116
compileAR d offset expr env = [Split offset] ++ compileR (offset + d) expr env
78
true
true
0
8
31
58
28
30
null
null
Porges/stringprep-hs
tests/Ranges.hs
bsd-3-clause
-- | Construct a 'Ranges' from a list of lower and upper bounds. ranges :: (Ord a) => [Range a] -> Ranges a ranges = Ranges . foldr (flip mergeRanges) []
153
ranges :: (Ord a) => [Range a] -> Ranges a ranges = Ranges . foldr (flip mergeRanges) []
88
ranges = Ranges . foldr (flip mergeRanges) []
45
true
true
0
8
30
51
26
25
null
null
korczis/skull-haskell
src/Lib/Playground/Playground.hs
mit
bmiCalc :: (RealFloat a) => a -> a -> a bmiCalc weight height = weight / height ** 2
84
bmiCalc :: (RealFloat a) => a -> a -> a bmiCalc weight height = weight / height ** 2
84
bmiCalc weight height = weight / height ** 2
44
false
true
0
7
18
41
21
20
null
null
cdornan/keystore
src/Data/KeyStore/Sections.hs
bsd-3-clause
sectionHelp (Just s) = do stgs <- sectionSettings $ Just s return $ T.unlines $ map T.pack $ (map f $ concat [ [ (,) (encode s) typ ] , [ (,) " p/w env var:" env ] , [ (,) " hosts:" hln ] , [ (,) " super sections:" sln ] , [ (,) " under sections:" uln ] , [ (,...
1,293
sectionHelp (Just s) = do stgs <- sectionSettings $ Just s return $ T.unlines $ map T.pack $ (map f $ concat [ [ (,) (encode s) typ ] , [ (,) " p/w env var:" env ] , [ (,) " hosts:" hln ] , [ (,) " super sections:" sln ] , [ (,) " under sections:" uln ] , [ (,...
1,293
sectionHelp (Just s) = do stgs <- sectionSettings $ Just s return $ T.unlines $ map T.pack $ (map f $ concat [ [ (,) (encode s) typ ] , [ (,) " p/w env var:" env ] , [ (,) " hosts:" hln ] , [ (,) " super sections:" sln ] , [ (,) " under sections:" uln ] , [ (,...
1,293
false
false
18
19
396
468
229
239
null
null
Mikolaj/miniutter
NLP/Miniutter/English.hs
bsd-3-clause
personVerb _ "can" = "can"
29
personVerb _ "can" = "can"
29
personVerb _ "can" = "can"
29
false
false
1
5
7
13
5
8
null
null
apyrgio/ganeti
src/Ganeti/Query/Query.hs
bsd-2-clause
getRequestedJobIDs :: Filter FilterField -> Result [JobId] getRequestedJobIDs qfilter = case requestedNames (nameField (ItemTypeLuxi QRJob)) qfilter of Nothing -> Ok [] Just [] -> Ok [] Just vals -> liftM nub $ mapM (\e -> case e of QuotedString s -> makeJobIdS s ...
1,167
getRequestedJobIDs :: Filter FilterField -> Result [JobId] getRequestedJobIDs qfilter = case requestedNames (nameField (ItemTypeLuxi QRJob)) qfilter of Nothing -> Ok [] Just [] -> Ok [] Just vals -> liftM nub $ mapM (\e -> case e of QuotedString s -> makeJobIdS s ...
1,167
getRequestedJobIDs qfilter = case requestedNames (nameField (ItemTypeLuxi QRJob)) qfilter of Nothing -> Ok [] Just [] -> Ok [] Just vals -> liftM nub $ mapM (\e -> case e of QuotedString s -> makeJobIdS s NumericValue i -> makeJobId $ fromIntegral i ...
1,108
false
true
0
16
263
155
79
76
null
null
linuborj/cubicaltt
Eval.hs
mit
app :: Val -> Val -> Val app u v = case (u,v) of (Ter (Lam x _ t) e,_) -> eval (upd (x,v) e) t (Ter (Split _ _ _ nvs) e,VCon c vs) -> case lookupBranch c nvs of Just (OBranch _ xs t) -> eval (upds (zip xs vs) e) t _ -> error $ "app: missing case in split for " ++ c (Ter (Split _ _ _ nvs)...
1,412
app :: Val -> Val -> Val app u v = case (u,v) of (Ter (Lam x _ t) e,_) -> eval (upd (x,v) e) t (Ter (Split _ _ _ nvs) e,VCon c vs) -> case lookupBranch c nvs of Just (OBranch _ xs t) -> eval (upds (zip xs vs) e) t _ -> error $ "app: missing case in split for " ++ c (Ter (Split _ _ _ nvs)...
1,412
app u v = case (u,v) of (Ter (Lam x _ t) e,_) -> eval (upd (x,v) e) t (Ter (Split _ _ _ nvs) e,VCon c vs) -> case lookupBranch c nvs of Just (OBranch _ xs t) -> eval (upds (zip xs vs) e) t _ -> error $ "app: missing case in split for " ++ c (Ter (Split _ _ _ nvs) e,VPCon c _ us phis) -> ...
1,387
false
true
0
20
540
731
365
366
null
null
rfranek/duckling
Duckling/Rules/NL.hs
bsd-3-clause
rules :: Some Dimension -> [Rule] rules (This Distance) = Distance.rules
72
rules :: Some Dimension -> [Rule] rules (This Distance) = Distance.rules
72
rules (This Distance) = Distance.rules
38
false
true
0
7
10
32
16
16
null
null
stevely/hspirv
src/SpirV/Builder/Raw.hs
bsd-3-clause
-- Id: Type of this function parameter functionParameter :: Id -> Builder Id functionParameter = twoOp OpFunctionParameter
122
functionParameter :: Id -> Builder Id functionParameter = twoOp OpFunctionParameter
83
functionParameter = twoOp OpFunctionParameter
45
true
true
0
6
16
22
11
11
null
null
cjlarose/advent-2016
src/OneTimePad.hs
bsd-3-clause
solve :: String -> IO () solve input = do let prefix = head . lines $ input let ks = keys $ allHashes prefix print . fst $ ks !! 63 let stretchedHashes = map (\x -> iterate stretchHash x !! 2016) $ allHashes prefix let stretchedKeys = keys stretchedHashes print . fst $ stretchedKeys !! 63
302
solve :: String -> IO () solve input = do let prefix = head . lines $ input let ks = keys $ allHashes prefix print . fst $ ks !! 63 let stretchedHashes = map (\x -> iterate stretchHash x !! 2016) $ allHashes prefix let stretchedKeys = keys stretchedHashes print . fst $ stretchedKeys !! 63
302
solve input = do let prefix = head . lines $ input let ks = keys $ allHashes prefix print . fst $ ks !! 63 let stretchedHashes = map (\x -> iterate stretchHash x !! 2016) $ allHashes prefix let stretchedKeys = keys stretchedHashes print . fst $ stretchedKeys !! 63
277
false
true
0
15
70
134
62
72
null
null
siddhanathan/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
byteArrayPrimTyConKey = mkPreludeTyConUnique 5
65
byteArrayPrimTyConKey = mkPreludeTyConUnique 5
65
byteArrayPrimTyConKey = mkPreludeTyConUnique 5
65
false
false
0
5
22
9
4
5
null
null
Teaspot-Studio/gore-and-ash-demo
src/client/Game/Client/Player.hs
bsd-3-clause
initialPlayer :: ClientPlayer initialPlayer = Player { playerPos = 0 , playerColor = V3 1 0 0 , playerSpeed = 0 , playerSize = 0 , playerScore = 0 , playerCustom = () }
192
initialPlayer :: ClientPlayer initialPlayer = Player { playerPos = 0 , playerColor = V3 1 0 0 , playerSpeed = 0 , playerSize = 0 , playerScore = 0 , playerCustom = () }
192
initialPlayer = Player { playerPos = 0 , playerColor = V3 1 0 0 , playerSpeed = 0 , playerSize = 0 , playerScore = 0 , playerCustom = () }
162
false
true
0
8
57
68
37
31
null
null
eryx67/api-builder
test/Network/API/Builder/SendSpec.hs
bsd-3-clause
exampleBuilder :: Builder exampleBuilder = basicBuilder "example" "https://example.com"
87
exampleBuilder :: Builder exampleBuilder = basicBuilder "example" "https://example.com"
87
exampleBuilder = basicBuilder "example" "https://example.com"
61
false
true
0
6
7
22
9
13
null
null
RossMeikleham/Tainted
examples/TransExample.hs
bsd-3-clause
g :: TaintedState Int Int g = do x <- lift get y <- hoistTainted $ Dirty 6 return $ x + y
101
g :: TaintedState Int Int g = do x <- lift get y <- hoistTainted $ Dirty 6 return $ x + y
101
g = do x <- lift get y <- hoistTainted $ Dirty 6 return $ x + y
75
false
true
1
9
34
55
23
32
null
null
rahulmutt/ghcvm
compiler/Eta/CodeGen/Rts.hs
bsd-3-clause
mkApFun :: Bool -> Int -> [FieldType] -> Text mkApFun tailCall arity fts = applyFun where applyFun | arity == 0 && null fts = if tailCall then "evaluateTail" else "evaluate" | otherwise = T.concat ["apply", applyExt, withV] where (ps, rest) = span (== "P") letters ...
1,059
mkApFun :: Bool -> Int -> [FieldType] -> Text mkApFun tailCall arity fts = applyFun where applyFun | arity == 0 && null fts = if tailCall then "evaluateTail" else "evaluate" | otherwise = T.concat ["apply", applyExt, withV] where (ps, rest) = span (== "P") letters ...
1,059
mkApFun tailCall arity fts = applyFun where applyFun | arity == 0 && null fts = if tailCall then "evaluateTail" else "evaluate" | otherwise = T.concat ["apply", applyExt, withV] where (ps, rest) = span (== "P") letters showPs | len > 0 = T...
1,013
false
true
1
11
526
317
151
166
null
null
zhangyz/llvm-slicing
src/LLVM/Slicing/Util/ValueTest.hs
apache-2.0
hasExtraReference :: Value -> Bool hasExtraReference v = case valueContent v of FunctionC f -> True InstructionC AllocaInst {} -> True GlobalVariableC _ -> True _ -> False
184
hasExtraReference :: Value -> Bool hasExtraReference v = case valueContent v of FunctionC f -> True InstructionC AllocaInst {} -> True GlobalVariableC _ -> True _ -> False
184
hasExtraReference v = case valueContent v of FunctionC f -> True InstructionC AllocaInst {} -> True GlobalVariableC _ -> True _ -> False
149
false
true
0
9
40
62
29
33
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
getPartsAllStream :: KRPCHS.SpaceCenter.Parts -> RPCContext (KRPCStream ([KRPCHS.SpaceCenter.Part])) getPartsAllStream thisArg = requestStream $ getPartsAllStreamReq thisArg
173
getPartsAllStream :: KRPCHS.SpaceCenter.Parts -> RPCContext (KRPCStream ([KRPCHS.SpaceCenter.Part])) getPartsAllStream thisArg = requestStream $ getPartsAllStreamReq thisArg
173
getPartsAllStream thisArg = requestStream $ getPartsAllStreamReq thisArg
72
false
true
0
12
13
50
25
25
null
null
ocramz/petsc-hs
examples/Test2.hs
gpl-3.0
pfTypeToStr PfConstant = "constant"
35
pfTypeToStr PfConstant = "constant"
35
pfTypeToStr PfConstant = "constant"
35
false
false
0
4
3
10
4
6
null
null
well-typed/json-sop
src/Generics/SOP/JSON.hs
bsd-3-clause
untag :: (Monad m, Functor m) => Tag -> (Value -> Partial m a) -> Value -> Partial m a untag NoTag f = f
106
untag :: (Monad m, Functor m) => Tag -> (Value -> Partial m a) -> Value -> Partial m a untag NoTag f = f
106
untag NoTag f = f
19
false
true
0
10
26
65
31
34
null
null
AlexeyRaga/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
lcmIntegerIdKey = mkPreludeMiscIdUnique 90
56
lcmIntegerIdKey = mkPreludeMiscIdUnique 90
56
lcmIntegerIdKey = mkPreludeMiscIdUnique 90
56
false
false
0
5
17
9
4
5
null
null
codecurve/FieldML-Haskell-01
test/FieldML/CoreTest.hs
bsd-2-clause
-- Todo: This belongs in the library. -- Todo: This has an problem: each corner is mapped to only one of the two edges. unitSquareXiToLocalEdgeId = Lambda xi (If (xi `ElementOf` (SimpleSubset edge1Predicate)) (LabelValue (IntegerLabel 1 localEdgeLabels)) (If (xi `ElementOf` (SimpleSubset edge2Predicate)) (Lab...
596
unitSquareXiToLocalEdgeId = Lambda xi (If (xi `ElementOf` (SimpleSubset edge1Predicate)) (LabelValue (IntegerLabel 1 localEdgeLabels)) (If (xi `ElementOf` (SimpleSubset edge2Predicate)) (LabelValue (IntegerLabel 2 localEdgeLabels)) (If (xi `ElementOf` (SimpleSubset edge3Predicate)) (LabelValue (IntegerLabel...
476
unitSquareXiToLocalEdgeId = Lambda xi (If (xi `ElementOf` (SimpleSubset edge1Predicate)) (LabelValue (IntegerLabel 1 localEdgeLabels)) (If (xi `ElementOf` (SimpleSubset edge2Predicate)) (LabelValue (IntegerLabel 2 localEdgeLabels)) (If (xi `ElementOf` (SimpleSubset edge3Predicate)) (LabelValue (IntegerLabel...
476
true
false
0
16
84
176
94
82
null
null
tolysz/prepare-ghcjs
spec-lts8/cabal/Cabal/Distribution/PackageDescription/Parse.hs
bsd-3-clause
------------------------------------------------------------------------------ mapSimpleFields :: (Field -> ParseResult Field) -> [Field] -> ParseResult [Field] mapSimpleFields f = mapM walk where walk fld@F{} = f fld walk (IfBlock l c fs1 fs2) = do fs1' <- mapM walk fs1 fs2' <- ...
626
mapSimpleFields :: (Field -> ParseResult Field) -> [Field] -> ParseResult [Field] mapSimpleFields f = mapM walk where walk fld@F{} = f fld walk (IfBlock l c fs1 fs2) = do fs1' <- mapM walk fs1 fs2' <- mapM walk fs2 return (IfBlock l c fs1' fs2') walk (Section ln n l fs1) ...
545
mapSimpleFields f = mapM walk where walk fld@F{} = f fld walk (IfBlock l c fs1 fs2) = do fs1' <- mapM walk fs1 fs2' <- mapM walk fs2 return (IfBlock l c fs1' fs2') walk (Section ln n l fs1) = do fs1' <- mapM walk fs1 return (Section ln n l fs1') -- prop_isMapM fs = mapSimpl...
447
true
true
0
9
156
181
87
94
null
null
BeautifulDestinations/fb
src/Facebook/Object/Marketing/AdCreative.hs
bsd-3-clause
product_link r = r `Rec.get` ProductLink
40
product_link r = r `Rec.get` ProductLink
40
product_link r = r `Rec.get` ProductLink
40
false
false
0
5
5
17
9
8
null
null
jmct/IterativeCompiler
frontend/Compiler.hs
mit
compileAlts :: (Int -> GMCompiler) --compiler for alternates -> [CoreAlt] --the list of alternates -> GMEnvironment --the current environment -> Int --current stack depth -> [(Int, GMCode)] --the output list of alternats sequences compi...
497
compileAlts :: (Int -> GMCompiler) --compiler for alternates -> [CoreAlt] --the list of alternates -> GMEnvironment --the current environment -> Int --current stack depth -> [(Int, GMCode)] compileAlts comp alts env d = [(tag, ...
455
compileAlts comp alts env d = [(tag, comp (length names) body (zip names [0..] ++ argOffset (length names) env) (d + (length names))) | (tag, names, body) <- alts]
182
true
true
0
13
164
146
79
67
null
null
NikolayS/postgrest
src/PostgREST/Middleware.hs
mit
runWithClaims :: forall s. AppConfig -> NominalDiffTime -> (Request -> H.Tx P.Postgres s Response) -> Request -> H.Tx P.Postgres s Response runWithClaims conf time app req = do _ <- H.unitEx $ stmt setAnon case split (== ' ') (cs auth) of ("Bearer" : tokenStr : _) -> ...
890
runWithClaims :: forall s. AppConfig -> NominalDiffTime -> (Request -> H.Tx P.Postgres s Response) -> Request -> H.Tx P.Postgres s Response runWithClaims conf time app req = do _ <- H.unitEx $ stmt setAnon case split (== ' ') (cs auth) of ("Bearer" : tokenStr : _) -> ...
890
runWithClaims conf time app req = do _ <- H.unitEx $ stmt setAnon case split (== ' ') (cs auth) of ("Bearer" : tokenStr : _) -> case jwtClaims jwtSecret tokenStr time of Just claims -> if M.member "role" claims then do mapM_ H.unitEx $ stmt <$> claim...
716
false
true
0
19
298
289
139
150
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_STYLE_DEFAULT :: Int wxSTC_STYLE_DEFAULT = 32
51
wxSTC_STYLE_DEFAULT :: Int wxSTC_STYLE_DEFAULT = 32
51
wxSTC_STYLE_DEFAULT = 32
24
false
true
0
6
5
18
7
11
null
null
kadena-io/pact
src/Pact/Types/Typecheck.hs
bsd-3-clause
toplevelInfo TopConst{_tlInfo} = _tlInfo
40
toplevelInfo TopConst{_tlInfo} = _tlInfo
40
toplevelInfo TopConst{_tlInfo} = _tlInfo
40
false
false
1
6
3
21
8
13
null
null
geocurnoff/nikki
src/Base/Configuration/Controls.hs
lgpl-3.0
isTextFieldConfirmation k = isKey Return k || isKey Enter k
59
isTextFieldConfirmation k = isKey Return k || isKey Enter k
59
isTextFieldConfirmation k = isKey Return k || isKey Enter k
59
false
false
0
6
9
23
10
13
null
null
greydot/persistent
persistent-template/Database/Persist/TH.hs
mit
-- This type is generated from the Quasi-Quoter. -- Adding this special case avoids users needing to import Data.Int ftToType (FTTypeCon (Just "Data.Int") "Int64") = ConT ''Int64
178
ftToType (FTTypeCon (Just "Data.Int") "Int64") = ConT ''Int64
61
ftToType (FTTypeCon (Just "Data.Int") "Int64") = ConT ''Int64
61
true
false
0
9
26
30
15
15
null
null
dsj36/dropray
src/Core/Primitive.hs
gpl-3.0
intersect :: Aggregate -> Ray -> Maybe Intersection intersect = undefined
73
intersect :: Aggregate -> Ray -> Maybe Intersection intersect = undefined
73
intersect = undefined
21
false
true
0
8
10
28
12
16
null
null
reiddraper/cauterize
src/Cauterize/Dynamic/Gen.hs
bsd-3-clause
dynamicGenUnion :: TyMap -> C.TUnion -> Gen CautDetails dynamicGenUnion m (C.TUnion { C.unionFields = C.Fields { C.unFields = fs } }) = do f <- elements fs (n, d) <- genField m f return CDUnion { cdUnionFieldName = n, cdUnionFieldDetails = d }
249
dynamicGenUnion :: TyMap -> C.TUnion -> Gen CautDetails dynamicGenUnion m (C.TUnion { C.unionFields = C.Fields { C.unFields = fs } }) = do f <- elements fs (n, d) <- genField m f return CDUnion { cdUnionFieldName = n, cdUnionFieldDetails = d }
249
dynamicGenUnion m (C.TUnion { C.unionFields = C.Fields { C.unFields = fs } }) = do f <- elements fs (n, d) <- genField m f return CDUnion { cdUnionFieldName = n, cdUnionFieldDetails = d }
193
false
true
4
10
48
105
53
52
null
null
tjakway/ghcjvm
compiler/utils/UniqFM.hs
bsd-3-clause
isNullUFM (UFM m) = M.null m
28
isNullUFM (UFM m) = M.null m
28
isNullUFM (UFM m) = M.null m
28
false
false
0
6
5
21
9
12
null
null
hce/avwx
src/Data/Aviation/WX.hs
mit
wxParser :: (Monad f, CharParsing f) => f WeatherPhenomenon wxParser = do spaces intsy <- intensityParser dsc <- perhaps descParser prc <- perhaps precipitationParser obfs <- perhaps obfuscationParser othr <- perhaps otherParser when ( (== 0) . Prelude.length . Prelude.filter not $ [...
458
wxParser :: (Monad f, CharParsing f) => f WeatherPhenomenon wxParser = do spaces intsy <- intensityParser dsc <- perhaps descParser prc <- perhaps precipitationParser obfs <- perhaps obfuscationParser othr <- perhaps otherParser when ( (== 0) . Prelude.length . Prelude.filter not $ [...
458
wxParser = do spaces intsy <- intensityParser dsc <- perhaps descParser prc <- perhaps precipitationParser obfs <- perhaps obfuscationParser othr <- perhaps otherParser when ( (== 0) . Prelude.length . Prelude.filter not $ [ isNothing dsc, isNothing prc , isNothing obfs, isNo...
398
false
true
0
13
112
160
74
86
null
null
edsko/hackage-server
Distribution/Server/Util/ParseSpecVer.hs
bsd-3-clause
-- | List of cabal-version values contained in Hackage's package index as of 2017-07 knownVers :: [Version] knownVers = map mkVersion [ [0,2] , [1,0] , [1,1] , [1,1,3] , [1,1,4] , [1,1,6] , [1,2,0,0] , [1,2,0] , [1,2,1] , [1,2,2] , [1,2,3,0] , [1,2,3,1] , [1,2,3] ...
1,231
knownVers :: [Version] knownVers = map mkVersion [ [0,2] , [1,0] , [1,1] , [1,1,3] , [1,1,4] , [1,1,6] , [1,2,0,0] , [1,2,0] , [1,2,1] , [1,2,2] , [1,2,3,0] , [1,2,3,1] , [1,2,3] , [1,2,3] , [1,2,4] , [1,2] , [1,2] , [1,3] , [1,4,0,0] , ...
1,146
knownVers = map mkVersion [ [0,2] , [1,0] , [1,1] , [1,1,3] , [1,1,4] , [1,1,6] , [1,2,0,0] , [1,2,0] , [1,2,1] , [1,2,2] , [1,2,3,0] , [1,2,3,1] , [1,2,3] , [1,2,3] , [1,2,4] , [1,2] , [1,2] , [1,3] , [1,4,0,0] , [1,4,0] , [1,4] ...
1,123
true
true
0
6
502
894
593
301
null
null
pparkkin/eta
compiler/ETA/Prelude/TysPrim.hs
bsd-3-clause
smallMutableArrayPrimTyCon = pcPrimTyCon smallMutableArrayPrimTyConName [Nominal, Representational] (ObjectRep stgArray)
120
smallMutableArrayPrimTyCon = pcPrimTyCon smallMutableArrayPrimTyConName [Nominal, Representational] (ObjectRep stgArray)
120
smallMutableArrayPrimTyCon = pcPrimTyCon smallMutableArrayPrimTyConName [Nominal, Representational] (ObjectRep stgArray)
120
false
false
0
7
7
25
13
12
null
null
mettekou/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
ppr_expr (HsArrForm op _ args) = hang (text "(|" <+> ppr_lexpr op) 4 (sep (map (pprCmdArg.unLoc) args) <+> text "|)")
128
ppr_expr (HsArrForm op _ args) = hang (text "(|" <+> ppr_lexpr op) 4 (sep (map (pprCmdArg.unLoc) args) <+> text "|)")
128
ppr_expr (HsArrForm op _ args) = hang (text "(|" <+> ppr_lexpr op) 4 (sep (map (pprCmdArg.unLoc) args) <+> text "|)")
128
false
false
0
11
30
68
31
37
null
null
tpsinnem/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reifyTyDecl :: Term -> ElabD RTyDecl reifyTyDecl (App _ (App _ (App _ (P (DCon _ _ _) n _) tyN) args) ret) | n == tacN "Declare" = do tyN' <- reifyTTName tyN args' <- case unList args of Nothing -> fail $ "Couldn't reify " ++ show args ++ " as an arglist." Just xs -> mapM reify...
396
reifyTyDecl :: Term -> ElabD RTyDecl reifyTyDecl (App _ (App _ (App _ (P (DCon _ _ _) n _) tyN) args) ret) | n == tacN "Declare" = do tyN' <- reifyTTName tyN args' <- case unList args of Nothing -> fail $ "Couldn't reify " ++ show args ++ " as an arglist." Just xs -> mapM reify...
396
reifyTyDecl (App _ (App _ (App _ (P (DCon _ _ _) n _) tyN) args) ret) | n == tacN "Declare" = do tyN' <- reifyTTName tyN args' <- case unList args of Nothing -> fail $ "Couldn't reify " ++ show args ++ " as an arglist." Just xs -> mapM reifyRFunArg xs ret' <- reifyRaw ret...
359
false
true
0
15
123
167
76
91
null
null
z0w0/helm
src/Helm/Graphics2D/Transform.hs
mit
translation :: V2 Double -> Transform translation (V2 x y) = Transform $ V3 (V3 1 0 x) (V3 0 1 y) (V3 0 0 1)
108
translation :: V2 Double -> Transform translation (V2 x y) = Transform $ V3 (V3 1 0 x) (V3 0 1 y) (V3 0 0 1)
108
translation (V2 x y) = Transform $ V3 (V3 1 0 x) (V3 0 1 y) (V3 0 0 1)
70
false
true
0
8
25
70
34
36
null
null
nsmryan/Misc
misc/Main.hs
bsd-3-clause
ps = 25
7
ps = 25
7
ps = 25
7
false
false
1
5
2
10
3
7
null
null
rvion/ride
jetpack-gen/src/Gen/Iface.hs
bsd-3-clause
-- data G = G1 Int -- pattern JsG1 <- G1 -- mkG1 = G1 allexports :: (String, Modules) -> IO [String] allexports (mod, modules) = defaultErrorHandler defaultFatalMessager defaultFlushOut $ runGhc (Just libdir) $ do dflags <- getSessionDynFlags pkgs <- setSessionDynFlags dflags sess <- getSes...
552
allexports :: (String, Modules) -> IO [String] allexports (mod, modules) = defaultErrorHandler defaultFatalMessager defaultFlushOut $ runGhc (Just libdir) $ do dflags <- getSessionDynFlags pkgs <- setSessionDynFlags dflags sess <- getSession iface <- getIface (modules Map.! mod) ...
497
allexports (mod, modules) = defaultErrorHandler defaultFatalMessager defaultFlushOut $ runGhc (Just libdir) $ do dflags <- getSessionDynFlags pkgs <- setSessionDynFlags dflags sess <- getSession iface <- getIface (modules Map.! mod) let toS x = showSDoc dflags (ppr x) ...
450
true
true
0
16
143
162
77
85
null
null
nickbart1980/pandoc
src/Text/Pandoc/Writers/ConTeXt.hs
gpl-2.0
inlineToConTeXt (Superscript lst) = do contents <- inlineListToConTeXt lst return $ "\\high" <> braces contents
115
inlineToConTeXt (Superscript lst) = do contents <- inlineListToConTeXt lst return $ "\\high" <> braces contents
115
inlineToConTeXt (Superscript lst) = do contents <- inlineListToConTeXt lst return $ "\\high" <> braces contents
115
false
false
0
8
18
40
17
23
null
null
prowdsponsor/country-codes
src/Data/CountryCodes/ISO31661.hs
bsd-3-clause
fromMName "Zambia" = Just ZM
28
fromMName "Zambia" = Just ZM
28
fromMName "Zambia" = Just ZM
28
false
false
0
5
4
12
5
7
null
null
CGenie/haskell-snake
src/Game/HSnake/Graphics.hs
gpl-3.0
screenHeight :: Int screenHeight = 480
39
screenHeight :: Int screenHeight = 480
39
screenHeight = 480
19
false
true
0
4
6
11
6
5
null
null
muralikrishna8/Haskell-problems
list-utils.hs
gpl-3.0
descList x = case x of [] -> "Empty List" (_:[]) -> "With one element" xs -> "with more than one element"
151
descList x = case x of [] -> "Empty List" (_:[]) -> "With one element" xs -> "with more than one element"
151
descList x = case x of [] -> "Empty List" (_:[]) -> "With one element" xs -> "with more than one element"
151
false
false
1
10
67
46
21
25
null
null
bvdelft/paragon
src/Language/Java/Paragon/NameResolution/Resolvers/Expressions.hs
bsd-3-clause
rnExp (NameExp name) = do n <- rnName name return $ NameExp n
87
rnExp (NameExp name) = do n <- rnName name return $ NameExp n
87
rnExp (NameExp name) = do n <- rnName name return $ NameExp n
87
false
false
0
8
38
35
15
20
null
null
sdiehl/ghc
compiler/deSugar/DsArrows.hs
bsd-3-clause
dsCmdStmt ids local_vars out_ids (RecStmt { recS_stmts = stmts , recS_later_ids = later_ids, recS_rec_ids = rec_ids , recS_ext = RecStmtTc { recS_later_rets = later_rets , recS_rec_rets = rec_rets } }) env_ids = do let ...
1,983
dsCmdStmt ids local_vars out_ids (RecStmt { recS_stmts = stmts , recS_later_ids = later_ids, recS_rec_ids = rec_ids , recS_ext = RecStmtTc { recS_later_rets = later_rets , recS_rec_rets = rec_rets } }) env_ids = do let ...
1,983
dsCmdStmt ids local_vars out_ids (RecStmt { recS_stmts = stmts , recS_later_ids = later_ids, recS_rec_ids = rec_ids , recS_ext = RecStmtTc { recS_later_rets = later_rets , recS_rec_rets = rec_rets } }) env_ids = do let ...
1,983
false
false
1
15
639
374
187
187
null
null
Fornost461/drafts-and-stuff
Haskell/samples/List.hs
cc0-1.0
insertAt i new xs | i > 0 = begin ++ new ++ end
47
insertAt i new xs | i > 0 = begin ++ new ++ end
47
insertAt i new xs | i > 0 = begin ++ new ++ end
47
false
false
0
8
13
31
14
17
null
null
kmels/hledger
hledger-lib/Hledger/Read.hs
gpl-3.0
-- | Read a journal from this string, trying whatever readers seem appropriate: -- -- - if a format is specified, try that reader only -- -- - or if one or more readers recognises the file path and data, try those -- -- - otherwise, try them all. -- -- A CSV conversion rules file may also be specified for use by the CS...
1,644
readJournal :: Maybe StorageFormat -> Maybe FilePath -> Bool -> Maybe FilePath -> String -> IO (Either String Journal) readJournal format rulesfile assrt path s = tryReaders $ readersFor (format, path, s) where -- try each reader in turn, returning the error of the first if all fail tryReaders :: [Reader] -...
1,217
readJournal format rulesfile assrt path s = tryReaders $ readersFor (format, path, s) where -- try each reader in turn, returning the error of the first if all fail tryReaders :: [Reader] -> IO (Either String Journal) tryReaders = firstSuccessOrBestError [] where firstSuccessOrBestError ::...
1,098
true
true
3
13
421
368
177
191
null
null
sleexyz/haskell-fun
RowPoly.hs
bsd-3-clause
extract :: (sym --> a) -> a extract (_ :-> x) = x
49
extract :: (sym --> a) -> a extract (_ :-> x) = x
49
extract (_ :-> x) = x
21
false
true
0
7
12
32
17
15
null
null
benjaminselfridge/logix
src/Calculus.hs
bsd-3-clause
instFormulaPat formBindings _ (PredPat p) = lookup p formBindings
65
instFormulaPat formBindings _ (PredPat p) = lookup p formBindings
65
instFormulaPat formBindings _ (PredPat p) = lookup p formBindings
65
false
false
0
7
8
24
11
13
null
null
green-haskell/ghc
compiler/stgSyn/StgSyn.hs
bsd-3-clause
isAddrRep PtrRep = True
24
isAddrRep PtrRep = True
24
isAddrRep PtrRep = True
24
false
false
0
5
4
9
4
5
null
null
google/haskell-indexer
haskell-indexer-backend-ghc/src/Language/Haskell/Indexer/Backend/Ghc.hs
apache-2.0
makeInstanceMethodTick :: ExtractCtx -> Located Name -> Tick makeInstanceMethodTick ctx (L l classMethod) = Tick -- Reuse name from classMethod, but use the outer location and the current -- module otherwise. { tickSourcePath = Just $ ecSourcePath ctx , tickPkgModule = extractModuleName ctx (ecModule ct...
480
makeInstanceMethodTick :: ExtractCtx -> Located Name -> Tick makeInstanceMethodTick ctx (L l classMethod) = Tick -- Reuse name from classMethod, but use the outer location and the current -- module otherwise. { tickSourcePath = Just $ ecSourcePath ctx , tickPkgModule = extractModuleName ctx (ecModule ct...
480
makeInstanceMethodTick ctx (L l classMethod) = Tick -- Reuse name from classMethod, but use the outer location and the current -- module otherwise. { tickSourcePath = Just $ ecSourcePath ctx , tickPkgModule = extractModuleName ctx (ecModule ctx) , tickThing = nameOccurenceText classMethod , tick...
419
false
true
0
10
101
111
59
52
null
null
danieldk/lbfgs-hs
sample/sample.hs
apache-2.0
progress :: a -> StorableArray Int CDouble -> StorableArray Int CDouble -> CDouble -> CDouble -> CDouble -> CDouble -> CInt -> CInt -> CInt -> IO (CInt) progress _ x _ fx _ _ _ _ k _ = do x0 <- readArray x 0 putStr $ "Iteration " ++ show(k) ++ " :\n" putStr $ "fx = " ++ show(fx) ++ ", x[0]...
357
progress :: a -> StorableArray Int CDouble -> StorableArray Int CDouble -> CDouble -> CDouble -> CDouble -> CDouble -> CInt -> CInt -> CInt -> IO (CInt) progress _ x _ fx _ _ _ _ k _ = do x0 <- readArray x 0 putStr $ "Iteration " ++ show(k) ++ " :\n" putStr $ "fx = " ++ show(fx) ++ ", x[0]...
357
progress _ x _ fx _ _ _ _ k _ = do x0 <- readArray x 0 putStr $ "Iteration " ++ show(k) ++ " :\n" putStr $ "fx = " ++ show(fx) ++ ", x[0] = " ++ show(x0) ++ "\n\n" return 0
180
false
true
0
16
104
162
77
85
null
null
bacher09/darkplaces-demo
src/DarkPlaces/Binary.hs
gpl-2.0
getQVector :: ProtocolVersion -> Get QVector getQVector p = consQVector <$> cords <*> cords <*> cords where cords = getCoord p
132
getQVector :: ProtocolVersion -> Get QVector getQVector p = consQVector <$> cords <*> cords <*> cords where cords = getCoord p
132
getQVector p = consQVector <$> cords <*> cords <*> cords where cords = getCoord p
87
false
true
6
7
26
56
24
32
null
null
acowley/ghc
ghc/Main.hs
bsd-3-clause
isCompManagerMode (DoEval _) = True
38
isCompManagerMode (DoEval _) = True
38
isCompManagerMode (DoEval _) = True
38
false
false
0
7
7
15
7
8
null
null
MichaelBurge/haskell-authorize-net
test/Test/Network/AuthorizeNet/Api.hs
bsd-3-clause
authorizeNetTests :: TestTree authorizeNetTests = testGroup "Authorize.NET tests" [ requestTests, responseTests, testCase "stripBom" test_stripBom, testCase "sanitizeError_duplicateRecords" test_sanitizeDuplicateRecords ]
231
authorizeNetTests :: TestTree authorizeNetTests = testGroup "Authorize.NET tests" [ requestTests, responseTests, testCase "stripBom" test_stripBom, testCase "sanitizeError_duplicateRecords" test_sanitizeDuplicateRecords ]
231
authorizeNetTests = testGroup "Authorize.NET tests" [ requestTests, responseTests, testCase "stripBom" test_stripBom, testCase "sanitizeError_duplicateRecords" test_sanitizeDuplicateRecords ]
201
false
true
0
7
27
38
20
18
null
null
diku-dk/futhark
src/Futhark/Optimise/Fusion/Composing.hs
isc
filterOutParams :: [(VName, Ident)] -> M.Map Ident SOAC.Input -> [Ident] filterOutParams out1 outins = snd $ mapAccumL checkUsed outUsage out1 where outUsage = M.foldlWithKey' add M.empty outins where add m p inp = case SOAC.isVarInput inp of Just v -> M.insertWith (++)...
474
filterOutParams :: [(VName, Ident)] -> M.Map Ident SOAC.Input -> [Ident] filterOutParams out1 outins = snd $ mapAccumL checkUsed outUsage out1 where outUsage = M.foldlWithKey' add M.empty outins where add m p inp = case SOAC.isVarInput inp of Just v -> M.insertWith (++)...
474
filterOutParams out1 outins = snd $ mapAccumL checkUsed outUsage out1 where outUsage = M.foldlWithKey' add M.empty outins where add m p inp = case SOAC.isVarInput inp of Just v -> M.insertWith (++) v [p] m Nothing -> m checkUsed m (a, ra) = case M.looku...
395
false
true
1
12
160
203
102
101
null
null
haskoin/haskoin
src/Haskoin/Util.hs
unlicense
eitherToMaybe :: Either a b -> Maybe b eitherToMaybe (Right b) = Just b
71
eitherToMaybe :: Either a b -> Maybe b eitherToMaybe (Right b) = Just b
71
eitherToMaybe (Right b) = Just b
32
false
true
0
7
13
35
16
19
null
null
GaloisInc/halvm-ghc
compiler/main/DriverPipeline.hs
bsd-3-clause
maybeMergeStub :: CompPipeline Phase maybeMergeStub = do PipeState{maybe_stub_o} <- getPipeState if isJust maybe_stub_o then return MergeStub else return StopLn
171
maybeMergeStub :: CompPipeline Phase maybeMergeStub = do PipeState{maybe_stub_o} <- getPipeState if isJust maybe_stub_o then return MergeStub else return StopLn
171
maybeMergeStub = do PipeState{maybe_stub_o} <- getPipeState if isJust maybe_stub_o then return MergeStub else return StopLn
134
false
true
0
9
29
49
22
27
null
null
Lykos/Sara
tests/Sara/TestUtils/AstTestUtils.hs
gpl-3.0
testfile :: String testfile = "<testfile>"
42
testfile :: String testfile = "<testfile>"
42
testfile = "<testfile>"
23
false
true
0
4
5
11
6
5
null
null
mfpi/OpenGL
Graphics/Rendering/OpenGL/GL/Evaluators.hs
bsd-3-clause
evalPoint2 :: (GLint, GLint) -> IO () evalPoint2 = uncurry glEvalPoint2
71
evalPoint2 :: (GLint, GLint) -> IO () evalPoint2 = uncurry glEvalPoint2
71
evalPoint2 = uncurry glEvalPoint2
33
false
true
0
7
10
29
15
14
null
null
rrnewton/stack
src/Stack/Package.hs
bsd-3-clause
packageIdentifier :: Package -> Stack.Types.PackageIdentifier.PackageIdentifier packageIdentifier pkg = Stack.Types.PackageIdentifier.PackageIdentifier (packageName pkg) (packageVersion pkg)
210
packageIdentifier :: Package -> Stack.Types.PackageIdentifier.PackageIdentifier packageIdentifier pkg = Stack.Types.PackageIdentifier.PackageIdentifier (packageName pkg) (packageVersion pkg)
210
packageIdentifier pkg = Stack.Types.PackageIdentifier.PackageIdentifier (packageName pkg) (packageVersion pkg)
130
false
true
0
6
32
44
23
21
null
null
brendanhay/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/Tokens/Get.hs
mpl-2.0
-- | The Client ID of the application the token is issued to. tgClientId :: Lens' TokensGet Text tgClientId = lens _tgClientId (\ s a -> s{_tgClientId = a})
158
tgClientId :: Lens' TokensGet Text tgClientId = lens _tgClientId (\ s a -> s{_tgClientId = a})
96
tgClientId = lens _tgClientId (\ s a -> s{_tgClientId = a})
61
true
true
1
9
30
46
22
24
null
null
adamsmasher/EMA
Pass2.hs
gpl-3.0
byteSize (CmdLine ".byte" args) = fromIntegral $ length args
60
byteSize (CmdLine ".byte" args) = fromIntegral $ length args
60
byteSize (CmdLine ".byte" args) = fromIntegral $ length args
60
false
false
0
7
8
24
11
13
null
null
chemist/series-storage
src/Store.hs
bsd-3-clause
testBase :: Config -> IO (Bool, Bool) testBase conf = (,) <$> testdir (home conf) <*> testdir (home conf </> fromString (unDBName $ base conf))
143
testBase :: Config -> IO (Bool, Bool) testBase conf = (,) <$> testdir (home conf) <*> testdir (home conf </> fromString (unDBName $ base conf))
143
testBase conf = (,) <$> testdir (home conf) <*> testdir (home conf </> fromString (unDBName $ base conf))
105
false
true
0
12
24
73
36
37
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Layout/LayoutCombinators.hs
bsd-2-clause
(***|****) = combineTwo (Tall 1 0.1 (3/7))
42
(***|****) = combineTwo (Tall 1 0.1 (3/7))
42
(***|****) = combineTwo (Tall 1 0.1 (3/7))
42
false
false
0
9
6
28
15
13
null
null
maciej-bendkowski/blaz
src/CommonUtils.hs
mit
geq [] k = False
16
geq [] k = False
16
geq [] k = False
16
false
false
0
6
4
13
6
7
null
null