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
nbrunt/JSHOP
src/Analyser.hs
mit
anBitOr (BOBitOR bitOr bitXor) = anBitOr bitOr >> anBitXor bitXor
65
anBitOr (BOBitOR bitOr bitXor) = anBitOr bitOr >> anBitXor bitXor
65
anBitOr (BOBitOR bitOr bitXor) = anBitOr bitOr >> anBitXor bitXor
65
false
false
0
6
9
28
12
16
null
null
jwaldmann/ceta-postproc
src/Main.hs
lgpl-3.0
readProblemFile :: FilePath -> IO (Maybe String) readProblemFile fname = if Data.List.isSuffixOf ".smt2" fname then return Nothing else Just <$> readFile fname
165
readProblemFile :: FilePath -> IO (Maybe String) readProblemFile fname = if Data.List.isSuffixOf ".smt2" fname then return Nothing else Just <$> readFile fname
165
readProblemFile fname = if Data.List.isSuffixOf ".smt2" fname then return Nothing else Just <$> readFile fname
116
false
true
2
8
27
54
26
28
null
null
lpeterse/koka
src/Core/Parse.hs
apache-2.0
predicate env = do (name,_) <- qvarid tps <- angles (ptype env `sepBy` comma) <|> return [] return (PredIFace (envQualify env name) tps) <?> "predicate"
182
predicate env = do (name,_) <- qvarid tps <- angles (ptype env `sepBy` comma) <|> return [] return (PredIFace (envQualify env name) tps) <?> "predicate"
182
predicate env = do (name,_) <- qvarid tps <- angles (ptype env `sepBy` comma) <|> return [] return (PredIFace (envQualify env name) tps) <?> "predicate"
182
false
false
2
12
54
81
38
43
null
null
stevely/AutoStorable
test/AutoStorableTests.hs
mit
testT3aIso = defineIso to from where to (TestT3a c i b) = T3 c i b from (T3 c i b) = TestT3a c i b
108
testT3aIso = defineIso to from where to (TestT3a c i b) = T3 c i b from (T3 c i b) = TestT3a c i b
108
testT3aIso = defineIso to from where to (TestT3a c i b) = T3 c i b from (T3 c i b) = TestT3a c i b
108
false
false
1
7
35
62
30
32
null
null
nikita-volkov/stm-containers
library/StmContainers/Multimap.hs
mit
deleteByKey :: (Eq key, Hashable key) => key -> Multimap key value -> STM () deleteByKey key (Multimap map) = A.delete key map
128
deleteByKey :: (Eq key, Hashable key) => key -> Multimap key value -> STM () deleteByKey key (Multimap map) = A.delete key map
128
deleteByKey key (Multimap map) = A.delete key map
51
false
true
0
9
24
62
30
32
null
null
jgm/blaze-html
Text/Blaze/Renderer/Text.hs
bsd-3-clause
fromChoiceString d (External x) = case x of -- Check that the sequence "</" is *not* in the external data. String s -> if "</" `isInfixOf` s then mempty else B.fromText (T.pack s) Text s -> if "</" `T.isInfixOf` s then mempty else B.fromText s ByteString s -> if "</" `S.isInfixOf` s then mempt...
384
fromChoiceString d (External x) = case x of -- Check that the sequence "</" is *not* in the external data. String s -> if "</" `isInfixOf` s then mempty else B.fromText (T.pack s) Text s -> if "</" `T.isInfixOf` s then mempty else B.fromText s ByteString s -> if "</" `S.isInfixOf` s then mempt...
384
fromChoiceString d (External x) = case x of -- Check that the sequence "</" is *not* in the external data. String s -> if "</" `isInfixOf` s then mempty else B.fromText (T.pack s) Text s -> if "</" `T.isInfixOf` s then mempty else B.fromText s ByteString s -> if "</" `S.isInfixOf` s then mempt...
384
false
false
0
12
103
135
70
65
null
null
Happstack/ixset
src/Data/IxSet.hs
bsd-3-clause
intersection :: (Ord a, Typeable a, Indexable a) => IxSet a -> IxSet a -> IxSet a intersection (IxSet x1) (IxSet x2) = IxSet indexes' where indexes' = zipWith intersection' x1 x2 intersection' (Ix a f) (Ix b _) = case cast b of Nothing -> error "IxSet.intersection: indexes out of o...
429
intersection :: (Ord a, Typeable a, Indexable a) => IxSet a -> IxSet a -> IxSet a intersection (IxSet x1) (IxSet x2) = IxSet indexes' where indexes' = zipWith intersection' x1 x2 intersection' (Ix a f) (Ix b _) = case cast b of Nothing -> error "IxSet.intersection: indexes out of o...
429
intersection (IxSet x1) (IxSet x2) = IxSet indexes' where indexes' = zipWith intersection' x1 x2 intersection' (Ix a f) (Ix b _) = case cast b of Nothing -> error "IxSet.intersection: indexes out of order" Just b' -> Ix (Ix.intersection a b') f -- query operators -- ...
347
false
true
0
11
121
152
73
79
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/basicTypes/OccName.hs
bsd-3-clause
mkOccEnv_C comb l = A $ addListToUFM_C comb emptyUFM l
54
mkOccEnv_C comb l = A $ addListToUFM_C comb emptyUFM l
54
mkOccEnv_C comb l = A $ addListToUFM_C comb emptyUFM l
54
false
false
3
5
9
27
10
17
null
null
Michaelt293/lipase
src/Spectra.hs
bsd-3-clause
mkMS2SpectrumRemovePrecursor :: Mz -> [SpectrumCsv] -> MS2Spectrum Mz Mz mkMS2SpectrumRemovePrecursor mz' rs = MS2Spectrum mz' . insertAbundances $ removePrecursorIon mz' rs
175
mkMS2SpectrumRemovePrecursor :: Mz -> [SpectrumCsv] -> MS2Spectrum Mz Mz mkMS2SpectrumRemovePrecursor mz' rs = MS2Spectrum mz' . insertAbundances $ removePrecursorIon mz' rs
175
mkMS2SpectrumRemovePrecursor mz' rs = MS2Spectrum mz' . insertAbundances $ removePrecursorIon mz' rs
102
false
true
0
7
22
48
23
25
null
null
dzamkov/Oedel
src/Control/Reactive.hs
mit
stepper :: (ReactiveState e) => a -> e a -> Moment e (I e a) stepper init = accumB init . (const <$>)
102
stepper :: (ReactiveState e) => a -> e a -> Moment e (I e a) stepper init = accumB init . (const <$>)
101
stepper init = accumB init . (const <$>)
40
false
true
0
10
23
58
29
29
null
null
skatenerd/renderer
src/Lib.hs
bsd-3-clause
sameSideOfSegment :: Point -> Point -> Segment -> Bool sameSideOfSegment a b (Segment from to) = sameishDirection crossOne crossTwo where crossOne = crossProduct (pointDifference a from) (pointDifference to from) crossTwo = crossProduct (pointDifference b from) (pointDifference to from) sameishDirecti...
375
sameSideOfSegment :: Point -> Point -> Segment -> Bool sameSideOfSegment a b (Segment from to) = sameishDirection crossOne crossTwo where crossOne = crossProduct (pointDifference a from) (pointDifference to from) crossTwo = crossProduct (pointDifference b from) (pointDifference to from) sameishDirecti...
375
sameSideOfSegment a b (Segment from to) = sameishDirection crossOne crossTwo where crossOne = crossProduct (pointDifference a from) (pointDifference to from) crossTwo = crossProduct (pointDifference b from) (pointDifference to from) sameishDirection v1 v2 = (dotProduct v1 v2) > 0 -- assumes coplanar!
320
false
true
0
7
68
121
60
61
null
null
iu-parfunc/containers
tests/map-properties.hs
bsd-3-clause
test_difference :: Assertion test_difference = difference (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) @?= singleton 3 "b"
141
test_difference :: Assertion test_difference = difference (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) @?= singleton 3 "b"
141
test_difference = difference (fromList [(5, "a"), (3, "b")]) (fromList [(5, "A"), (7, "C")]) @?= singleton 3 "b"
112
false
true
0
10
19
79
43
36
null
null
mapinguari/SC_HS_Proxy
src/Proxy/Query/Unit.hs
mit
canMove SpecialMatureChrysalis = False
38
canMove SpecialMatureChrysalis = False
38
canMove SpecialMatureChrysalis = False
38
false
false
0
5
3
9
4
5
null
null
hesiod/units
Tests/LennardJones.hs
bsd-3-clause
sNine = SS sEight
20
sNine = SS sEight
20
sNine = SS sEight
20
false
false
0
5
6
9
4
5
null
null
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/GlassBR/Unitals.hs
bsd-2-clause
--derived inputs with units and uncertainties derivedInsWUnitsUncrtn :: [UncertQ] derivedInsWUnitsUncrtn = [standOffDist]
121
derivedInsWUnitsUncrtn :: [UncertQ] derivedInsWUnitsUncrtn = [standOffDist]
75
derivedInsWUnitsUncrtn = [standOffDist]
39
true
true
0
5
11
18
11
7
null
null
svenssonjoel/EmbArBB
Intel/ArBB/Backend/ArBB.hs
bsd-3-clause
---------------------------------------------------------------------------- -- Backend functions getFunID :: ArBBBackend FuncID getFunID = do uniq <- S.gets arbbUnique S.modify $ \s -> s {arbbUnique = uniq + 1} return uniq
253
getFunID :: ArBBBackend FuncID getFunID = do uniq <- S.gets arbbUnique S.modify $ \s -> s {arbbUnique = uniq + 1} return uniq
153
getFunID = do uniq <- S.gets arbbUnique S.modify $ \s -> s {arbbUnique = uniq + 1} return uniq
121
true
true
1
12
56
64
30
34
null
null
jmikkola/Athena
src/test-Inference.hs
mit
composingSubs :: Assertion composingSubs = do -- Try the trivial cases assertEq emptySubstitution (composeSubs emptySubstitution emptySubstitution) let subAB = makeSub [(TVar "a", TVar "b")] assertEq subAB (composeSubs emptySubstitution subAB) assertEq subAB (composeSubs subAB emptySubstitution) assertEq s...
566
composingSubs :: Assertion composingSubs = do -- Try the trivial cases assertEq emptySubstitution (composeSubs emptySubstitution emptySubstitution) let subAB = makeSub [(TVar "a", TVar "b")] assertEq subAB (composeSubs emptySubstitution subAB) assertEq subAB (composeSubs subAB emptySubstitution) assertEq s...
566
composingSubs = do -- Try the trivial cases assertEq emptySubstitution (composeSubs emptySubstitution emptySubstitution) let subAB = makeSub [(TVar "a", TVar "b")] assertEq subAB (composeSubs emptySubstitution subAB) assertEq subAB (composeSubs subAB emptySubstitution) assertEq subAB (composeSubs subAB sub...
539
false
true
0
14
94
195
90
105
null
null
wouwouwou/2017_module_8
src/haskell/PP-project-2016/lib/sprockell/BasicFunctions.hs
apache-2.0
regC = 4 :: Int
27
regC = 4 :: Int
27
regC = 4 :: Int
27
false
false
0
4
16
9
5
4
null
null
Zekka/whidgle
src/Main.hs
mit
settings :: Parser Settings settings = Settings <$> (Key <$> argument (Just . pack) (metavar "KEY")) <*> (fromString <$> strOption (long "url" <> value "http://vindinium.org"))
196
settings :: Parser Settings settings = Settings <$> (Key <$> argument (Just . pack) (metavar "KEY")) <*> (fromString <$> strOption (long "url" <> value "http://vindinium.org"))
196
settings = Settings <$> (Key <$> argument (Just . pack) (metavar "KEY")) <*> (fromString <$> strOption (long "url" <> value "http://vindinium.org"))
168
false
true
0
11
44
70
35
35
null
null
polygonhell/textEditor
src/TextBuffer.hs
bsd-3-clause
deleteCharacter :: Buffer -> Buffer deleteCharacter b@Buffer{..} | col cursor == 0 && not (isFirstLine b) = unbreakLine b
121
deleteCharacter :: Buffer -> Buffer deleteCharacter b@Buffer{..} | col cursor == 0 && not (isFirstLine b) = unbreakLine b
121
deleteCharacter b@Buffer{..} | col cursor == 0 && not (isFirstLine b) = unbreakLine b
85
false
true
0
11
18
56
26
30
null
null
mrehayden1/lji
src/LJI/Args.hs
bsd-3-clause
fifthsCmd :: OperationParser fifthsCmd = fifths <$ (string "fifth" *> notFollowedBy alphaNum)
95
fifthsCmd :: OperationParser fifthsCmd = fifths <$ (string "fifth" *> notFollowedBy alphaNum)
95
fifthsCmd = fifths <$ (string "fifth" *> notFollowedBy alphaNum)
66
false
true
2
8
13
36
15
21
null
null
tonyfloatersu/solution-haskell-craft-of-FP
Chapter_11_my_note.hs
mit
uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d uncurry3 f (x, y, z) = f x y z
82
uncurry3 :: (a -> b -> c -> d) -> (a, b, c) -> d uncurry3 f (x, y, z) = f x y z
82
uncurry3 f (x, y, z) = f x y z
33
false
true
0
9
27
69
36
33
null
null
MichaelMackus/hsrl
RL/Game.hs
mit
poofItem :: Mob -> Item -> Mob poofItem m i = m { inventory = L.delete i (inventory m) }
88
poofItem :: Mob -> Item -> Mob poofItem m i = m { inventory = L.delete i (inventory m) }
88
poofItem m i = m { inventory = L.delete i (inventory m) }
57
false
true
0
10
19
54
25
29
null
null
andyarvanitis/Idris-dev
src/Idris/REPL.hs
bsd-3-clause
showTotal t i = show t
22
showTotal t i = show t
22
showTotal t i = show t
22
false
false
1
5
5
19
6
13
null
null
kumasento/accelerate
Data/Array/Accelerate/Trafo.hs
bsd-3-clause
when :: (a -> a) -> Bool -> a -> a when f True = f
51
when :: (a -> a) -> Bool -> a -> a when f True = f
51
when f True = f
16
false
true
0
7
16
35
18
17
null
null
CindyLinz/Haskell.js
trans/src/Desugar/List.hs
mit
deListDeclHead :: DeclHead l -> DeclHead l deListDeclHead (DHead l name) = DHead (id l) (deListName name)
105
deListDeclHead :: DeclHead l -> DeclHead l deListDeclHead (DHead l name) = DHead (id l) (deListName name)
105
deListDeclHead (DHead l name) = DHead (id l) (deListName name)
62
false
true
0
7
16
49
23
26
null
null
brendanhay/gogol
gogol-servicemanagement/gen/Network/Google/ServiceManagement/Types/Product.hs
mpl-2.0
-- | HTTP configuration. sHTTP :: Lens' Service (Maybe HTTP) sHTTP = lens _sHTTP (\ s a -> s{_sHTTP = a})
105
sHTTP :: Lens' Service (Maybe HTTP) sHTTP = lens _sHTTP (\ s a -> s{_sHTTP = a})
80
sHTTP = lens _sHTTP (\ s a -> s{_sHTTP = a})
44
true
true
0
9
20
46
25
21
null
null
shayan-najd/QFeldspar
QFeldspar/Variable/Typed.hs
gpl-3.0
prd _ = impossible
24
prd _ = impossible
24
prd _ = impossible
24
false
false
0
4
9
10
4
6
null
null
acowley/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
staticPtrTyConName :: Name staticPtrTyConName = tcQual gHC_STATICPTR (fsLit "StaticPtr") staticPtrTyConKey
110
staticPtrTyConName :: Name staticPtrTyConName = tcQual gHC_STATICPTR (fsLit "StaticPtr") staticPtrTyConKey
110
staticPtrTyConName = tcQual gHC_STATICPTR (fsLit "StaticPtr") staticPtrTyConKey
83
false
true
0
7
13
24
12
12
null
null
k-bx/snap-server
src/System/FastLogger.hs
bsd-3-clause
logMsg :: Logger -> ByteString -> IO () logMsg !lg !s = do let !s' = byteString s `mappend` char8 '\n' atomicModifyIORef' (_queuedMessages lg) $ \d -> (d `mappend` s',()) void $ tryPutMVar (_dataWaiting lg) () ------------------------------------------------------------------------------
302
logMsg :: Logger -> ByteString -> IO () logMsg !lg !s = do let !s' = byteString s `mappend` char8 '\n' atomicModifyIORef' (_queuedMessages lg) $ \d -> (d `mappend` s',()) void $ tryPutMVar (_dataWaiting lg) () ------------------------------------------------------------------------------
302
logMsg !lg !s = do let !s' = byteString s `mappend` char8 '\n' atomicModifyIORef' (_queuedMessages lg) $ \d -> (d `mappend` s',()) void $ tryPutMVar (_dataWaiting lg) () ------------------------------------------------------------------------------
262
false
true
0
12
50
117
56
61
null
null
a143753/AOJ
0045.hs
apache-2.0
ans :: [(Int,Int)] -> (Int,Int) ans dt = let s = sum $ map (\(a,b) -> a*b) dt n = sum $ map (\(a,b) -> b) dt i = length dt a'= (n*10) `div` i a = if a' `mod` 10 >= 5 then a' `div` 10 + 1 else a' `div` 10 in (s,a)
264
ans :: [(Int,Int)] -> (Int,Int) ans dt = let s = sum $ map (\(a,b) -> a*b) dt n = sum $ map (\(a,b) -> b) dt i = length dt a'= (n*10) `div` i a = if a' `mod` 10 >= 5 then a' `div` 10 + 1 else a' `div` 10 in (s,a)
264
ans dt = let s = sum $ map (\(a,b) -> a*b) dt n = sum $ map (\(a,b) -> b) dt i = length dt a'= (n*10) `div` i a = if a' `mod` 10 >= 5 then a' `div` 10 + 1 else a' `div` 10 in (s,a)
232
false
true
0
13
106
174
99
75
null
null
fsestini/stlc-machine
src/Inference.hs
mit
contextToTEContext ((x,t):rest) = (x, typeToTypeExpr t) : contextToTEContext rest
81
contextToTEContext ((x,t):rest) = (x, typeToTypeExpr t) : contextToTEContext rest
81
contextToTEContext ((x,t):rest) = (x, typeToTypeExpr t) : contextToTEContext rest
81
false
false
0
7
8
39
20
19
null
null
romanb/amazonka
amazonka-lambda/gen/Network/AWS/Lambda/UpdateEventSourceMapping.hs
mpl-2.0
-- | The UTC time string indicating the last time the event mapping was updated. uesmrLastModified :: Lens' UpdateEventSourceMappingResponse (Maybe UTCTime) uesmrLastModified = lens _uesmrLastModified (\s a -> s { _uesmrLastModified = a }) . mapping _Time
267
uesmrLastModified :: Lens' UpdateEventSourceMappingResponse (Maybe UTCTime) uesmrLastModified = lens _uesmrLastModified (\s a -> s { _uesmrLastModified = a }) . mapping _Time
186
uesmrLastModified = lens _uesmrLastModified (\s a -> s { _uesmrLastModified = a }) . mapping _Time
110
true
true
0
10
48
53
28
25
null
null
tpsinnem/Idris-dev
src/Idris/WhoCalls.hs
bsd-3-clause
occursBinder n (NLet ty val) = occurs n ty || occurs n val
58
occursBinder n (NLet ty val) = occurs n ty || occurs n val
58
occursBinder n (NLet ty val) = occurs n ty || occurs n val
58
false
false
0
7
12
33
15
18
null
null
mckeankylej/ava
src/Language/Ava.hs
mit
refE :: v -> Fin n -> AST v u c Term n refE x = Ref x .> Embed
62
refE :: v -> Fin n -> AST v u c Term n refE x = Ref x .> Embed
62
refE x = Ref x .> Embed
23
false
true
0
7
19
43
20
23
null
null
ice1000/OI-codes
codewars/authoring/haskell/TimesComm.hs
agpl-3.0
-- | if a = b and b = c, then a = c. (<=>) :: Equal a b -> Equal b c -> Equal a c EqlZ <=> EqlZ = EqlZ
102
(<=>) :: Equal a b -> Equal b c -> Equal a c EqlZ <=> EqlZ = EqlZ
65
EqlZ <=> EqlZ = EqlZ
20
true
true
0
9
31
47
22
25
null
null
ganeti/ganeti
src/Ganeti/HTools/Backend/Rapi.hs
bsd-2-clause
ioErrToResult :: IO a -> IO (Result a) ioErrToResult ioaction = Control.Exception.catch (liftM Ok ioaction) (\e -> return . Bad . show $ (e::IOException))
160
ioErrToResult :: IO a -> IO (Result a) ioErrToResult ioaction = Control.Exception.catch (liftM Ok ioaction) (\e -> return . Bad . show $ (e::IOException))
160
ioErrToResult ioaction = Control.Exception.catch (liftM Ok ioaction) (\e -> return . Bad . show $ (e::IOException))
121
false
true
0
9
29
73
37
36
null
null
brendanhay/gogol
gogol-dataflow/gen/Network/Google/Dataflow/Types/Product.hs
mpl-2.0
-- | The source(s) to read element(s) from to get the value of this side -- input. If more than one source, then the elements are taken from the -- sources, in the specified order if order matters. At least one source is -- required. siiSources :: Lens' SideInputInfo [Source] siiSources = lens _siiSources (\ s a -> s...
371
siiSources :: Lens' SideInputInfo [Source] siiSources = lens _siiSources (\ s a -> s{_siiSources = a}) . _Default . _Coerce
137
siiSources = lens _siiSources (\ s a -> s{_siiSources = a}) . _Default . _Coerce
94
true
true
0
11
78
56
31
25
null
null
TomMD/ghc
compiler/main/DynFlags.hs
bsd-3-clause
-- | Unset a 'ExtensionFlag' xopt_unset :: DynFlags -> ExtensionFlag -> DynFlags xopt_unset dfs f = let onoffs = Off f : extensions dfs in dfs { extensions = onoffs, extensionFlags = flattenExtensionFlags (language dfs) onoffs }
253
xopt_unset :: DynFlags -> ExtensionFlag -> DynFlags xopt_unset dfs f = let onoffs = Off f : extensions dfs in dfs { extensions = onoffs, extensionFlags = flattenExtensionFlags (language dfs) onoffs }
224
xopt_unset dfs f = let onoffs = Off f : extensions dfs in dfs { extensions = onoffs, extensionFlags = flattenExtensionFlags (language dfs) onoffs }
172
true
true
0
10
61
80
38
42
null
null
hasufell/CGA
GUI/Gtk.hs
gpl-2.0
saveDiag :: MyGUI -> IO () saveDiag mygui = do fp <- fileChooserGetFilename (fileButton mygui) case fp of Just x -> do ret <- saveAndDrawDiag x "out.svg" mygui case ret of 1 -> showErrorDialog "No valid x/y dimensions!" 2 -> showErrorDialog "No valid Mesh file!" _ -...
483
saveDiag :: MyGUI -> IO () saveDiag mygui = do fp <- fileChooserGetFilename (fileButton mygui) case fp of Just x -> do ret <- saveAndDrawDiag x "out.svg" mygui case ret of 1 -> showErrorDialog "No valid x/y dimensions!" 2 -> showErrorDialog "No valid Mesh file!" _ -...
483
saveDiag mygui = do fp <- fileChooserGetFilename (fileButton mygui) case fp of Just x -> do ret <- saveAndDrawDiag x "out.svg" mygui case ret of 1 -> showErrorDialog "No valid x/y dimensions!" 2 -> showErrorDialog "No valid Mesh file!" _ -> return () Nothing -> return () ...
446
false
true
0
16
138
118
54
64
null
null
dmvianna/haskellbook
src/Ch12Ex-unfolds.hs
unlicense
mehConcat :: [[a]] -> [a] mehConcat xs = go [] xs where go :: [a] -> [[a]] -> [a] go xs' [] = xs' go xs' (x:xs) = go (xs' ++ x) xs
154
mehConcat :: [[a]] -> [a] mehConcat xs = go [] xs where go :: [a] -> [[a]] -> [a] go xs' [] = xs' go xs' (x:xs) = go (xs' ++ x) xs
154
mehConcat xs = go [] xs where go :: [a] -> [[a]] -> [a] go xs' [] = xs' go xs' (x:xs) = go (xs' ++ x) xs
128
false
true
4
7
56
103
55
48
null
null
dolio/vector
Data/Vector/Storable/Mutable.hs
bsd-3-clause
overlaps = G.overlaps
21
overlaps = G.overlaps
21
overlaps = G.overlaps
21
false
false
0
5
2
8
4
4
null
null
mboes/streaming-binary
src/Streaming/Binary.hs
bsd-3-clause
-- | Encode a stream of elements to a streaming bytestring. encoded :: (Binary a, MonadIO m) => Stream (Of a) IO () -> ByteString m () encoded = encodedWith put
166
encoded :: (Binary a, MonadIO m) => Stream (Of a) IO () -> ByteString m () encoded = encodedWith put
106
encoded = encodedWith put
25
true
true
0
10
36
61
29
32
null
null
np/ling
Ling/Reify.hs
bsd-3-clause
normOS (SoSession s) = Just (normS s)
37
normOS (SoSession s) = Just (normS s)
37
normOS (SoSession s) = Just (normS s)
37
false
false
0
7
6
24
11
13
null
null
amutake/psg-scheme
src/Primitives.hs
bsd-3-clause
primCdr _ = throwError $ NumArgs "cdr: args == 1"
49
primCdr _ = throwError $ NumArgs "cdr: args == 1"
49
primCdr _ = throwError $ NumArgs "cdr: args == 1"
49
false
false
0
6
9
16
7
9
null
null
mikeizbicki/cassava
Data/Csv/Parser.hs
bsd-3-clause
-- | Parse a field. The field may be in either the escaped or -- non-escaped format. The return value is unescaped. field :: Word8 -> AL.Parser Field field !delim = do mb <- A.peekWord8 -- We purposely don't use <|> as we want to commit to the first -- choice if we see a double quote. case mb of ...
421
field :: Word8 -> AL.Parser Field field !delim = do mb <- A.peekWord8 -- We purposely don't use <|> as we want to commit to the first -- choice if we see a double quote. case mb of Just b | b == doubleQuote -> escapedField _ -> unescapedField delim
305
field !delim = do mb <- A.peekWord8 -- We purposely don't use <|> as we want to commit to the first -- choice if we see a double quote. case mb of Just b | b == doubleQuote -> escapedField _ -> unescapedField delim
271
true
true
0
13
128
77
36
41
null
null
lspitzner/brittany
source/library/Language/Haskell/Brittany/Internal/Utils.hs
agpl-3.0
tellDebugMess :: MonadMultiWriter (Seq String) m => String -> m () tellDebugMess s = mTell $ Seq.singleton s
108
tellDebugMess :: MonadMultiWriter (Seq String) m => String -> m () tellDebugMess s = mTell $ Seq.singleton s
108
tellDebugMess s = mTell $ Seq.singleton s
41
false
true
7
7
17
56
23
33
null
null
pstiasny/mgr
Lights.hs
lgpl-3.0
illuminationAtPoint :: Light -> Collider a -> Vec3 -> LightSample illuminationAtPoint (PointLight lightPos spectrum) rc x = let pointToLight = lightPos - x lightDir = norm $ pointToLight intensity = (1 / (lensq pointToLight)) @* spectrum unoccluded = reachable rc (x + 0.001 @* lightDir) lightPos i...
490
illuminationAtPoint :: Light -> Collider a -> Vec3 -> LightSample illuminationAtPoint (PointLight lightPos spectrum) rc x = let pointToLight = lightPos - x lightDir = norm $ pointToLight intensity = (1 / (lensq pointToLight)) @* spectrum unoccluded = reachable rc (x + 0.001 @* lightDir) lightPos i...
490
illuminationAtPoint (PointLight lightPos spectrum) rc x = let pointToLight = lightPos - x lightDir = norm $ pointToLight intensity = (1 / (lensq pointToLight)) @* spectrum unoccluded = reachable rc (x + 0.001 @* lightDir) lightPos in LightSample { lightSampleDir = lightDir , lig...
424
false
true
0
13
137
130
69
61
null
null
GaloisInc/halvm-ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
breakpointCondName= varQual gHC_BASE (fsLit "breakpointCond") breakpointCondIdKey
81
breakpointCondName= varQual gHC_BASE (fsLit "breakpointCond") breakpointCondIdKey
81
breakpointCondName= varQual gHC_BASE (fsLit "breakpointCond") breakpointCondIdKey
81
false
false
1
7
5
23
9
14
null
null
singingwolfboy/citeproc-hs
src/Text/CSL/Proc/Collapse.hs
bsd-3-clause
groupConsec :: [Int] -> [[Int]] groupConsec = groupConsec' [] where groupConsec' x [] = x groupConsec' [] (y:ys) = groupConsec' [[y]] ys groupConsec' xs (y:ys) = if y - head (last xs) == length (last xs) then groupConsec' (init xs ++ [last xs ++ [y]]) ys ...
394
groupConsec :: [Int] -> [[Int]] groupConsec = groupConsec' [] where groupConsec' x [] = x groupConsec' [] (y:ys) = groupConsec' [[y]] ys groupConsec' xs (y:ys) = if y - head (last xs) == length (last xs) then groupConsec' (init xs ++ [last xs ++ [y]]) ys ...
394
groupConsec = groupConsec' [] where groupConsec' x [] = x groupConsec' [] (y:ys) = groupConsec' [[y]] ys groupConsec' xs (y:ys) = if y - head (last xs) == length (last xs) then groupConsec' (init xs ++ [last xs ++ [y]]) ys else gro...
362
false
true
0
13
156
170
89
81
null
null
matonix/pfds
src/PFDS/Sec8/Ex3.hs
bsd-3-clause
check :: Queue a -> Queue a check q@(Q d f state r) = if d >= 0 then snd $ exec1 d q else snd . uncurry exec1 $ exec1 0 (Q 1 f newstate []) where newstate = Reversing 0 f [] r []
193
check :: Queue a -> Queue a check q@(Q d f state r) = if d >= 0 then snd $ exec1 d q else snd . uncurry exec1 $ exec1 0 (Q 1 f newstate []) where newstate = Reversing 0 f [] r []
192
check q@(Q d f state r) = if d >= 0 then snd $ exec1 d q else snd . uncurry exec1 $ exec1 0 (Q 1 f newstate []) where newstate = Reversing 0 f [] r []
164
false
true
0
10
60
113
55
58
null
null
vincenthz/cryptonite
Crypto/Error/Types.hs
bsd-3-clause
eitherCryptoError (CryptoPassed a) = Right a
44
eitherCryptoError (CryptoPassed a) = Right a
44
eitherCryptoError (CryptoPassed a) = Right a
44
false
false
0
7
5
18
8
10
null
null
chadbrewbaker/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_checkGrepQ3= verify checkShouldUseGrepQ "[ -n \"$(foo | zgrep lol)\" ]"
76
prop_checkGrepQ3= verify checkShouldUseGrepQ "[ -n \"$(foo | zgrep lol)\" ]"
76
prop_checkGrepQ3= verify checkShouldUseGrepQ "[ -n \"$(foo | zgrep lol)\" ]"
76
false
false
0
5
9
11
5
6
null
null
KommuSoft/vty-ui
src/Graphics/Vty/Widgets/CheckBox.hs
bsd-3-clause
-- |Set the state of a checkbox. May throw 'BadCheckboxState'. setCheckboxState :: (Eq a) => Widget (CheckBox a) -> a -> IO () setCheckboxState = setChecked_
158
setCheckboxState :: (Eq a) => Widget (CheckBox a) -> a -> IO () setCheckboxState = setChecked_
94
setCheckboxState = setChecked_
30
true
true
0
9
26
43
22
21
null
null
utsav2601/cmpe295A
tools/flounder/BackendCommon.hs
mit
idscope :: String -> String -> String -> String idscope ifn s suffix = ifscope ifn (s ++ "__" ++ suffix)
105
idscope :: String -> String -> String -> String idscope ifn s suffix = ifscope ifn (s ++ "__" ++ suffix)
105
idscope ifn s suffix = ifscope ifn (s ++ "__" ++ suffix)
57
false
true
0
9
21
51
24
27
null
null
mettekou/ghc
compiler/main/HscTypes.hs
bsd-3-clause
hptAllThings :: (HomeModInfo -> [a]) -> HscEnv -> [a] hptAllThings extract hsc_env = concatMap extract (eltsHpt (hsc_HPT hsc_env))
130
hptAllThings :: (HomeModInfo -> [a]) -> HscEnv -> [a] hptAllThings extract hsc_env = concatMap extract (eltsHpt (hsc_HPT hsc_env))
130
hptAllThings extract hsc_env = concatMap extract (eltsHpt (hsc_HPT hsc_env))
76
false
true
0
9
17
54
28
26
null
null
arekfu/project_euler
p0060/p0060.hs
mit
main = do let ans = answer print answer print $ head $ map (sum . list) ans --appendToPrimeTuple tuple -- | trace ("\n*** appendToPrimeTuple " ++ show tuple) False = undefined -- | null $ toBeConsidered tuple = [] -- | otherwise = [ PrimeTuple newList remaining | -- ...
514
main = do let ans = answer print answer print $ head $ map (sum . list) ans --appendToPrimeTuple tuple -- | trace ("\n*** appendToPrimeTuple " ++ show tuple) False = undefined -- | null $ toBeConsidered tuple = [] -- | otherwise = [ PrimeTuple newList remaining | -- ...
514
main = do let ans = answer print answer print $ head $ map (sum . list) ans --appendToPrimeTuple tuple -- | trace ("\n*** appendToPrimeTuple " ++ show tuple) False = undefined -- | null $ toBeConsidered tuple = [] -- | otherwise = [ PrimeTuple newList remaining | -- ...
514
false
false
1
11
194
58
30
28
null
null
vdweegen/UvA-Software_Testing
Lab4/Willem/Exercises.hs
gpl-3.0
exercise8 = do print() -- ============================================================================= -- Exercise 9 :: Time spent +- -- =============================================================================
218
exercise8 = do print() -- ============================================================================= -- Exercise 9 :: Time spent +- -- =============================================================================
218
exercise8 = do print() -- ============================================================================= -- Exercise 9 :: Time spent +- -- =============================================================================
218
false
false
0
8
17
17
9
8
null
null
pbrisbin/tee-io
src/Handler/Common.hs
mit
getRobotsR :: Handler TypedContent getRobotsR = return $ TypedContent typePlain $ toContent $(embedFile "config/robots.txt")
132
getRobotsR :: Handler TypedContent getRobotsR = return $ TypedContent typePlain $ toContent $(embedFile "config/robots.txt")
132
getRobotsR = return $ TypedContent typePlain $ toContent $(embedFile "config/robots.txt")
97
false
true
4
8
21
43
17
26
null
null
brendanhay/gogol
gogol-securitycenter/gen/Network/Google/Resource/SecurityCenter/Organizations/Sources/Create.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). oscUploadProtocol :: Lens' OrganizationsSourcesCreate (Maybe Text) oscUploadProtocol = lens _oscUploadProtocol (\ s a -> s{_oscUploadProtocol = a})
217
oscUploadProtocol :: Lens' OrganizationsSourcesCreate (Maybe Text) oscUploadProtocol = lens _oscUploadProtocol (\ s a -> s{_oscUploadProtocol = a})
155
oscUploadProtocol = lens _oscUploadProtocol (\ s a -> s{_oscUploadProtocol = a})
88
true
true
0
9
33
48
25
23
null
null
lucas8/netlist-compiler
compil.hs
mit
possibles g = filter ((==0) . (G.outdeg g) . fst) $ G.labNodes g
64
possibles g = filter ((==0) . (G.outdeg g) . fst) $ G.labNodes g
64
possibles g = filter ((==0) . (G.outdeg g) . fst) $ G.labNodes g
64
false
false
0
12
12
44
22
22
null
null
foresterre/mal
haskell/Core.hs
mpl-2.0
deref _ = throwStr "invalid deref call"
39
deref _ = throwStr "invalid deref call"
39
deref _ = throwStr "invalid deref call"
39
false
false
0
5
6
12
5
7
null
null
tjakway/ghcjvm
compiler/basicTypes/ConLike.hs
bsd-3-clause
-- | Returns the `Id` of the wrapper. This is also known as the builder in -- some contexts. The value is Nothing only in the case of unidirectional -- pattern synonyms. conLikeWrapId_maybe :: ConLike -> Maybe Id conLikeWrapId_maybe (RealDataCon data_con) = Just $ dataConWrapId data_con
287
conLikeWrapId_maybe :: ConLike -> Maybe Id conLikeWrapId_maybe (RealDataCon data_con) = Just $ dataConWrapId data_con
117
conLikeWrapId_maybe (RealDataCon data_con) = Just $ dataConWrapId data_con
74
true
true
0
7
45
37
19
18
null
null
GaloisInc/halvm-ghc
compiler/types/Coercion.hs
bsd-3-clause
ppr_co p co@(TyConAppCo _ tc [_,_]) | tc `hasKey` funTyConKey = ppr_fun_co p co
81
ppr_co p co@(TyConAppCo _ tc [_,_]) | tc `hasKey` funTyConKey = ppr_fun_co p co
81
ppr_co p co@(TyConAppCo _ tc [_,_]) | tc `hasKey` funTyConKey = ppr_fun_co p co
81
false
false
0
8
15
53
25
28
null
null
sopvop/snap
test/suite/Snap/Snaplet/Internal/LensT/Tests.hs
bsd-3-clause
testMonadState :: Test testMonadState = testCase "lens/MonadState" $ do -- s <- execStateT (lensedAsState go (bot0 . bot . sub)) defaultState let s = snd $ runIdentity (runLensT go (sub . bot . bot0) defaultState) assertEqual "bot0" 9 $ _bot0 $ _bot $ _sub s assertEqual "sub0" 3 $ _sub0 $ _sub s ass...
595
testMonadState :: Test testMonadState = testCase "lens/MonadState" $ do -- s <- execStateT (lensedAsState go (bot0 . bot . sub)) defaultState let s = snd $ runIdentity (runLensT go (sub . bot . bot0) defaultState) assertEqual "bot0" 9 $ _bot0 $ _bot $ _sub s assertEqual "sub0" 3 $ _sub0 $ _sub s ass...
595
testMonadState = testCase "lens/MonadState" $ do -- s <- execStateT (lensedAsState go (bot0 . bot . sub)) defaultState let s = snd $ runIdentity (runLensT go (sub . bot . bot0) defaultState) assertEqual "bot0" 9 $ _bot0 $ _bot $ _sub s assertEqual "sub0" 3 $ _sub0 $ _sub s assertEqual "sub1" 999 $ _...
572
false
true
2
17
179
197
89
108
null
null
urbanslug/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
mkCmmCodeLabel pkg str = CmmLabel pkg str CmmCode
58
mkCmmCodeLabel pkg str = CmmLabel pkg str CmmCode
58
mkCmmCodeLabel pkg str = CmmLabel pkg str CmmCode
58
false
false
0
5
16
18
8
10
null
null
blancas/trex
src/Util.hs
mit
dateRegex = getRegex "[0-9]+[/\\-]+[0-9]+[/\\-]+[0-9]+"
56
dateRegex = getRegex "[0-9]+[/\\-]+[0-9]+[/\\-]+[0-9]+"
56
dateRegex = getRegex "[0-9]+[/\\-]+[0-9]+[/\\-]+[0-9]+"
56
false
false
1
5
4
13
4
9
null
null
duplode/stack
src/Stack/Setup.hs
bsd-3-clause
unmarkInstalled :: (MonadIO m, MonadReader env m, HasConfig env, MonadThrow m) => PackageIdentifier -> m () unmarkInstalled ident = do dir <- asks $ configLocalPrograms . getConfig fpRel <- parseRelFile $ packageIdentifierString ident ++ ".installed" removeFileIfExists $ dir ...
329
unmarkInstalled :: (MonadIO m, MonadReader env m, HasConfig env, MonadThrow m) => PackageIdentifier -> m () unmarkInstalled ident = do dir <- asks $ configLocalPrograms . getConfig fpRel <- parseRelFile $ packageIdentifierString ident ++ ".installed" removeFileIfExists $ dir ...
329
unmarkInstalled ident = do dir <- asks $ configLocalPrograms . getConfig fpRel <- parseRelFile $ packageIdentifierString ident ++ ".installed" removeFileIfExists $ dir </> fpRel
189
false
true
0
10
83
96
46
50
null
null
vTurbine/ghc
compiler/typecheck/TcGenDeriv.hs
bsd-3-clause
eqResult :: OrdOp -> LHsExpr RdrName -- Knowing a=b, what is the result for a `op` b? eqResult OrdCompare = eqTag_Expr
118
eqResult :: OrdOp -> LHsExpr RdrName eqResult OrdCompare = eqTag_Expr
69
eqResult OrdCompare = eqTag_Expr
32
true
true
0
6
20
22
11
11
null
null
shingoOKAWA/hsarg-haskell
src/DSL/Structured/Standard.hs
bsd-3-clause
likelyhood :: Model -> [Argument] -> Weight likelyhood model@(Strct (_, (_, importance), _)) args = foldl max 0 [importance arg | arg <- args, applicable model arg]
168
likelyhood :: Model -> [Argument] -> Weight likelyhood model@(Strct (_, (_, importance), _)) args = foldl max 0 [importance arg | arg <- args, applicable model arg]
168
likelyhood model@(Strct (_, (_, importance), _)) args = foldl max 0 [importance arg | arg <- args, applicable model arg]
124
false
true
0
10
30
81
43
38
null
null
iljakuklic/eel-proto
src/Main/CommandLine.hs
bsd-3-clause
cmdTok test = token showT posT testT where showT (CTok _ tok) = show (tok :: String) posT (CTok pos _) = newPos "<command-line>" 0 pos testT (CTok _ tok) = test tok -- | token satisfying given predicate
219
cmdTok test = token showT posT testT where showT (CTok _ tok) = show (tok :: String) posT (CTok pos _) = newPos "<command-line>" 0 pos testT (CTok _ tok) = test tok -- | token satisfying given predicate
219
cmdTok test = token showT posT testT where showT (CTok _ tok) = show (tok :: String) posT (CTok pos _) = newPos "<command-line>" 0 pos testT (CTok _ tok) = test tok -- | token satisfying given predicate
219
false
false
1
6
55
94
42
52
null
null
spechub/Hets
Comorphisms/CSMOF2CASL.hs
gpl-2.0
minConstraint :: MultConstr -> Integer -> PredMap -> CASLFORMULA minConstraint con int predM = let predTypes = MapSet.lookup (stringToId $ getRole con) predM -- Set PredType souVars = generateVars "x" 1 tarVars = generateVars "y" int correctPredType = Set.fold (getCorrectPredType con) [] predTypes ...
954
minConstraint :: MultConstr -> Integer -> PredMap -> CASLFORMULA minConstraint con int predM = let predTypes = MapSet.lookup (stringToId $ getRole con) predM -- Set PredType souVars = generateVars "x" 1 tarVars = generateVars "y" int correctPredType = Set.fold (getCorrectPredType con) [] predTypes ...
954
minConstraint con int predM = let predTypes = MapSet.lookup (stringToId $ getRole con) predM -- Set PredType souVars = generateVars "x" 1 tarVars = generateVars "y" int correctPredType = Set.fold (getCorrectPredType con) [] predTypes souVarDec = Var_decl souVars (head (predArgs (head correctPredTy...
889
false
true
0
19
200
287
145
142
null
null
pikajude/game
src/Game/World.hs
gpl-3.0
drawSquare :: Monad m => (Text, Entity World) -> World -> m Picture drawSquare (_,p) _ = return $ pictures [yellowSquare, drawSpeed p, drawAccel p] where yellowSquare = uncurry translate (p ^. behavior.position.tuple) . color yellow $ rectangleSolid 30 30
305
drawSquare :: Monad m => (Text, Entity World) -> World -> m Picture drawSquare (_,p) _ = return $ pictures [yellowSquare, drawSpeed p, drawAccel p] where yellowSquare = uncurry translate (p ^. behavior.position.tuple) . color yellow $ rectangleSolid 30 30
305
drawSquare (_,p) _ = return $ pictures [yellowSquare, drawSpeed p, drawAccel p] where yellowSquare = uncurry translate (p ^. behavior.position.tuple) . color yellow $ rectangleSolid 30 30
237
false
true
0
11
89
111
55
56
null
null
nadavshemer/buildsome
src/Buildsome/MemoParseMakefile.hs
gpl-2.0
mkFileDesc :: Db -> FilePath -> Maybe Posix.FileStatus -> IO (Db.FileDesc () FileContentDesc) mkFileDesc _ _ Nothing = return $ Db.FileDescNonExisting ()
153
mkFileDesc :: Db -> FilePath -> Maybe Posix.FileStatus -> IO (Db.FileDesc () FileContentDesc) mkFileDesc _ _ Nothing = return $ Db.FileDescNonExisting ()
153
mkFileDesc _ _ Nothing = return $ Db.FileDescNonExisting ()
59
false
true
0
12
21
65
30
35
null
null
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Server/Commandline.hs
bsd-3-clause
gameModeP :: Parser (Maybe (GroupName ModeKind)) gameModeP = optional $ toGameMode <$> option nonEmptyStr ( long "gameMode" <> metavar "MODE" <> help "Start next game in the scenario indicated by MODE" ) where -- This ignores all but the first word of a game mode name -- and ass...
618
gameModeP :: Parser (Maybe (GroupName ModeKind)) gameModeP = optional $ toGameMode <$> option nonEmptyStr ( long "gameMode" <> metavar "MODE" <> help "Start next game in the scenario indicated by MODE" ) where -- This ignores all but the first word of a game mode name -- and ass...
618
gameModeP = optional $ toGameMode <$> option nonEmptyStr ( long "gameMode" <> metavar "MODE" <> help "Start next game in the scenario indicated by MODE" ) where -- This ignores all but the first word of a game mode name -- and assumes the fist word is present among its frequenci...
569
false
true
2
10
151
130
66
64
null
null
sdiehl/ghc
compiler/utils/Maybes.hs
bsd-3-clause
-- | Takes a list of @Maybes@ and returns the first @Just@ if there is one, or -- @Nothing@ otherwise. firstJusts :: [Maybe a] -> Maybe a firstJusts = msum
155
firstJusts :: [Maybe a] -> Maybe a firstJusts = msum
52
firstJusts = msum
17
true
true
0
7
29
26
14
12
null
null
urbanslug/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
ctLocDepth :: CtLoc -> SubGoalDepth ctLocDepth = ctl_depth
58
ctLocDepth :: CtLoc -> SubGoalDepth ctLocDepth = ctl_depth
58
ctLocDepth = ctl_depth
22
false
true
0
5
7
15
8
7
null
null
thomie/cabal
Cabal/Distribution/ModuleName.hs
bsd-3-clause
simple :: String -> ModuleName simple str = ModuleName [str]
60
simple :: String -> ModuleName simple str = ModuleName [str]
60
simple str = ModuleName [str]
29
false
true
0
7
9
29
13
16
null
null
graydon/metrics
src/Data/Metrics/Timer/Internal.hs
mit
oneMinuteRate :: Timer -> Double oneMinuteRate = A.rate . M.oneMinuteAverage . _timerMeter
90
oneMinuteRate :: Timer -> Double oneMinuteRate = A.rate . M.oneMinuteAverage . _timerMeter
90
oneMinuteRate = A.rate . M.oneMinuteAverage . _timerMeter
57
false
true
0
7
11
27
14
13
null
null
brendanhay/gogol
gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs
mpl-2.0
-- | Creates a value of 'TestOrderLineItem' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'toliQuantityOrdered' -- -- * 'toliReturnInfo' -- -- * 'toliShippingDetails' -- -- * 'toliProduct' testOrderLineItem :: TestOrderLineItem t...
500
testOrderLineItem :: TestOrderLineItem testOrderLineItem = TestOrderLineItem' { _toliQuantityOrdered = Nothing , _toliReturnInfo = Nothing , _toliShippingDetails = Nothing , _toliProduct = Nothing }
224
testOrderLineItem = TestOrderLineItem' { _toliQuantityOrdered = Nothing , _toliReturnInfo = Nothing , _toliShippingDetails = Nothing , _toliProduct = Nothing }
181
true
true
1
7
94
55
35
20
null
null
jberryman/wai
warp/Network/Wai/Handler/Warp/ResponseHeader.hs
mit
copyStatus :: Ptr Word8 -> H.HttpVersion -> H.Status -> IO (Ptr Word8) copyStatus !ptr !httpversion !status = do ptr1 <- copy ptr httpVer writeWord8OffPtr ptr1 0 (zero + fromIntegral r2) writeWord8OffPtr ptr1 1 (zero + fromIntegral r1) writeWord8OffPtr ptr1 2 (zero + fromIntegral r0) writeWord8OffPt...
612
copyStatus :: Ptr Word8 -> H.HttpVersion -> H.Status -> IO (Ptr Word8) copyStatus !ptr !httpversion !status = do ptr1 <- copy ptr httpVer writeWord8OffPtr ptr1 0 (zero + fromIntegral r2) writeWord8OffPtr ptr1 1 (zero + fromIntegral r1) writeWord8OffPtr ptr1 2 (zero + fromIntegral r0) writeWord8OffPt...
612
copyStatus !ptr !httpversion !status = do ptr1 <- copy ptr httpVer writeWord8OffPtr ptr1 0 (zero + fromIntegral r2) writeWord8OffPtr ptr1 1 (zero + fromIntegral r1) writeWord8OffPtr ptr1 2 (zero + fromIntegral r0) writeWord8OffPtr ptr1 3 spc ptr2 <- copy (ptr1 `plusPtr` 4) (H.statusMessage statu...
541
false
true
3
11
147
254
121
133
null
null
apriori/daak
lib/DAAK/Algorithms/Gamo/Criteria.hs
mit
packingMaxZ (Packing l es _ _) = float2Double $ maximum $ (ez . snd) <$> es
75
packingMaxZ (Packing l es _ _) = float2Double $ maximum $ (ez . snd) <$> es
75
packingMaxZ (Packing l es _ _) = float2Double $ maximum $ (ez . snd) <$> es
75
false
false
0
8
15
41
20
21
null
null
holzensp/ghc
compiler/cmm/PprC.hs
bsd-3-clause
te_Lit :: CmmLit -> TE () te_Lit (CmmLabel l) = te_lbl l
56
te_Lit :: CmmLit -> TE () te_Lit (CmmLabel l) = te_lbl l
56
te_Lit (CmmLabel l) = te_lbl l
30
false
true
0
7
11
32
15
17
null
null
siddhanathan/ghc
compiler/prelude/THNames.hs
bsd-3-clause
staticEName = libFun (fsLit "staticE") staticEIdKey
59
staticEName = libFun (fsLit "staticE") staticEIdKey
59
staticEName = libFun (fsLit "staticE") staticEIdKey
59
false
false
1
7
13
20
8
12
null
null
tcrayford/hitcask
Database/Hitcask/Compact.hs
bsd-3-clause
compactLogFile :: LogFile -> IO (MergingLog, KeyDir) compactLogFile l = do currentContent <- readState l writeMergedContent l currentContent
144
compactLogFile :: LogFile -> IO (MergingLog, KeyDir) compactLogFile l = do currentContent <- readState l writeMergedContent l currentContent
144
compactLogFile l = do currentContent <- readState l writeMergedContent l currentContent
91
false
true
0
9
21
50
22
28
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/range_4.hs
mit
range0 y x z = range00 z (asAs (gtEsOrdering y z) (gtEsOrdering z x))
69
range0 y x z = range00 z (asAs (gtEsOrdering y z) (gtEsOrdering z x))
69
range0 y x z = range00 z (asAs (gtEsOrdering y z) (gtEsOrdering z x))
69
false
false
1
9
13
49
20
29
null
null
peri4n/projecteuler
haskell/problem11.hs
gpl-3.0
trbl :: [Int] trbl = map (product . (map access) . neighboursTRBL) [ (i,j) | i <- [3..19], j <- [3..19]]
104
trbl :: [Int] trbl = map (product . (map access) . neighboursTRBL) [ (i,j) | i <- [3..19], j <- [3..19]]
104
trbl = map (product . (map access) . neighboursTRBL) [ (i,j) | i <- [3..19], j <- [3..19]]
90
false
true
0
10
20
78
40
38
null
null
bitemyapp/wreq
Network/Wreq/Internal.hs
bsd-3-clause
preparePayloadMethod :: Postable a => HTTP.Method -> Options -> String -> a -> IO Req preparePayloadMethod method opts url payload = Req (manager opts) <$> prepare (postPayload payload . (Lens.method .~ method)) opts url
271
preparePayloadMethod :: Postable a => HTTP.Method -> Options -> String -> a -> IO Req preparePayloadMethod method opts url payload = Req (manager opts) <$> prepare (postPayload payload . (Lens.method .~ method)) opts url
246
preparePayloadMethod method opts url payload = Req (manager opts) <$> prepare (postPayload payload . (Lens.method .~ method)) opts url
136
false
true
0
11
84
87
42
45
null
null
nevrenato/Hets_Fork
utils/DtdToHaskell-src/current/TypeDef.hs
gpl-2.0
notPrelude "Char" = "AChar"
30
notPrelude "Char" = "AChar"
30
notPrelude "Char" = "AChar"
30
false
false
1
5
6
13
4
9
null
null
urbanslug/ghc
compiler/utils/FastString.hs
bsd-3-clause
mkFastStringByteList :: [Word8] -> FastString mkFastStringByteList str = inlinePerformIO $ do let l = Prelude.length str buf <- mallocForeignPtrBytes l withForeignPtr buf $ \ptr -> do pokeArray (castPtr ptr) str mkFastStringForeignPtr ptr buf l -- | Creates a Z-encoded 'FastString' from a 'St...
325
mkFastStringByteList :: [Word8] -> FastString mkFastStringByteList str = inlinePerformIO $ do let l = Prelude.length str buf <- mallocForeignPtrBytes l withForeignPtr buf $ \ptr -> do pokeArray (castPtr ptr) str mkFastStringForeignPtr ptr buf l -- | Creates a Z-encoded 'FastString' from a 'St...
325
mkFastStringByteList str = inlinePerformIO $ do let l = Prelude.length str buf <- mallocForeignPtrBytes l withForeignPtr buf $ \ptr -> do pokeArray (castPtr ptr) str mkFastStringForeignPtr ptr buf l -- | Creates a Z-encoded 'FastString' from a 'String'
279
false
true
0
14
69
89
41
48
null
null
tattsun/trafini
src/Trafini/Command.hs
mit
safeHeadX (x:xs) = x
20
safeHeadX (x:xs) = x
20
safeHeadX (x:xs) = x
20
false
false
0
6
3
17
8
9
null
null
mightymoose/liquidhaskell
src/Language/Haskell/Liquid/Simplify.hs
bsd-3-clause
dropBoundLike :: Pred -> Pred dropBoundLike p | isKvar p = p | isBoundLikePred p = mempty | otherwise = p where isKvar = not . null . kvars
179
dropBoundLike :: Pred -> Pred dropBoundLike p | isKvar p = p | isBoundLikePred p = mempty | otherwise = p where isKvar = not . null . kvars
179
dropBoundLike p | isKvar p = p | isBoundLikePred p = mempty | otherwise = p where isKvar = not . null . kvars
149
false
true
2
8
68
66
30
36
null
null
HJvT/com
System/Win32/Com/Automation.hs
bsd-3-clause
readSafeArray :: Variant a => Bool -> Ptr (SafeArray a) -> IO (SafeArray a) readSafeArray finaliseMe ptr = readSafeArray' finaliseMe ptr undefined
146
readSafeArray :: Variant a => Bool -> Ptr (SafeArray a) -> IO (SafeArray a) readSafeArray finaliseMe ptr = readSafeArray' finaliseMe ptr undefined
146
readSafeArray finaliseMe ptr = readSafeArray' finaliseMe ptr undefined
70
false
true
0
10
21
56
26
30
null
null
kkmonlee/Project-Euler-Solutions
Haskell/p20.hs
gpl-3.0
digits :: Integer -> [Integer] digits n | n < 0 = error "Negative arg" | n < 10 = [n] | otherwise = digits (div n 10) ++ digits (rem n 10)
157
digits :: Integer -> [Integer] digits n | n < 0 = error "Negative arg" | n < 10 = [n] | otherwise = digits (div n 10) ++ digits (rem n 10)
157
digits n | n < 0 = error "Negative arg" | n < 10 = [n] | otherwise = digits (div n 10) ++ digits (rem n 10)
126
false
true
0
9
51
85
40
45
null
null
dolio/vector
Data/Vector/Storable.hs
bsd-3-clause
replicateM = G.replicateM
25
replicateM = G.replicateM
25
replicateM = G.replicateM
25
false
false
1
6
2
12
4
8
null
null
alexander-b/thug-beginners
solutions/A2List.hs
gpl-3.0
concatList :: List (List a) -> List a concatList Nil = Nil
70
concatList :: List (List a) -> List a concatList Nil = Nil
70
concatList Nil = Nil
32
false
true
0
8
23
30
14
16
null
null
zach007/cis194
src/Week10.hs
bsd-3-clause
intOrUppercase :: Parser() intOrUppercase = const () <$> posInt <|> const () <$> satisfy isUpper
96
intOrUppercase :: Parser() intOrUppercase = const () <$> posInt <|> const () <$> satisfy isUpper
96
intOrUppercase = const () <$> posInt <|> const () <$> satisfy isUpper
69
false
true
0
9
14
41
19
22
null
null
codemac/yi-editor
src/Yi/Syntax/Haskell.hs
gpl-2.0
-- | Parse a some of something separated by the token (Special '.') pBlocks :: Parser TT r -> Parser TT [r] pBlocks p = p `sepBy1` exact [nextLine]
148
pBlocks :: Parser TT r -> Parser TT [r] pBlocks p = p `sepBy1` exact [nextLine]
80
pBlocks p = p `sepBy1` exact [nextLine]
40
true
true
0
8
29
51
25
26
null
null
miguelpagano/equ
Equ/Proof/Zipper.hs
gpl-3.0
-- | Reemplaza la expresión enfocada por una nueva expresión. replace :: ProofFocus' ctxTy relTy proofTy exprTy -> Proof' ctxTy relTy proofTy exprTy -> ProofFocus' ctxTy relTy proofTy exprTy replace (_,p) p' = (p',p)
228
replace :: ProofFocus' ctxTy relTy proofTy exprTy -> Proof' ctxTy relTy proofTy exprTy -> ProofFocus' ctxTy relTy proofTy exprTy replace (_,p) p' = (p',p)
166
replace (_,p) p' = (p',p)
25
true
true
0
7
45
64
33
31
null
null
LightAndLight/hindley-milner
src/Phil/PHP.hs
bsd-3-clause
binOpToSource Concat = "."
26
binOpToSource Concat = "."
26
binOpToSource Concat = "."
26
false
false
0
5
3
9
4
5
null
null