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
romanb/amazonka
amazonka-emr/gen/Network/AWS/EMR/Types.hs
mpl-2.0
-- | The name of the cluster step. ssName :: Lens' StepSummary (Maybe Text) ssName = lens _ssName (\s a -> s { _ssName = a })
125
ssName :: Lens' StepSummary (Maybe Text) ssName = lens _ssName (\s a -> s { _ssName = a })
90
ssName = lens _ssName (\s a -> s { _ssName = a })
49
true
true
0
9
26
46
25
21
null
null
stu-smith/rendering-in-haskell
src/experiment08/Light.hs
mit
green :: Light green = Light 0.0 1.0 0.0
44
green :: Light green = Light 0.0 1.0 0.0
44
green = Light 0.0 1.0 0.0
29
false
true
0
5
12
18
9
9
null
null
minib00m/jpp
src/Evaluator.hs
mit
funFromMem :: ReturnValue -> FunDef funFromMem (MFun f) = f
59
funFromMem :: ReturnValue -> FunDef funFromMem (MFun f) = f
59
funFromMem (MFun f) = f
23
false
true
0
9
9
30
13
17
null
null
silkapp/tagsoup
Text/HTML/TagSoup/Implementation.hs
bsd-3-clause
isEntityHex (_,EntityHex{}:_) = True
36
isEntityHex (_,EntityHex{}:_) = True
36
isEntityHex (_,EntityHex{}:_) = True
36
false
false
0
8
3
23
12
11
null
null
rsasse/tamarin-prover
src/Main/TheoryLoader.hs
gpl-3.0
dhIntruderVariantsFile :: FilePath dhIntruderVariantsFile = "data/intruder_variants_dh.spthy"
93
dhIntruderVariantsFile :: FilePath dhIntruderVariantsFile = "data/intruder_variants_dh.spthy"
93
dhIntruderVariantsFile = "data/intruder_variants_dh.spthy"
58
false
true
0
4
5
11
6
5
null
null
olsner/ghc
compiler/main/ErrUtils.hs
bsd-3-clause
-- | a wrapper around 'dumpSDoc'. -- First check whether the dump flag is set -- Do nothing if it is unset dumpIfSet_dyn :: DynFlags -> DumpFlag -> String -> SDoc -> IO () dumpIfSet_dyn dflags flag hdr doc = when (dopt flag dflags) $ dumpSDoc dflags alwaysQualify flag hdr doc
278
dumpIfSet_dyn :: DynFlags -> DumpFlag -> String -> SDoc -> IO () dumpIfSet_dyn dflags flag hdr doc = when (dopt flag dflags) $ dumpSDoc dflags alwaysQualify flag hdr doc
171
dumpIfSet_dyn dflags flag hdr doc = when (dopt flag dflags) $ dumpSDoc dflags alwaysQualify flag hdr doc
106
true
true
0
10
52
70
35
35
null
null
weissi/diplomarbeit
lib/Data/Helpers.hs
gpl-3.0
takeOneConduit :: MonadResource m => C.Conduit i m i takeOneConduit = do mX <- CL.head C.yield $ fromJust mX -- | Run an "application" by connecting to the specified server. -- Does TCP_NOWAIT -- -- (stolen from streaming-commons-0.1.9.1)
250
takeOneConduit :: MonadResource m => C.Conduit i m i takeOneConduit = do mX <- CL.head C.yield $ fromJust mX -- | Run an "application" by connecting to the specified server. -- Does TCP_NOWAIT -- -- (stolen from streaming-commons-0.1.9.1)
250
takeOneConduit = do mX <- CL.head C.yield $ fromJust mX -- | Run an "application" by connecting to the specified server. -- Does TCP_NOWAIT -- -- (stolen from streaming-commons-0.1.9.1)
197
false
true
0
8
49
52
26
26
null
null
pnf/pray-for-rain
Pray/Main.hs
mit
getConfig :: [String] -> IO Config getConfig args = do zips <- readZips wuApiKey <- readFile "WUAPI" tConf <- readFile "TWILIO" let _:tAcct:tApiKey:_ = lines tConf tAgent <- T.twilioAgent let phoneNumber:maxIterS:periodS:_ = args return $ Config zips wuApiKey tAcct tApiKey tAgent phoneNumber (read maxIter...
337
getConfig :: [String] -> IO Config getConfig args = do zips <- readZips wuApiKey <- readFile "WUAPI" tConf <- readFile "TWILIO" let _:tAcct:tApiKey:_ = lines tConf tAgent <- T.twilioAgent let phoneNumber:maxIterS:periodS:_ = args return $ Config zips wuApiKey tAcct tApiKey tAgent phoneNumber (read maxIter...
337
getConfig args = do zips <- readZips wuApiKey <- readFile "WUAPI" tConf <- readFile "TWILIO" let _:tAcct:tApiKey:_ = lines tConf tAgent <- T.twilioAgent let phoneNumber:maxIterS:periodS:_ = args return $ Config zips wuApiKey tAcct tApiKey tAgent phoneNumber (read maxIterS) (read periodS)
302
false
true
0
12
59
143
65
78
null
null
haskell-infra/hackage-server
Distribution/Server/Packages/Unpack.hs
bsd-3-clause
checkEntries :: (Tar.Entry -> Maybe e) -> Tar.Entries e -> Tar.Entries e checkEntries checkEntry = Tar.foldEntries (\entry rest -> maybe (Tar.Next entry rest) Tar.Fail (checkEntry entry)) Tar.Done Tar.Fail
265
checkEntries :: (Tar.Entry -> Maybe e) -> Tar.Entries e -> Tar.Entries e checkEntries checkEntry = Tar.foldEntries (\entry rest -> maybe (Tar.Next entry rest) Tar.Fail (checkEntry entry)) Tar.Done Tar.Fail
265
checkEntries checkEntry = Tar.foldEntries (\entry rest -> maybe (Tar.Next entry rest) Tar.Fail (checkEntry entry)) Tar.Done Tar.Fail
192
false
true
0
11
87
92
45
47
null
null
SwiftsNamesake/Copernicus
Hieroglyphs.hs
mit
-- TODO: Make transformation less ad-hoc --------------------------------------------------------------------------------------------------- -- Entry point --------------------------------------------------------------------------------------------------- main :: IO () main = mainGTK
287
main :: IO () main = mainGTK
28
main = mainGTK
14
true
true
0
6
20
20
12
8
null
null
lynnard/cocos2d-hs
src/Graphics/UI/Cocos2d/Event.hs
bsd-3-clause
eventListener_isEnabled :: (EventListenerValue arg'1) => arg'1 -> HoppyP.IO HoppyP.Bool eventListener_isEnabled arg'1 = withEventListenerPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' -> HoppyP.fmap (/= 0) (eventListener_isEnabled' arg'1')
252
eventListener_isEnabled :: (EventListenerValue arg'1) => arg'1 -> HoppyP.IO HoppyP.Bool eventListener_isEnabled arg'1 = withEventListenerPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' -> HoppyP.fmap (/= 0) (eventListener_isEnabled' arg'1')
252
eventListener_isEnabled arg'1 = withEventListenerPtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' -> HoppyP.fmap (/= 0) (eventListener_isEnabled' arg'1')
164
false
true
0
8
30
75
37
38
null
null
skatenerd/poker
test/Spec.hs
bsd-3-clause
tests = TestList [ test_fullhouse_beats_pair, test_make_onehigh, test_make_pair, test_make_triple, test_make_twopair, test_make_straight, test_make_flush, test_make_full_house, test_make_straight_flush, test_full_hous_fi...
425
tests = TestList [ test_fullhouse_beats_pair, test_make_onehigh, test_make_pair, test_make_triple, test_make_twopair, test_make_straight, test_make_flush, test_make_full_house, test_make_straight_flush, test_full_hous_fi...
425
tests = TestList [ test_fullhouse_beats_pair, test_make_onehigh, test_make_pair, test_make_triple, test_make_twopair, test_make_straight, test_make_flush, test_make_full_house, test_make_straight_flush, test_full_hous_fi...
425
false
false
1
5
144
48
28
20
null
null
PepeLui17/Proyecto_Lenguajes_De_Programacion_Segundo_Parcial
TestInternal.hs
gpl-2.0
runTests :: IO () runTests = do qc "Eq" (eqProperty :: HeapT Int Char -> HeapT Int Char -> HeapT Int Char -> Bool) qc "Ord" (ordProperty :: HeapT Int Char -> HeapT Int Char -> HeapT Int Char -> Bool) qc "leftist heap" (leftistHeapProperty :: HeapT Int Char -> Bool) qc "read/show" (readShowProperty :: [H...
1,195
runTests :: IO () runTests = do qc "Eq" (eqProperty :: HeapT Int Char -> HeapT Int Char -> HeapT Int Char -> Bool) qc "Ord" (ordProperty :: HeapT Int Char -> HeapT Int Char -> HeapT Int Char -> Bool) qc "leftist heap" (leftistHeapProperty :: HeapT Int Char -> Bool) qc "read/show" (readShowProperty :: [H...
1,195
runTests = do qc "Eq" (eqProperty :: HeapT Int Char -> HeapT Int Char -> HeapT Int Char -> Bool) qc "Ord" (ordProperty :: HeapT Int Char -> HeapT Int Char -> HeapT Int Char -> Bool) qc "leftist heap" (leftistHeapProperty :: HeapT Int Char -> Bool) qc "read/show" (readShowProperty :: [HeapT Int Char] -> ...
1,177
false
true
0
12
263
471
223
248
null
null
dkensinger/haskell
haskellbook/fibs.hs
gpl-3.0
fibsN' :: [Integer] fibsN' = 0 : 1 : zipWith (+) fibsN' (tail fibsN')
69
fibsN' :: [Integer] fibsN' = 0 : 1 : zipWith (+) fibsN' (tail fibsN')
69
fibsN' = 0 : 1 : zipWith (+) fibsN' (tail fibsN')
49
false
true
4
7
13
45
21
24
null
null
ekmett/hmpfr
src/Data/Number/MPFR/Mutable/Special.hs
bsd-3-clause
cosh :: MMPFR s -> MMPFR s -> RoundMode -> ST s Int cosh = withMutableMPFRS mpfr_cosh
85
cosh :: MMPFR s -> MMPFR s -> RoundMode -> ST s Int cosh = withMutableMPFRS mpfr_cosh
85
cosh = withMutableMPFRS mpfr_cosh
33
false
true
0
8
16
37
17
20
null
null
nicklawls/haskellbook
src/Data/Ini.hs
bsd-3-clause
parseAssignment :: Parser (Name, Value) parseAssignment = do name <- some letter _ <- char '=' val <- some (noneOf "\n") skipEOL return (name, val)
157
parseAssignment :: Parser (Name, Value) parseAssignment = do name <- some letter _ <- char '=' val <- some (noneOf "\n") skipEOL return (name, val)
157
parseAssignment = do name <- some letter _ <- char '=' val <- some (noneOf "\n") skipEOL return (name, val)
117
false
true
0
10
34
71
33
38
null
null
bsl/GLFW-b
Graphics/UI/GLFW.hs
bsd-2-clause
windowHint (WindowHint'CocoaFrameName x) = setStringHint c'GLFW_COCOA_FRAME_NAME x
84
windowHint (WindowHint'CocoaFrameName x) = setStringHint c'GLFW_COCOA_FRAME_NAME x
84
windowHint (WindowHint'CocoaFrameName x) = setStringHint c'GLFW_COCOA_FRAME_NAME x
84
false
false
0
7
8
20
9
11
null
null
kim/amazonka
amazonka-sqs/gen/Network/AWS/SQS/GetQueueUrl.hs
mpl-2.0
-- | The name of the queue whose URL must be fetched. Maximum 80 characters; -- alphanumeric characters, hyphens (-), and underscores (_) are allowed. gquQueueName :: Lens' GetQueueUrl Text gquQueueName = lens _gquQueueName (\s a -> s { _gquQueueName = a })
257
gquQueueName :: Lens' GetQueueUrl Text gquQueueName = lens _gquQueueName (\s a -> s { _gquQueueName = a })
106
gquQueueName = lens _gquQueueName (\s a -> s { _gquQueueName = a })
67
true
true
0
9
42
48
24
24
null
null
ghcjs/ghcjs
src/Gen2/DynamicLinking.hs
mit
ghcjsLinkJsBinary :: GhcjsEnv -> GhcjsSettings -> [FilePath] -> DynFlags -> [FilePath] -> [InstalledUnitId] -> IO () ghcjsLinkJsBinary env settings jsFiles dflags objs dep_pkgs = void $ variantLink gen2Variant ...
624
ghcjsLinkJsBinary :: GhcjsEnv -> GhcjsSettings -> [FilePath] -> DynFlags -> [FilePath] -> [InstalledUnitId] -> IO () ghcjsLinkJsBinary env settings jsFiles dflags objs dep_pkgs = void $ variantLink gen2Variant ...
624
ghcjsLinkJsBinary env settings jsFiles dflags objs dep_pkgs = void $ variantLink gen2Variant dflags env settings exe [] dep_pkgs objs' jsFiles isRoot S.empty where objs' = map ObjFile objs isRoot _ = True exe = Utils.exeFileName dflags packageLibPaths :: InstalledUnitId -> [FilePat...
399
false
true
2
12
216
156
78
78
null
null
CulpaBS/wbBach
src/Futhark/Representation/Kernels/Kernel.hs
bsd-3-clause
kernelType :: Kernel lore -> [Type] kernelType (MapKernel _ _ _ is _ returns _) = [ rearrangeType perm (arrayOfShape t outer_shape) | (t, perm) <- returns ] where outer_shape = Shape $ map snd is
201
kernelType :: Kernel lore -> [Type] kernelType (MapKernel _ _ _ is _ returns _) = [ rearrangeType perm (arrayOfShape t outer_shape) | (t, perm) <- returns ] where outer_shape = Shape $ map snd is
201
kernelType (MapKernel _ _ _ is _ returns _) = [ rearrangeType perm (arrayOfShape t outer_shape) | (t, perm) <- returns ] where outer_shape = Shape $ map snd is
165
false
true
0
8
41
89
45
44
null
null
ttuegel/emacs2nix
src/Distribution/Nix/Fetch.hs
gpl-3.0
fetchExpr :: Fetch -> NExpr fetchExpr (URL {..}) = ((@@) (mkSym "fetchurl") . mkNonRecSet . catMaybes) [ Just ("url" `bindTo` mkStr url) , bindTo "sha256" . mkStr <$> sha256 , bindTo "name" . mkStr <$> name ]
300
fetchExpr :: Fetch -> NExpr fetchExpr (URL {..}) = ((@@) (mkSym "fetchurl") . mkNonRecSet . catMaybes) [ Just ("url" `bindTo` mkStr url) , bindTo "sha256" . mkStr <$> sha256 , bindTo "name" . mkStr <$> name ]
300
fetchExpr (URL {..}) = ((@@) (mkSym "fetchurl") . mkNonRecSet . catMaybes) [ Just ("url" `bindTo` mkStr url) , bindTo "sha256" . mkStr <$> sha256 , bindTo "name" . mkStr <$> name ]
272
false
true
0
11
128
98
51
47
null
null
pikajude/yesod
yesod/Yesod/Default/Util.hs
mit
widgetFileNoReload :: WidgetFileSettings -> FilePath -> Q Exp widgetFileNoReload wfs x = combine "widgetFileNoReload" x False $ wfsLanguages wfs $ wfsHamletSettings wfs
168
widgetFileNoReload :: WidgetFileSettings -> FilePath -> Q Exp widgetFileNoReload wfs x = combine "widgetFileNoReload" x False $ wfsLanguages wfs $ wfsHamletSettings wfs
168
widgetFileNoReload wfs x = combine "widgetFileNoReload" x False $ wfsLanguages wfs $ wfsHamletSettings wfs
106
false
true
0
7
21
48
22
26
null
null
dysinger/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DescribeSpotPriceHistory.hs
mpl-2.0
-- | The number of rows to return. dsphMaxResults :: Lens' DescribeSpotPriceHistory (Maybe Int) dsphMaxResults = lens _dsphMaxResults (\s a -> s { _dsphMaxResults = a })
169
dsphMaxResults :: Lens' DescribeSpotPriceHistory (Maybe Int) dsphMaxResults = lens _dsphMaxResults (\s a -> s { _dsphMaxResults = a })
134
dsphMaxResults = lens _dsphMaxResults (\s a -> s { _dsphMaxResults = a })
73
true
true
0
9
26
46
25
21
null
null
spechub/Hets
Temporal/ModalCasl.hs
gpl-2.0
showPathFormula (BPast phi psi) True = showPathFormula phi False ++ " ~B " ++ showPathFormula psi False
104
showPathFormula (BPast phi psi) True = showPathFormula phi False ++ " ~B " ++ showPathFormula psi False
104
showPathFormula (BPast phi psi) True = showPathFormula phi False ++ " ~B " ++ showPathFormula psi False
104
false
false
0
7
17
37
17
20
null
null
spechub/Hets
Proofs/EdgeUtils.hs
gpl-2.0
getEdgeId :: LEdge DGLinkLab -> EdgeId getEdgeId (_, _, label) = dgl_id label
77
getEdgeId :: LEdge DGLinkLab -> EdgeId getEdgeId (_, _, label) = dgl_id label
77
getEdgeId (_, _, label) = dgl_id label
38
false
true
0
6
12
33
17
16
null
null
alexvong1995/pandoc
src/Text/Pandoc/Readers/Org.hs
gpl-2.0
commentLine :: OrgParser Blocks commentLine = try $ commentLineStart *> anyLine *> pure mempty
94
commentLine :: OrgParser Blocks commentLine = try $ commentLineStart *> anyLine *> pure mempty
94
commentLine = try $ commentLineStart *> anyLine *> pure mempty
62
false
true
0
7
13
29
14
15
null
null
Icelandjack/lens
src/Control/Lens/Lens.hs
bsd-3-clause
------------------------------------------------------------------------------- -- Common Lenses ------------------------------------------------------------------------------- -- | Lift a 'Lens' so it can run under a function (or other corepresentable profunctor). -- -- @ -- 'inside' :: 'Lens' s t a b -> 'Lens' (e ->...
732
inside :: Corepresentable p => ALens s t a b -> Lens (p e s) (p e t) (p e a) (p e b) inside l f es = o <$> f i where i = cotabulate $ \ e -> ipos $ l sell (cosieve es e) o ea = cotabulate $ \ e -> ipeek (cosieve ea e) $ l sell (cosieve es e)
246
inside l f es = o <$> f i where i = cotabulate $ \ e -> ipos $ l sell (cosieve es e) o ea = cotabulate $ \ e -> ipeek (cosieve ea e) $ l sell (cosieve es e)
161
true
true
0
12
149
183
96
87
null
null
zhenyavinogradov/ml-labs
src/Lab7/Main.hs
gpl-3.0
readLabels :: B.ByteString -> [Label] readLabels b = read' (B.drop headerSize b) where headerSize = 8 read' bs = map (fromIntegral . toInteger) $ B.unpack bs
167
readLabels :: B.ByteString -> [Label] readLabels b = read' (B.drop headerSize b) where headerSize = 8 read' bs = map (fromIntegral . toInteger) $ B.unpack bs
167
readLabels b = read' (B.drop headerSize b) where headerSize = 8 read' bs = map (fromIntegral . toInteger) $ B.unpack bs
129
false
true
1
8
35
71
35
36
null
null
rodrigogribeiro/mptc
test/Data/TestCase1TcExp.hs
bsd-3-clause
rname = Ident "Person"
22
rname = Ident "Person"
22
rname = Ident "Person"
22
false
false
0
5
3
9
4
5
null
null
ExNexu/Idris-dev
src/IRTS/Compiler.hs
bsd-3-clause
doForeign vs env xs = ifail "Badly formed foreign function call"
64
doForeign vs env xs = ifail "Badly formed foreign function call"
64
doForeign vs env xs = ifail "Badly formed foreign function call"
64
false
false
0
5
10
16
7
9
null
null
shlevy/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
chooseOrphanAnchor :: NameSet -> IsOrphan -- Something (rule, instance) is relate to all the Names in this -- list. Choose one of them to be an "anchor" for the orphan. We make -- the choice deterministic to avoid gratuitious changes in the ABI -- hash (Trac #4012). Specifically, use lexicographic comparison of -- Oc...
688
chooseOrphanAnchor :: NameSet -> IsOrphan chooseOrphanAnchor local_names | isEmptyNameSet local_names = IsOrphan | otherwise = NotOrphan (minimum occs) where occs = map nameOccName $ nonDetEltsUniqSet local_names -- It's OK to use nonDetEltsUFM here, see comments above
300
chooseOrphanAnchor local_names | isEmptyNameSet local_names = IsOrphan | otherwise = NotOrphan (minimum occs) where occs = map nameOccName $ nonDetEltsUniqSet local_names -- It's OK to use nonDetEltsUFM here, see comments above
258
true
true
1
8
133
70
37
33
null
null
hvr/jhc
regress/tests/1_typecheck/4_fail/ghc/FrozenErrorTests.hs
mit
goo4 :: forall a c. G a Char ~ T2 (T2 c c) c => a -> a goo4 = undefined
72
goo4 :: forall a c. G a Char ~ T2 (T2 c c) c => a -> a goo4 = undefined
71
goo4 = undefined
16
false
true
0
12
21
55
25
30
null
null
glguy/CookieCalculator
src/Math.hs
isc
log1p :: Double -> Double log1p = realToFrac . c_log1p . realToFrac
67
log1p :: Double -> Double log1p = realToFrac . c_log1p . realToFrac
67
log1p = realToFrac . c_log1p . realToFrac
41
false
true
0
6
11
23
12
11
null
null
caioariede/tpll
src/Tpll/Context.hs
mit
-- | Function used by template tags to resolve values passed as arguments. -- -- Examples: -- -- >>> let ctx' = ctx [] -- >>> let Just (CStr False r) = resolveCtx ctx' "\"foo\"" -- >>> r -- "foo" -- -- >>> let ctx' = ctx [] -- >>> let Nothing = resolveCtx ctx' "foo" -- -- >>> let ctx' = ctx [("foo", cInt 42)] -- >>> le...
1,151
resolveCtx :: Context -> String -> Maybe ContextValue resolveCtx ctx' str = case head str of '"' -> Just (CStr False (tail $ take (length str - 1) str)) other -> if isDigit other then resolveCtxNumber ctx' str else lookup str ctx' ...
770
resolveCtx ctx' str = case head str of '"' -> Just (CStr False (tail $ take (length str - 1) str)) other -> if isDigit other then resolveCtxNumber ctx' str else lookup str ctx' -- | Resolve context number value -- -- Examples: -- ...
716
true
true
0
16
310
141
86
55
null
null
alphalambda/codeworld
codeworld-compiler/src/CodeWorld/Compile/Stages.hs
apache-2.0
checkFunctionParentheses :: MonadCompile m => m () checkFunctionParentheses = getMainParsedCode >>= \parsed -> case parsed of Parsed mod -> addDiagnostics $ dedupErrorSpans (everything (++) (mkQ [] badExpApps) mod) ++ everything (++) (mkQ [] badMatchApps) mod ++ everything (++) (...
403
checkFunctionParentheses :: MonadCompile m => m () checkFunctionParentheses = getMainParsedCode >>= \parsed -> case parsed of Parsed mod -> addDiagnostics $ dedupErrorSpans (everything (++) (mkQ [] badExpApps) mod) ++ everything (++) (mkQ [] badMatchApps) mod ++ everything (++) (...
403
checkFunctionParentheses = getMainParsedCode >>= \parsed -> case parsed of Parsed mod -> addDiagnostics $ dedupErrorSpans (everything (++) (mkQ [] badExpApps) mod) ++ everything (++) (mkQ [] badMatchApps) mod ++ everything (++) (mkQ [] badPatternApps) mod _ -> return () -- Fa...
352
false
true
0
18
97
132
67
65
null
null
XinhuaZhang/PetaVisionHaskell
PetaVision/Data/KMeans.hs
gpl-3.0
computeAssignmentP :: ClusterCenter -> [V.Vector (VU.Vector Double)] -> [Assignment] computeAssignmentP = parMap rdeepseq . computeAssignment
179
computeAssignmentP :: ClusterCenter -> [V.Vector (VU.Vector Double)] -> [Assignment] computeAssignmentP = parMap rdeepseq . computeAssignment
179
computeAssignmentP = parMap rdeepseq . computeAssignment
56
false
true
0
11
52
45
23
22
null
null
phaazon/quaazar
src/Quaazar/Scene/Transform.hs
bsd-3-clause
-- |Uniform scale. uniScale :: Float -> Transform -> Transform uniScale s = scale $ Scale s s s
95
uniScale :: Float -> Transform -> Transform uniScale s = scale $ Scale s s s
76
uniScale s = scale $ Scale s s s
32
true
true
2
8
18
40
18
22
null
null
skywind3000/language
haskell/fib3.hs
mit
fibNthPair n = fibNextPair(fibNthPair(n - 1))
45
fibNthPair n = fibNextPair(fibNthPair(n - 1))
45
fibNthPair n = fibNextPair(fibNthPair(n - 1))
45
false
false
1
9
5
28
12
16
null
null
kyren/hsgb
spec/Gameboy/InstructionSpec.hs
unlicense
checkInverses :: [Word8] -> Bool checkInverses bs = case decodeInstructions bs of Nothing -> True Just is -> encodeInstructions is == bs
146
checkInverses :: [Word8] -> Bool checkInverses bs = case decodeInstructions bs of Nothing -> True Just is -> encodeInstructions is == bs
146
checkInverses bs = case decodeInstructions bs of Nothing -> True Just is -> encodeInstructions is == bs
113
false
true
0
9
31
50
24
26
null
null
rzil/honours
LeavittPathAlgebras/Example6.hs
mit
vertex = atom 1 . WLPA.vertex
29
vertex = atom 1 . WLPA.vertex
29
vertex = atom 1 . WLPA.vertex
29
false
false
0
6
5
15
7
8
null
null
drhodes/jade2hdl
test/TestMiddle.hs
bsd-3-clause
testSkeleton :: String -> (J Bool) -> IO TestState testSkeleton modname func = do Right topl <- Decode.decodeTopLevel (format "./test-data/{0}.json" [modname]) case runJ topl func of Right True -> return Pass Right False -> return . Fail $ runLog topl func Left msg -> return . Fail $ msg ++ runLog topl ...
395
testSkeleton :: String -> (J Bool) -> IO TestState testSkeleton modname func = do Right topl <- Decode.decodeTopLevel (format "./test-data/{0}.json" [modname]) case runJ topl func of Right True -> return Pass Right False -> return . Fail $ runLog topl func Left msg -> return . Fail $ msg ++ runLog topl ...
395
testSkeleton modname func = do Right topl <- Decode.decodeTopLevel (format "./test-data/{0}.json" [modname]) case runJ topl func of Right True -> return Pass Right False -> return . Fail $ runLog topl func Left msg -> return . Fail $ msg ++ runLog topl func -- todo, keep or trash these tests? they don'...
344
false
true
0
13
82
137
62
75
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxEQUIV :: Int wxEQUIV = 10
27
wxEQUIV :: Int wxEQUIV = 10
27
wxEQUIV = 10
12
false
true
0
6
5
18
7
11
null
null
bjornbm/astro
src/Astro/Time.hs
bsd-3-clause
convergenceEpochTAI :: Fractional a => E TAI a convergenceEpochTAI = clock 1977 01 01 00 00 00.000 TAI
102
convergenceEpochTAI :: Fractional a => E TAI a convergenceEpochTAI = clock 1977 01 01 00 00 00.000 TAI
102
convergenceEpochTAI = clock 1977 01 01 00 00 00.000 TAI
55
false
true
0
6
17
38
18
20
null
null
tendril/avro
src/Data/Avro/Core.hs
bsd-3-clause
-- | Serialize an Avro Value. Uses @defaultWritePolicy@. putAvro :: Avro -> Put putAvro = writeAvro defaultWritePolicy
118
putAvro :: Avro -> Put putAvro = writeAvro defaultWritePolicy
61
putAvro = writeAvro defaultWritePolicy
38
true
true
0
5
16
19
10
9
null
null
sdiehl/ghc
compiler/GHC/CmmToC.hs
bsd-3-clause
floatComparison (MO_F_Lt _) = True
36
floatComparison (MO_F_Lt _) = True
36
floatComparison (MO_F_Lt _) = True
36
false
false
0
7
6
15
7
8
null
null
osa1/StrictCore
src/StrictCore/Syntax.hs
bsd-3-clause
pprArg e = pprExpr parens e
29
pprArg e = pprExpr parens e
29
pprArg e = pprExpr parens e
29
false
false
1
5
7
19
6
13
null
null
rfranek/duckling
Duckling/Dimensions.hs
bsd-3-clause
langDimensions MY = MYDimensions.allDimensions
46
langDimensions MY = MYDimensions.allDimensions
46
langDimensions MY = MYDimensions.allDimensions
46
false
false
0
5
3
11
5
6
null
null
wangbj/excises
Bin2Text/src/ADT.hs
bsd-3-clause
run :: AppState -> App a -> IO (Either String a) run config app = bracket ( return () ) (\_ -> return () ) (\_ -> runExceptT (runReaderT (runApp app) config))
166
run :: AppState -> App a -> IO (Either String a) run config app = bracket ( return () ) (\_ -> return () ) (\_ -> runExceptT (runReaderT (runApp app) config))
166
run config app = bracket ( return () ) (\_ -> return () ) (\_ -> runExceptT (runReaderT (runApp app) config))
117
false
true
0
12
39
98
46
52
null
null
phadej/generics-sop
src/Generics/SOP/TH.hs
bsd-3-clause
embedding :: Name -> [Con] -> Q Dec embedding fromName = funD fromName . go (\e -> [| Z $e |]) where go :: (Q Exp -> Q Exp) -> [Con] -> [Q Clause] go _ [] = [] go br (c:cs) = mkClause br c : go (\e -> [| S $(br e) |]) cs mkClause :: (Q Exp -> Q Exp) -> Con -> Q Clause mkClause br c = do ...
532
embedding :: Name -> [Con] -> Q Dec embedding fromName = funD fromName . go (\e -> [| Z $e |]) where go :: (Q Exp -> Q Exp) -> [Con] -> [Q Clause] go _ [] = [] go br (c:cs) = mkClause br c : go (\e -> [| S $(br e) |]) cs mkClause :: (Q Exp -> Q Exp) -> Con -> Q Clause mkClause br c = do ...
532
embedding fromName = funD fromName . go (\e -> [| Z $e |]) where go :: (Q Exp -> Q Exp) -> [Con] -> [Q Clause] go _ [] = [] go br (c:cs) = mkClause br c : go (\e -> [| S $(br e) |]) cs mkClause :: (Q Exp -> Q Exp) -> Con -> Q Clause mkClause br c = do (n, ts) <- conInfo c vars ...
496
false
true
8
8
182
250
132
118
null
null
liyang/thyme
src/Data/Thyme/LocalTime.hs
bsd-3-clause
utcLocalTime :: TimeZone -> Iso' UTCTime LocalTime utcLocalTime TimeZone {..} = utcTime . iso localise globalise where {-# INLINEABLE localise #-} localise :: UTCView -> LocalTime localise (UTCView day dt) = LocalTime (day .+^ dd) tod where (dd, tod) = addMinutes timeZoneMinutes (dt ^. timeOfDay) ...
608
utcLocalTime :: TimeZone -> Iso' UTCTime LocalTime utcLocalTime TimeZone {..} = utcTime . iso localise globalise where {-# INLINEABLE localise #-} localise :: UTCView -> LocalTime localise (UTCView day dt) = LocalTime (day .+^ dd) tod where (dd, tod) = addMinutes timeZoneMinutes (dt ^. timeOfDay) ...
608
utcLocalTime TimeZone {..} = utcTime . iso localise globalise where {-# INLINEABLE localise #-} localise :: UTCView -> LocalTime localise (UTCView day dt) = LocalTime (day .+^ dd) tod where (dd, tod) = addMinutes timeZoneMinutes (dt ^. timeOfDay) {-# INLINEABLE globalise #-} globalise :: L...
557
false
true
11
7
136
172
92
80
null
null
uuhan/Idris-dev
src/Idris/Core/Typecheck.hs
bsd-3-clause
isHole _ = False
16
isHole _ = False
16
isHole _ = False
16
false
false
0
4
3
10
4
6
null
null
BeautifulDestinations/fb
src/Facebook/Object/Marketing/AdAccount.hs
bsd-3-clause
unAge_ :: Age_ -> Float unAge_ (Age_ x) = x
43
unAge_ :: Age_ -> Float unAge_ (Age_ x) = x
43
unAge_ (Age_ x) = x
19
false
true
0
9
9
30
13
17
null
null
RossMeikleham/GPC
src/GPC/Interpreter.hs
bsd-2-clause
genExpr :: Expr -> GenState SymbolTree genExpr e = do expr <- reduceExpr e case expr of ExpBinOp binOp lExpr rExpr -> genBinExpr binOp lExpr rExpr ExpUnaryOp unOp expr' -> genUnaryExpr unOp expr' ExpFunCall f -> genFunCall f False ExpMethodCall m -> genMethodCall m False ...
433
genExpr :: Expr -> GenState SymbolTree genExpr e = do expr <- reduceExpr e case expr of ExpBinOp binOp lExpr rExpr -> genBinExpr binOp lExpr rExpr ExpUnaryOp unOp expr' -> genUnaryExpr unOp expr' ExpFunCall f -> genFunCall f False ExpMethodCall m -> genMethodCall m False ...
433
genExpr e = do expr <- reduceExpr e case expr of ExpBinOp binOp lExpr rExpr -> genBinExpr binOp lExpr rExpr ExpUnaryOp unOp expr' -> genUnaryExpr unOp expr' ExpFunCall f -> genFunCall f False ExpMethodCall m -> genMethodCall m False ExpIdent ident -> genIdentExpr ...
394
false
true
0
13
125
142
63
79
null
null
Drezil/hgraph
src/DCB_acc.hs
agpl-3.0
-- addablePoints yields all valid addititons to a Graph addablePoints :: Acc Adj -> Acc Graph-> Acc (Vector Int8) addablePoints a g = undefined
143
addablePoints :: Acc Adj -> Acc Graph-> Acc (Vector Int8) addablePoints a g = undefined
87
addablePoints a g = undefined
29
true
true
0
9
23
45
20
25
null
null
dblia/nosql-ganeti
src/Ganeti/Query/Node.hs
gpl-2.0
-- | Map each name to a function that extracts that value from -- the RPC result. nodeLiveFieldExtract :: FieldName -> RpcResultNodeInfo -> J.JSValue nodeLiveFieldExtract "bootid" res = J.showJSON $ rpcResNodeInfoBootId res
225
nodeLiveFieldExtract :: FieldName -> RpcResultNodeInfo -> J.JSValue nodeLiveFieldExtract "bootid" res = J.showJSON $ rpcResNodeInfoBootId res
143
nodeLiveFieldExtract "bootid" res = J.showJSON $ rpcResNodeInfoBootId res
75
true
true
0
7
33
37
19
18
null
null
rahulmutt/ghcvm
compiler/Eta/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp WriteJCharArrayOp = _ILIT(1121)
44
tagOf_PrimOp WriteJCharArrayOp = _ILIT(1121)
44
tagOf_PrimOp WriteJCharArrayOp = _ILIT(1121)
44
false
false
0
6
3
15
7
8
null
null
scottgw/eiffel-typecheck
Language/Eiffel/TypeCheck/Context.hs
bsd-3-clause
currentPos :: TypingBodyExpr body expr SourcePos currentPos = pos <$> ask
73
currentPos :: TypingBodyExpr body expr SourcePos currentPos = pos <$> ask
73
currentPos = pos <$> ask
24
false
true
0
5
10
22
11
11
null
null
bgaster/idris-java
src/IRTS/Java/JTypes.hs
bsd-3-clause
box (PrimType ShortT ) = RefType . ClassRefType $ ClassType [(Ident "Short", [])]
81
box (PrimType ShortT ) = RefType . ClassRefType $ ClassType [(Ident "Short", [])]
81
box (PrimType ShortT ) = RefType . ClassRefType $ ClassType [(Ident "Short", [])]
81
false
false
0
9
12
41
20
21
null
null
OpenXT/manager
xenmgr/Vm/Monitor.hs
gpl-2.0
remWatches :: [VmWatch] -> Rpc () remWatches ws = liftIO $ mapM_ killVmWatch ws
79
remWatches :: [VmWatch] -> Rpc () remWatches ws = liftIO $ mapM_ killVmWatch ws
79
remWatches ws = liftIO $ mapM_ killVmWatch ws
45
false
true
0
8
13
39
18
21
null
null
Elastifile/git-sling
server/src/Sling.hs
gpl-2.0
withLocalBranch :: Git.BranchName -> EShell a -> EShell a withLocalBranch name act = do let branch = Git.LocalBranch name currentRef <- Git.currentRef Git.deleteBranch branch & ignoreError shouldCreate <- notElem name <$> Git.localBranches when shouldCreate $ void $ Git.createLocalBranch name Git.Re...
531
withLocalBranch :: Git.BranchName -> EShell a -> EShell a withLocalBranch name act = do let branch = Git.LocalBranch name currentRef <- Git.currentRef Git.deleteBranch branch & ignoreError shouldCreate <- notElem name <$> Git.localBranches when shouldCreate $ void $ Git.createLocalBranch name Git.Re...
531
withLocalBranch name act = do let branch = Git.LocalBranch name currentRef <- Git.currentRef Git.deleteBranch branch & ignoreError shouldCreate <- notElem name <$> Git.localBranches when shouldCreate $ void $ Git.createLocalBranch name Git.RefHead Git.checkout (Git.RefBranch branch) let clea...
473
false
true
0
14
117
178
80
98
null
null
peterbecich/haskell-programming-first-principles
src/Chapter17.hs
bsd-3-clause
flatMap func lx = concat' $ fmap func lx
40
flatMap func lx = concat' $ fmap func lx
40
flatMap func lx = concat' $ fmap func lx
40
false
false
3
5
8
27
9
18
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Healthcare/Types/Product.hs
mpl-2.0
-- | Creates a value of 'Hl7V2Store' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'hvsNotificationConfigs' -- -- * 'hvsRejectDuplicateMessage' -- -- * 'hvsName' -- -- * 'hvsParserConfig' -- -- * 'hvsLabels' hl7V2Store :: Hl7V2St...
524
hl7V2Store :: Hl7V2Store hl7V2Store = Hl7V2Store' { _hvsNotificationConfigs = Nothing , _hvsRejectDuplicateMessage = Nothing , _hvsName = Nothing , _hvsParserConfig = Nothing , _hvsLabels = Nothing }
229
hl7V2Store = Hl7V2Store' { _hvsNotificationConfigs = Nothing , _hvsRejectDuplicateMessage = Nothing , _hvsName = Nothing , _hvsParserConfig = Nothing , _hvsLabels = Nothing }
200
true
true
0
7
106
66
42
24
null
null
scott-fleischman/greek-grammar
haskell/greek-grammar/src/Data/Unicode/DecomposeChar.hs
mit
decomposeChar '\x1E0F' = "\x0064\x0331"
39
decomposeChar '\x1E0F' = "\x0064\x0331"
39
decomposeChar '\x1E0F' = "\x0064\x0331"
39
false
false
0
4
3
10
4
6
null
null
kowey/GenI
src/NLP/GenI.hs
gpl-2.0
prettyResult :: ProgState -> GeniSuccess -> Text prettyResult pst nr = T.intercalate "\n" . map showOne . grRealisations $ nr where showOne str = pretty theRanking <> ". " <> str <> "\n" <> violations violations = prettyViolations tracesFn verbose (grViolations nr) theRanking = grRanking nr verb...
682
prettyResult :: ProgState -> GeniSuccess -> Text prettyResult pst nr = T.intercalate "\n" . map showOne . grRealisations $ nr where showOne str = pretty theRanking <> ". " <> str <> "\n" <> violations violations = prettyViolations tracesFn verbose (grViolations nr) theRanking = grRanking nr verb...
682
prettyResult pst nr = T.intercalate "\n" . map showOne . grRealisations $ nr where showOne str = pretty theRanking <> ". " <> str <> "\n" <> violations violations = prettyViolations tracesFn verbose (grViolations nr) theRanking = grRanking nr verbose = hasFlag VerboseModeFlg pst tracesFn = ...
633
false
true
5
8
146
143
63
80
null
null
dQuixote/sokal
src/spew.hs
mit
fullStop :: String -> Bool fullStop = (== '.') . last
53
fullStop :: String -> Bool fullStop = (== '.') . last
53
fullStop = (== '.') . last
26
false
true
0
6
10
23
13
10
null
null
olorin/amazonka
amazonka-route53-domains/gen/Network/AWS/Route53Domains/RetrieveDomainAuthCode.hs
mpl-2.0
-- | The name of a domain. -- -- Type: String -- -- Default: None -- -- Constraints: The domain name can contain only the letters a through z, -- the numbers 0 through 9, and hyphen (-). Internationalized Domain Names -- are not supported. -- -- Required: Yes rdacDomainName :: Lens' RetrieveDomainAuthCode Text rdacDoma...
383
rdacDomainName :: Lens' RetrieveDomainAuthCode Text rdacDomainName = lens _rdacDomainName (\ s a -> s{_rdacDomainName = a})
123
rdacDomainName = lens _rdacDomainName (\ s a -> s{_rdacDomainName = a})
71
true
true
1
9
64
53
32
21
null
null
plumlife/cabal
Cabal/Distribution/System.hs
bsd-3-clause
osAliases _ _ = []
33
osAliases _ _ = []
33
osAliases _ _ = []
33
false
false
0
5
19
13
6
7
null
null
brendanhay/gogol
gogol-admin-directory/gen/Network/Google/Resource/Directory/ChromeosDevices/Update.hs
mpl-2.0
-- | Creates a value of 'ChromeosDevicesUpdate' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'cduXgafv' -- -- * 'cduUploadProtocol' -- -- * 'cduAccessToken' -- -- * 'cduUploadType' -- -- * 'cduPayload' -- -- * 'cduCustomerId' -- -- ...
925
chromeosDevicesUpdate :: ChromeOSDevice -- ^ 'cduPayload' -> Text -- ^ 'cduCustomerId' -> Text -- ^ 'cduDeviceId' -> ChromeosDevicesUpdate chromeosDevicesUpdate pCduPayload_ pCduCustomerId_ pCduDeviceId_ = ChromeosDevicesUpdate' { _cduXgafv = Nothing , _cduUploadProtocol = Nothing , _cduAc...
543
chromeosDevicesUpdate pCduPayload_ pCduCustomerId_ pCduDeviceId_ = ChromeosDevicesUpdate' { _cduXgafv = Nothing , _cduUploadProtocol = Nothing , _cduAccessToken = Nothing , _cduUploadType = Nothing , _cduPayload = pCduPayload_ , _cduCustomerId = pCduCustomerId_ , _cduDeviceId = pCduDeviceI...
388
true
true
0
7
184
110
76
34
null
null
jaalonso/I1M-Cod-Temas
src/Tema_13/Ficheros.hs
gpl-2.0
ordenaFichero :: FilePath -> FilePath -> IO () ordenaFichero f1 f2 = do cs <- readFile f1 writeFile f2 ((unlines . sort . lines) cs) -- (tablaCuadrados f n) escribe en el fichero f los cuadrados de los n -- primeros números. Por ejemplo. -- λ> tablaCuadrados "cuadrados.txt" 9 -- λ> muestraContenidoFichero "c...
399
ordenaFichero :: FilePath -> FilePath -> IO () ordenaFichero f1 f2 = do cs <- readFile f1 writeFile f2 ((unlines . sort . lines) cs) -- (tablaCuadrados f n) escribe en el fichero f los cuadrados de los n -- primeros números. Por ejemplo. -- λ> tablaCuadrados "cuadrados.txt" 9 -- λ> muestraContenidoFichero "c...
399
ordenaFichero f1 f2 = do cs <- readFile f1 writeFile f2 ((unlines . sort . lines) cs) -- (tablaCuadrados f n) escribe en el fichero f los cuadrados de los n -- primeros números. Por ejemplo. -- λ> tablaCuadrados "cuadrados.txt" 9 -- λ> muestraContenidoFichero "cuadrados.txt" -- (1,1) (2,4) (3,9) (4,16) (5...
352
false
true
0
12
76
69
35
34
null
null
the-real-blackh/hexpat
Text/XML/Expat/Internal/IO.hs
bsd-3-clause
unStatus :: CInt -> Bool unStatus 0 = False
43
unStatus :: CInt -> Bool unStatus 0 = False
43
unStatus 0 = False
18
false
true
0
5
8
18
9
9
null
null
rueshyna/gogol
gogol-dfareporting/gen/Network/Google/DFAReporting/Types/Product.hs
mpl-2.0
-- | User-entered value. twCustomHTML :: Lens' TargetWindow (Maybe Text) twCustomHTML = lens _twCustomHTML (\ s a -> s{_twCustomHTML = a})
140
twCustomHTML :: Lens' TargetWindow (Maybe Text) twCustomHTML = lens _twCustomHTML (\ s a -> s{_twCustomHTML = a})
115
twCustomHTML = lens _twCustomHTML (\ s a -> s{_twCustomHTML = a})
67
true
true
1
9
22
50
25
25
null
null
Toxaris/Grammarkov
src/grammarkov.hs
bsd-3-clause
action x y = (x >> ("hates" <|> "loves" <|> "considers" <|> "does" <|> "likes") >> y) <|> (x >> ("doesn't" <|> "cannot" <|> ("would" >> "not")) >> ("hate" <|> "love" <|> "consider" <|> "do" <|> "like") >> y )
240
action x y = (x >> ("hates" <|> "loves" <|> "considers" <|> "does" <|> "likes") >> y) <|> (x >> ("doesn't" <|> "cannot" <|> ("would" >> "not")) >> ("hate" <|> "love" <|> "consider" <|> "do" <|> "like") >> y )
240
action x y = (x >> ("hates" <|> "loves" <|> "considers" <|> "does" <|> "likes") >> y) <|> (x >> ("doesn't" <|> "cannot" <|> ("would" >> "not")) >> ("hate" <|> "love" <|> "consider" <|> "do" <|> "like") >> y )
240
false
false
3
13
71
101
53
48
null
null
fmap/hwb
examples/fmap/Main.hs
mit
main :: IO () main = hwb $ do webSettingsEnableScripts `is` False webSettingsEnablePrivateBrowsing `is` True resourceRequestStarting `calls` tryHTTPS titleChanged `calls` setWindowTitle keyPressEvent `calls` tryKeybindings keys liftIO getArgs >>= setURL . head
272
main :: IO () main = hwb $ do webSettingsEnableScripts `is` False webSettingsEnablePrivateBrowsing `is` True resourceRequestStarting `calls` tryHTTPS titleChanged `calls` setWindowTitle keyPressEvent `calls` tryKeybindings keys liftIO getArgs >>= setURL . head
272
main = hwb $ do webSettingsEnableScripts `is` False webSettingsEnablePrivateBrowsing `is` True resourceRequestStarting `calls` tryHTTPS titleChanged `calls` setWindowTitle keyPressEvent `calls` tryKeybindings keys liftIO getArgs >>= setURL . head
258
false
true
0
10
42
82
42
40
null
null
SkemaPlatform/skema-common
src/Skema/DataValue.hs
agpl-3.0
-- ----------------------------------------------------------------------------- -- | Convert `DataValue` to Integral type. dvToIntegral :: Integral a => DataValue -> a dvToIntegral (DVchar v) = fromIntegral v
209
dvToIntegral :: Integral a => DataValue -> a dvToIntegral (DVchar v) = fromIntegral v
85
dvToIntegral (DVchar v) = fromIntegral v
40
true
true
0
7
22
36
18
18
null
null
Slava/6.035-decaf-compiler
src/Main.hs
mit
addOpt :: OptList -> String -> OptList addOpt l "mem2reg" = Data.Sequence.update 0 (OPT.gmem2reg . OPT.mem2reg, True) l
119
addOpt :: OptList -> String -> OptList addOpt l "mem2reg" = Data.Sequence.update 0 (OPT.gmem2reg . OPT.mem2reg, True) l
119
addOpt l "mem2reg" = Data.Sequence.update 0 (OPT.gmem2reg . OPT.mem2reg, True) l
80
false
true
0
8
17
53
26
27
null
null
seizans/ppl
Application.hs
bsd-2-clause
makeFoundation :: AppConfig DefaultEnv Extra -> IO App makeFoundation conf = do manager <- newManager def s <- staticSite dbconf <- withYamlEnvironment "config/sqlite.yml" (appEnv conf) Database.Persist.Store.loadConfig >>= Database.Persist.Store.applyEnv p <- Database.Persis...
510
makeFoundation :: AppConfig DefaultEnv Extra -> IO App makeFoundation conf = do manager <- newManager def s <- staticSite dbconf <- withYamlEnvironment "config/sqlite.yml" (appEnv conf) Database.Persist.Store.loadConfig >>= Database.Persist.Store.applyEnv p <- Database.Persis...
510
makeFoundation conf = do manager <- newManager def s <- staticSite dbconf <- withYamlEnvironment "config/sqlite.yml" (appEnv conf) Database.Persist.Store.loadConfig >>= Database.Persist.Store.applyEnv p <- Database.Persist.Store.createPoolConfig (dbconf :: Settings.PersistCon...
455
false
true
0
11
103
136
67
69
null
null
spyked/writer-monkey
src/Monkey/Util/Processing.hs
bsd-3-clause
-- use these to process lists of stuff countOccurences :: Eq a => a -> [a] -> Int countOccurences x = length . filter (== x)
124
countOccurences :: Eq a => a -> [a] -> Int countOccurences x = length . filter (== x)
85
countOccurences x = length . filter (== x)
42
true
true
0
9
25
49
24
25
null
null
utsav2601/cmpe295A
hake/HakeTypes.hs
mit
formatToken (PreDep _ a f) = f ++ " "
37
formatToken (PreDep _ a f) = f ++ " "
37
formatToken (PreDep _ a f) = f ++ " "
37
false
false
0
7
9
23
11
12
null
null
ekr/tamarin-prover
lib/theory/src/Theory/Constraint/System/Guarded.hs
gpl-3.0
gnot :: (Ord s, Ord c, Ord v) => Guarded s c v -> Guarded s c v gnot = go where go (GGuarded All ss as gf) = gex ss as $ go gf go (GGuarded Ex ss as gf) = gall ss as $ go gf go (GAto ato) = gnotAtom ato go (GDisj disj) = gconj $ map go (getDisj disj) go (GConj co...
506
gnot :: (Ord s, Ord c, Ord v) => Guarded s c v -> Guarded s c v gnot = go where go (GGuarded All ss as gf) = gex ss as $ go gf go (GGuarded Ex ss as gf) = gall ss as $ go gf go (GAto ato) = gnotAtom ato go (GDisj disj) = gconj $ map go (getDisj disj) go (GConj co...
506
gnot = go where go (GGuarded All ss as gf) = gex ss as $ go gf go (GGuarded Ex ss as gf) = gall ss as $ go gf go (GAto ato) = gnotAtom ato go (GDisj disj) = gconj $ map go (getDisj disj) go (GConj conj) = gdisj $ map go (getConj conj) -- | Checks if a dou...
437
false
true
0
8
168
204
95
109
null
null
beni55/fay
src/Fay/Compiler/FFI.hs
bsd-3-clause
-- | Get the index of a name from the set of type variables bindings. getIndex :: Name a -> [TyVarBind b] -> (Name c,Type d) -> (Int,(N.Name,N.Type)) getIndex (unAnn -> name) (map unAnn -> tyvars) (unAnn -> sname,unAnn -> ty) = case ty of TyVar _ tyname -> case elemIndex tyname (map tyvar tyvars) of Nothing...
685
getIndex :: Name a -> [TyVarBind b] -> (Name c,Type d) -> (Int,(N.Name,N.Type)) getIndex (unAnn -> name) (map unAnn -> tyvars) (unAnn -> sname,unAnn -> ty) = case ty of TyVar _ tyname -> case elemIndex tyname (map tyvar tyvars) of Nothing -> error $ "unknown type variable " ++ prettyPrint tyname ++ ...
615
getIndex (unAnn -> name) (map unAnn -> tyvars) (unAnn -> sname,unAnn -> ty) = case ty of TyVar _ tyname -> case elemIndex tyname (map tyvar tyvars) of Nothing -> error $ "unknown type variable " ++ prettyPrint tyname ++ " for " ++ prettyPrint name ++ "." ++ prettyPrint sname ++ "," ...
535
true
true
0
21
186
244
126
118
null
null
gridaphobe/ghc
compiler/typecheck/TcEvidence.hs
bsd-3-clause
mkTcCoVarCo = mkCoVarCo
34
mkTcCoVarCo = mkCoVarCo
34
mkTcCoVarCo = mkCoVarCo
34
false
false
0
4
13
6
3
3
null
null
vladfi1/hs-misc
lib/Misc/Random.hs
mit
ifBit :: (Functor m, MonadBit m) => a -> a -> m a ifBit x y = (\b -> if b then x else y) <$> bit
96
ifBit :: (Functor m, MonadBit m) => a -> a -> m a ifBit x y = (\b -> if b then x else y) <$> bit
96
ifBit x y = (\b -> if b then x else y) <$> bit
46
false
true
0
9
26
67
34
33
null
null
eligottlieb/chaitin
src/Evaluator.hs
mit
cdr :: [LispVal] -> ThrowsError LispVal cdr [List (_ : xs)] = return $ List xs
86
cdr :: [LispVal] -> ThrowsError LispVal cdr [List (_ : xs)] = return $ List xs
86
cdr [List (_ : xs)] = return $ List xs
46
false
true
0
8
23
48
23
25
null
null
ocus/TinyASM_Haskell
library/TinyASM/Instruction.hs
bsd-3-clause
toByteCode (Xor (Address a) (Address b)) = BC3 0x04 a b
56
toByteCode (Xor (Address a) (Address b)) = BC3 0x04 a b
56
toByteCode (Xor (Address a) (Address b)) = BC3 0x04 a b
56
false
false
0
9
11
36
17
19
null
null
ytakano/tsukuyomi
validator/lunar_lisp/lunar_lisp_parser.hs
bsd-3-clause
lookAheadLP = do parseSp0 Parsec.lookAhead (Parsec.char ')') return "" -- spargs ::= sp args | ε
126
lookAheadLP = do parseSp0 Parsec.lookAhead (Parsec.char ')') return "" -- spargs ::= sp args | ε
126
lookAheadLP = do parseSp0 Parsec.lookAhead (Parsec.char ')') return "" -- spargs ::= sp args | ε
126
false
false
0
10
45
32
14
18
null
null
seagull-kamome/Voids
Control/Monad/Voids.hs
bsd-3-clause
void10 :: Functor m => (a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> a10 -> m b) -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> a10 -> m () void10 x = \a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -> fmap (const ()) (x a1 a2 a3 a4 a5 a6 a7 a8 a9 a10)
255
void10 :: Functor m => (a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> a10 -> m b) -> a1 -> a2 -> a3 -> a4 -> a5 -> a6 -> a7 -> a8 -> a9 -> a10 -> m () void10 x = \a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -> fmap (const ()) (x a1 a2 a3 a4 a5 a6 a7 a8 a9 a10)
255
void10 x = \a1 a2 a3 a4 a5 a6 a7 a8 a9 a10 -> fmap (const ()) (x a1 a2 a3 a4 a5 a6 a7 a8 a9 a10)
96
false
true
0
18
77
176
87
89
null
null
WraithM/lendingclub
src/LendingClub/Commands.hs
bsd-3-clause
notes :: Authorization -> InvestorId -> IO (Vector Note) notes auth (InvestorId i) = myNotes <$> jsonGet auth ("accounts/" <> C.pack (show i) <> "/notes")
158
notes :: Authorization -> InvestorId -> IO (Vector Note) notes auth (InvestorId i) = myNotes <$> jsonGet auth ("accounts/" <> C.pack (show i) <> "/notes")
158
notes auth (InvestorId i) = myNotes <$> jsonGet auth ("accounts/" <> C.pack (show i) <> "/notes")
101
false
true
0
12
28
70
34
36
null
null
bbshortcut/Palace
src/VolumeDB.hs
gpl-3.0
getBinding :: VolumeName -> HostName -> IO (Maybe Binding) getBinding volume host = do bindings <- getBindings host return $ find (\ (Binding name _ _ _) -> volume == name) bindings
186
getBinding :: VolumeName -> HostName -> IO (Maybe Binding) getBinding volume host = do bindings <- getBindings host return $ find (\ (Binding name _ _ _) -> volume == name) bindings
186
getBinding volume host = do bindings <- getBindings host return $ find (\ (Binding name _ _ _) -> volume == name) bindings
127
false
true
0
12
36
79
38
41
null
null
VELVETDETH/MiniAcc
AST/Type/Scalar.hs
apache-2.0
typeOfScalar :: Scalar -> ScalarType typeOfScalar (ScalarInteger scalar) = ScalarTypeInteger
96
typeOfScalar :: Scalar -> ScalarType typeOfScalar (ScalarInteger scalar) = ScalarTypeInteger
96
typeOfScalar (ScalarInteger scalar) = ScalarTypeInteger
59
false
true
0
7
13
24
12
12
null
null
jrraymond/ray-tracer
src/BoundingVolumeHierarchy.hs
gpl-3.0
surround EmptyBox b@(Box{}) = b
31
surround EmptyBox b@(Box{}) = b
31
surround EmptyBox b@(Box{}) = b
31
false
false
0
8
4
21
11
10
null
null
johnjcamilleri/maltese-functional-morphology
lib-1.1/General.hs
lgpl-3.0
-- the longest common prefix of a set of a list of strings longestPrefix :: [String] -> String longestPrefix ((c:w):ws) = let (cs,rs) = unzip (map (splitAt 1) ws) in if all (==[c]) cs then c:longestPrefix (w:rs) else ""
226
longestPrefix :: [String] -> String longestPrefix ((c:w):ws) = let (cs,rs) = unzip (map (splitAt 1) ws) in if all (==[c]) cs then c:longestPrefix (w:rs) else ""
166
longestPrefix ((c:w):ws) = let (cs,rs) = unzip (map (splitAt 1) ws) in if all (==[c]) cs then c:longestPrefix (w:rs) else ""
130
true
true
0
13
45
105
56
49
null
null
hesselink/haskell-opaleye
src/Opaleye/Internal/Column.hs
bsd-3-clause
-- For import order reasons we can't make the return type PGBool unsafeCase_ :: [(Column pgBool, Column a)] -> Column a -> Column a unsafeCase_ alts (Column otherwise_) = Column (HPQ.CaseExpr (unColumns alts) otherwise_) where unColumns = map (\(Column e, Column e') -> (e, e'))
280
unsafeCase_ :: [(Column pgBool, Column a)] -> Column a -> Column a unsafeCase_ alts (Column otherwise_) = Column (HPQ.CaseExpr (unColumns alts) otherwise_) where unColumns = map (\(Column e, Column e') -> (e, e'))
215
unsafeCase_ alts (Column otherwise_) = Column (HPQ.CaseExpr (unColumns alts) otherwise_) where unColumns = map (\(Column e, Column e') -> (e, e'))
148
true
true
0
9
46
108
55
53
null
null
agrafix/ignore
app/Main.hs
bsd-3-clause
run :: [FilePath] -> IO () run files = do dir <- getCurrentDirectory >>= parseAbsDir ignoreFiles <- findIgnoreFiles [VCSGit, VCSMercurial, VCSDarcs] dir case ignoreFiles of [] -> putStrLn "No ignore files found. Maybe add one? .gitignore, .hgignore, ...?" _ -> do checker...
643
run :: [FilePath] -> IO () run files = do dir <- getCurrentDirectory >>= parseAbsDir ignoreFiles <- findIgnoreFiles [VCSGit, VCSMercurial, VCSDarcs] dir case ignoreFiles of [] -> putStrLn "No ignore files found. Maybe add one? .gitignore, .hgignore, ...?" _ -> do checker...
643
run files = do dir <- getCurrentDirectory >>= parseAbsDir ignoreFiles <- findIgnoreFiles [VCSGit, VCSMercurial, VCSDarcs] dir case ignoreFiles of [] -> putStrLn "No ignore files found. Maybe add one? .gitignore, .hgignore, ...?" _ -> do checker <- buildChecker ignoreFile...
616
false
true
0
23
209
177
84
93
null
null
Lysxia/twentyseven
exec-src/twentyseven.hs
mit
answer :: String -> Parameters -> IO () answer s p = case s of '.' : s' -> moveSequence s' "random" -> putStrLn =<< stringOfCubeColors <$> randomCube "quit" -> exitSuccess "" -> return () _ -> faceletList s p -- A sequence of moves, e.g., "URF".
256
answer :: String -> Parameters -> IO () answer s p = case s of '.' : s' -> moveSequence s' "random" -> putStrLn =<< stringOfCubeColors <$> randomCube "quit" -> exitSuccess "" -> return () _ -> faceletList s p -- A sequence of moves, e.g., "URF".
256
answer s p = case s of '.' : s' -> moveSequence s' "random" -> putStrLn =<< stringOfCubeColors <$> randomCube "quit" -> exitSuccess "" -> return () _ -> faceletList s p -- A sequence of moves, e.g., "URF".
216
false
true
6
8
57
76
38
38
null
null
creichert/persistent
persistent-mongoDB/Database/Persist/MongoDB.hs
mit
projectionFromEntityDef :: EntityDef -> DB.Projector projectionFromEntityDef eDef = map toField (entityFields eDef) where toField :: FieldDef -> DB.Field toField fDef = (unDBName (fieldDB fDef)) DB.=: (1 :: Int)
223
projectionFromEntityDef :: EntityDef -> DB.Projector projectionFromEntityDef eDef = map toField (entityFields eDef) where toField :: FieldDef -> DB.Field toField fDef = (unDBName (fieldDB fDef)) DB.=: (1 :: Int)
223
projectionFromEntityDef eDef = map toField (entityFields eDef) where toField :: FieldDef -> DB.Field toField fDef = (unDBName (fieldDB fDef)) DB.=: (1 :: Int)
170
false
true
0
9
39
77
39
38
null
null
KaneTW/Idris-dev
src/Idris/REPL.hs
bsd-3-clause
runIdeModeCommand h id orig fn modes (IdeMode.ErrPPrint e) = do ist <- getIState let (out, spans) = displaySpans . renderPretty 0.9 80 . fmap (fancifyAnnots ist True) $ pprintErr ist e msg = (IdeMode.SymbolAtom "ok", out, spans) runIO . hPutStrLn h $ IdeMode.convSEx...
337
runIdeModeCommand h id orig fn modes (IdeMode.ErrPPrint e) = do ist <- getIState let (out, spans) = displaySpans . renderPretty 0.9 80 . fmap (fancifyAnnots ist True) $ pprintErr ist e msg = (IdeMode.SymbolAtom "ok", out, spans) runIO . hPutStrLn h $ IdeMode.convSEx...
337
runIdeModeCommand h id orig fn modes (IdeMode.ErrPPrint e) = do ist <- getIState let (out, spans) = displaySpans . renderPretty 0.9 80 . fmap (fancifyAnnots ist True) $ pprintErr ist e msg = (IdeMode.SymbolAtom "ok", out, spans) runIO . hPutStrLn h $ IdeMode.convSEx...
337
false
false
0
14
99
125
60
65
null
null
joelgrus/science-questions
haskell-servant/src/Lib.hs
unlicense
-- | Given a starting token, and an effectful getNext function, returns the list -- | of tokens resulting from calling getNext until it reaches Stop. tokensFrom :: Token -> GetNextToken -> IO [Token] tokensFrom startToken getNext = do nextToken <- getNext startToken -- nextToken :: Token case nextToken of Sto...
508
tokensFrom :: Token -> GetNextToken -> IO [Token] tokensFrom startToken getNext = do nextToken <- getNext startToken -- nextToken :: Token case nextToken of Stop -> return [] token -> liftA2 (:) (pure token) (tokensFrom token getNext) -- | Converts a list of tokens into a string, putting spaces between ...
358
tokensFrom startToken getNext = do nextToken <- getNext startToken -- nextToken :: Token case nextToken of Stop -> return [] token -> liftA2 (:) (pure token) (tokensFrom token getNext) -- | Converts a list of tokens into a string, putting spaces between words -- | but not before punctuation.
308
true
true
0
13
98
97
48
49
null
null
JenniferWang/incremental-haskell
src/Types.hs
mit
initHeight :: Height initHeight = 0
35
initHeight :: Height initHeight = 0
35
initHeight = 0
14
false
true
0
4
5
11
6
5
null
null
lpeterse/koka
src/Lib/PPrint.hs
apache-2.0
nesting f = Nesting f
27
nesting f = Nesting f
27
nesting f = Nesting f
27
false
false
0
5
10
12
5
7
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/shows_2.hs
mit
primModInt vw vx = error
24
primModInt vw vx = error
24
primModInt vw vx = error
24
false
false
0
5
4
11
5
6
null
null