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
NikolayS/postgrest
src/PostgREST/DbStructure.hs
mit
getDbStructure :: Schema -> H.Tx P.Postgres s DbStructure getDbStructure schema = do tabs <- allTables cols <- allColumns tabs syns <- allSynonyms cols rels <- allRelations tabs cols keys <- allPrimaryKeys tabs let rels' = (addManyToManyRelations . raiseRelations schema syns . addParentRelations . addSynonymousRelations syns) rels cols' = addForeignKeys rels' cols keys' = synonymousPrimaryKeys syns keys return DbStructure { dbTables = tabs , dbColumns = cols' , dbRelations = rels' , dbPrimaryKeys = keys' }
561
getDbStructure :: Schema -> H.Tx P.Postgres s DbStructure getDbStructure schema = do tabs <- allTables cols <- allColumns tabs syns <- allSynonyms cols rels <- allRelations tabs cols keys <- allPrimaryKeys tabs let rels' = (addManyToManyRelations . raiseRelations schema syns . addParentRelations . addSynonymousRelations syns) rels cols' = addForeignKeys rels' cols keys' = synonymousPrimaryKeys syns keys return DbStructure { dbTables = tabs , dbColumns = cols' , dbRelations = rels' , dbPrimaryKeys = keys' }
561
getDbStructure schema = do tabs <- allTables cols <- allColumns tabs syns <- allSynonyms cols rels <- allRelations tabs cols keys <- allPrimaryKeys tabs let rels' = (addManyToManyRelations . raiseRelations schema syns . addParentRelations . addSynonymousRelations syns) rels cols' = addForeignKeys rels' cols keys' = synonymousPrimaryKeys syns keys return DbStructure { dbTables = tabs , dbColumns = cols' , dbRelations = rels' , dbPrimaryKeys = keys' }
503
false
true
0
15
124
165
79
86
null
null
slpopejoy/fadno-xml
src/Fadno/MusicXml/MusicXml30.hs
bsd-2-clause
-- | Smart constructor for 'TimeModification' mkTimeModification :: NonNegativeInteger -> NonNegativeInteger -> TimeModification mkTimeModification a b = TimeModification a b Nothing
182
mkTimeModification :: NonNegativeInteger -> NonNegativeInteger -> TimeModification mkTimeModification a b = TimeModification a b Nothing
136
mkTimeModification a b = TimeModification a b Nothing
53
true
true
0
6
20
32
16
16
null
null
DataStewardshipPortal/ds-form-engine
JQuery.hs
apache-2.0
onResize :: Handler -> JQuery -> IO JQuery onResize ev jq = do ffiOnResize ev jq return jq where ffiOnResize :: Handler -> JQuery -> IO () ffiOnResize = ffi "(function (ev, jq) { jq.resize(ev); })"
211
onResize :: Handler -> JQuery -> IO JQuery onResize ev jq = do ffiOnResize ev jq return jq where ffiOnResize :: Handler -> JQuery -> IO () ffiOnResize = ffi "(function (ev, jq) { jq.resize(ev); })"
211
onResize ev jq = do ffiOnResize ev jq return jq where ffiOnResize :: Handler -> JQuery -> IO () ffiOnResize = ffi "(function (ev, jq) { jq.resize(ev); })"
168
false
true
3
7
49
70
32
38
null
null
timtylin/scholdoc-types
Text/Pandoc/Builder.hs
gpl-2.0
fromList :: [a] -> Many a fromList = Many . Seq.fromList
56
fromList :: [a] -> Many a fromList = Many . Seq.fromList
56
fromList = Many . Seq.fromList
30
false
true
0
6
10
27
14
13
null
null
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EC2LaunchTemplateInstanceMarketOptions.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-ec2-launchtemplate-launchtemplatedata-instancemarketoptions.html#cfn-ec2-launchtemplate-launchtemplatedata-instancemarketoptions-markettype ecltimoMarketType :: Lens' EC2LaunchTemplateInstanceMarketOptions (Maybe (Val Text)) ecltimoMarketType = lens _eC2LaunchTemplateInstanceMarketOptionsMarketType (\s a -> s { _eC2LaunchTemplateInstanceMarketOptionsMarketType = a })
451
ecltimoMarketType :: Lens' EC2LaunchTemplateInstanceMarketOptions (Maybe (Val Text)) ecltimoMarketType = lens _eC2LaunchTemplateInstanceMarketOptionsMarketType (\s a -> s { _eC2LaunchTemplateInstanceMarketOptionsMarketType = a })
229
ecltimoMarketType = lens _eC2LaunchTemplateInstanceMarketOptionsMarketType (\s a -> s { _eC2LaunchTemplateInstanceMarketOptionsMarketType = a })
144
true
true
1
9
22
55
28
27
null
null
bairyn/bitmaps
src/Data/Bitmap/Pixel.hs
bsd-3-clause
greatestIntensityComponent :: PixelComponent greatestIntensityComponent = 0xFF
78
greatestIntensityComponent :: PixelComponent greatestIntensityComponent = 0xFF
78
greatestIntensityComponent = 0xFF
33
false
true
0
4
5
11
6
5
null
null
gsdlab/clafer
src/Language/Clafer/Intermediate/Desugarer.hs
mit
reduceNav :: IExp -> IExp reduceNav x@(IFunExp op' exps'@((PExp _ _ _ iexp@(IFunExp _ (pexp0:pexp:_))):pPexp:_)) = if op' == iJoin && isParent pPexp && isClaferName pexp then reduceNav $ _exp pexp0 else x{_exps = (head exps'){_exp = reduceIExp iexp} : tail exps'}
285
reduceNav :: IExp -> IExp reduceNav x@(IFunExp op' exps'@((PExp _ _ _ iexp@(IFunExp _ (pexp0:pexp:_))):pPexp:_)) = if op' == iJoin && isParent pPexp && isClaferName pexp then reduceNav $ _exp pexp0 else x{_exps = (head exps'){_exp = reduceIExp iexp} : tail exps'}
285
reduceNav x@(IFunExp op' exps'@((PExp _ _ _ iexp@(IFunExp _ (pexp0:pexp:_))):pPexp:_)) = if op' == iJoin && isParent pPexp && isClaferName pexp then reduceNav $ _exp pexp0 else x{_exps = (head exps'){_exp = reduceIExp iexp} : tail exps'}
259
false
true
0
19
63
142
74
68
null
null
tphyahoo/haskoin
haskoin-core/tests/Network/Haskoin/Crypto/ExtendedKeys/Tests.hs
unlicense
tests :: [Test] tests = [ testGroup "HDW Extended Keys" [ testProperty "prvSubKey(k,c)*G = pubSubKey(k*G,c)" subkeyTest , testProperty "fromB58 . toB58 prvKey" b58PrvKey , testProperty "fromB58 . toB58 pubKey" b58PubKey ] , testGroup "From/To strings" [ testProperty "Read/Show extended public key" testReadShowPubKey , testProperty "Read/Show extended private key" testReadShowPrvKey , testProperty "Read/Show derivation path" testReadShowDerivPath , testProperty "Read/Show hard derivation path" testReadShowAllHardPath , testProperty "Read/Show soft derivation path" testReadShowSoftPath , testProperty "From string extended public key" testFromStringPubKey , testProperty "From string extended private key" testFromStringPrvKey , testProperty "From string derivation path" testFromStringDerivPath , testProperty "From string hard derivation path" testFromStringAllHardPath , testProperty "From string soft derivation path" testFromStringSoftPath ] ]
1,085
tests :: [Test] tests = [ testGroup "HDW Extended Keys" [ testProperty "prvSubKey(k,c)*G = pubSubKey(k*G,c)" subkeyTest , testProperty "fromB58 . toB58 prvKey" b58PrvKey , testProperty "fromB58 . toB58 pubKey" b58PubKey ] , testGroup "From/To strings" [ testProperty "Read/Show extended public key" testReadShowPubKey , testProperty "Read/Show extended private key" testReadShowPrvKey , testProperty "Read/Show derivation path" testReadShowDerivPath , testProperty "Read/Show hard derivation path" testReadShowAllHardPath , testProperty "Read/Show soft derivation path" testReadShowSoftPath , testProperty "From string extended public key" testFromStringPubKey , testProperty "From string extended private key" testFromStringPrvKey , testProperty "From string derivation path" testFromStringDerivPath , testProperty "From string hard derivation path" testFromStringAllHardPath , testProperty "From string soft derivation path" testFromStringSoftPath ] ]
1,085
tests = [ testGroup "HDW Extended Keys" [ testProperty "prvSubKey(k,c)*G = pubSubKey(k*G,c)" subkeyTest , testProperty "fromB58 . toB58 prvKey" b58PrvKey , testProperty "fromB58 . toB58 pubKey" b58PubKey ] , testGroup "From/To strings" [ testProperty "Read/Show extended public key" testReadShowPubKey , testProperty "Read/Show extended private key" testReadShowPrvKey , testProperty "Read/Show derivation path" testReadShowDerivPath , testProperty "Read/Show hard derivation path" testReadShowAllHardPath , testProperty "Read/Show soft derivation path" testReadShowSoftPath , testProperty "From string extended public key" testFromStringPubKey , testProperty "From string extended private key" testFromStringPrvKey , testProperty "From string derivation path" testFromStringDerivPath , testProperty "From string hard derivation path" testFromStringAllHardPath , testProperty "From string soft derivation path" testFromStringSoftPath ] ]
1,069
false
true
0
8
241
134
68
66
null
null
sheyll/b9-vm-image-builder
src/lib/System/IO/B9Extras.hs
mit
ensureSystemPath :: MonadIO m => SystemPath -> m () ensureSystemPath = resolve >=> liftIO . createDirectoryIfMissing True
123
ensureSystemPath :: MonadIO m => SystemPath -> m () ensureSystemPath = resolve >=> liftIO . createDirectoryIfMissing True
123
ensureSystemPath = resolve >=> liftIO . createDirectoryIfMissing True
71
false
true
0
8
18
38
18
20
null
null
erikstenlund/lisp-parser
lisp.hs
mit
parseString = do char '"' string <- many (noneOf "\"") char '"' return $ String string
134
parseString = do char '"' string <- many (noneOf "\"") char '"' return $ String string
134
parseString = do char '"' string <- many (noneOf "\"") char '"' return $ String string
134
false
false
0
10
63
44
18
26
null
null
kranich/haste-compiler
src/Haste/AST/Optimize.hs
bsd-3-clause
-- | How many times does an expression satisfying the given predicate occur in -- an AST (including jumps)? occurrences :: JSTrav ast => (ASTNode -> Bool) -> (ASTNode -> Bool) -> ast -> TravM Occs occurrences tr p ast = foldJS trav count Never ast where trav n node = tr node && n < Lots -- Stop traversal if we're already >1. count n node | p node = pure $ n + Once count n _ = pure n -- | Inline assignments where the assignee is only ever used once. -- Does not inline anything into a shared code path, as that would break -- things horribly. -- Ignores LhsExp assignments, since we only introduce those when we actually -- care about the assignment side effect.
754
occurrences :: JSTrav ast => (ASTNode -> Bool) -> (ASTNode -> Bool) -> ast -> TravM Occs occurrences tr p ast = foldJS trav count Never ast where trav n node = tr node && n < Lots -- Stop traversal if we're already >1. count n node | p node = pure $ n + Once count n _ = pure n -- | Inline assignments where the assignee is only ever used once. -- Does not inline anything into a shared code path, as that would break -- things horribly. -- Ignores LhsExp assignments, since we only introduce those when we actually -- care about the assignment side effect.
644
occurrences tr p ast = foldJS trav count Never ast where trav n node = tr node && n < Lots -- Stop traversal if we're already >1. count n node | p node = pure $ n + Once count n _ = pure n -- | Inline assignments where the assignee is only ever used once. -- Does not inline anything into a shared code path, as that would break -- things horribly. -- Ignores LhsExp assignments, since we only introduce those when we actually -- care about the assignment side effect.
507
true
true
3
10
218
150
69
81
null
null
forestbelton/orb
app/Main.hs
bsd-3-clause
build :: FilePath -> IO [DisplayCommand] build = fmap (layoutNode . styleNode . parseDOM) . readFile
100
build :: FilePath -> IO [DisplayCommand] build = fmap (layoutNode . styleNode . parseDOM) . readFile
100
build = fmap (layoutNode . styleNode . parseDOM) . readFile
59
false
true
0
9
15
39
20
19
null
null
aedanlombardo/HaskellPS
DSP-PBE/Tests/TestUtils.hs
bsd-3-clause
makePairs [] = []
17
makePairs [] = []
17
makePairs [] = []
17
false
false
0
5
3
14
6
8
null
null
jwaldmann/ersatz-minisatapi
examples/knight.hs
gpl-3.0
reaches h p q = let (px,py) = divMod p h ; (qx,qy) = divMod q h in 5 == (px - qx)^2 + (py - qy)^2
102
reaches h p q = let (px,py) = divMod p h ; (qx,qy) = divMod q h in 5 == (px - qx)^2 + (py - qy)^2
102
reaches h p q = let (px,py) = divMod p h ; (qx,qy) = divMod q h in 5 == (px - qx)^2 + (py - qy)^2
102
false
false
4
9
31
91
44
47
null
null
tavisrudd/ghcjs-base
JavaScript/TypedArray/DataView.hs
mit
unsafeGetUint16LE idx dv = I.js_i_unsafeGetUint16LE idx dv
58
unsafeGetUint16LE idx dv = I.js_i_unsafeGetUint16LE idx dv
58
unsafeGetUint16LE idx dv = I.js_i_unsafeGetUint16LE idx dv
58
false
false
0
6
6
19
8
11
null
null
gdetrez/haskell-wot
Codec/Archive/Ar.hs
gpl-3.0
getAsciiInt :: Int -> Get Int getAsciiInt l = liftM (read . unpack) (getLazyByteString (fromIntegral l))
104
getAsciiInt :: Int -> Get Int getAsciiInt l = liftM (read . unpack) (getLazyByteString (fromIntegral l))
104
getAsciiInt l = liftM (read . unpack) (getLazyByteString (fromIntegral l))
74
false
true
0
9
15
45
22
23
null
null
RossOgilvie/MathPrelude
MathPrelude/Prelude/Logic.hs
gpl-3.0
xor True False = True
21
xor True False = True
21
xor True False = True
21
false
false
0
5
4
13
5
8
null
null
xich/scotty
Web/Scotty.hs
bsd-3-clause
-- | delete = 'addroute' 'DELETE' delete :: RoutePattern -> ActionM () -> ScottyM () delete = Trans.delete
106
delete :: RoutePattern -> ActionM () -> ScottyM () delete = Trans.delete
72
delete = Trans.delete
21
true
true
0
8
17
32
16
16
null
null
facebookincubator/duckling
Duckling/AmountOfMoney/BG/Corpus.hs
bsd-3-clause
allExamples :: [Example] allExamples = concat [ examples (simple BGN 1) [ "1 лв" , "един лев" , "1 Лев" ] , examples (simple BGN 10) [ "10 лв" , "десет лева" , "10лв" ] , examples (simple BGN 15.50) [ "15лв и 50ст" , "петнадесет лева и петдесет стотинки" , "15 Лв и 50 Ст" ] , examples (simple Dollar 1) [ "$1" , "един долар" , "1 долар" ] , examples (simple Dollar 10) [ "$10" , "$ 10" , "10$" , "10 Долара" , "десет долара" ] , examples (simple Cent 10) [ "10 цента" , "десет пенита" , "десет цента" , "10¢" ] , examples (simple Cent 50) [ "50 ст" , "петдесет стотинки" , "50ст" ] , examples (simple Dollar 1e4) [ "$10К" , "10к$" , "$10,000" ] , examples (simple USD 3.14) [ "USD3.14" , "3.14US$" , "US$ 3.14" ] , examples (simple EUR 20) [ "20\x20ac" , "20 евро" , "20 Евро" , "EUR 20" , "EUR 20.0" , "20€" , "20 €ur" ] , examples (simple Pound 10) [ "\x00a3\&10" , "десет паунда" ] , examples (simple Dollar 20.43) [ "$20 и 43ц" , "$20 43" , "20 долара 43ц" , "20 долара 43 цента" , "двадесет долара 43 цента" , "20 долара 43" , "двадесет долара и 43" ] , examples (simple GBP 3.01) [ "GBP3.01" , "GBP 3.01" , "3 GBP 1 пени" ] , examples (between Dollar (10, 20)) [ "между 10 и 20 долара" , "от 10 до 20 долара" , "около 10-20 долара" , "между 10 и 20 долара" , "около $10-$20" , "10-20 долара" ] , examples (under EUR 7) [ "под седем евро" , "по-малко от 7 Евро" , "под 7€" ] , examples (above Dollar 1.42) [ "над 1 долар и четиридесет и два цента" , "поне $1.42" , "над 1.42 долара" ] ]
2,527
allExamples :: [Example] allExamples = concat [ examples (simple BGN 1) [ "1 лв" , "един лев" , "1 Лев" ] , examples (simple BGN 10) [ "10 лв" , "десет лева" , "10лв" ] , examples (simple BGN 15.50) [ "15лв и 50ст" , "петнадесет лева и петдесет стотинки" , "15 Лв и 50 Ст" ] , examples (simple Dollar 1) [ "$1" , "един долар" , "1 долар" ] , examples (simple Dollar 10) [ "$10" , "$ 10" , "10$" , "10 Долара" , "десет долара" ] , examples (simple Cent 10) [ "10 цента" , "десет пенита" , "десет цента" , "10¢" ] , examples (simple Cent 50) [ "50 ст" , "петдесет стотинки" , "50ст" ] , examples (simple Dollar 1e4) [ "$10К" , "10к$" , "$10,000" ] , examples (simple USD 3.14) [ "USD3.14" , "3.14US$" , "US$ 3.14" ] , examples (simple EUR 20) [ "20\x20ac" , "20 евро" , "20 Евро" , "EUR 20" , "EUR 20.0" , "20€" , "20 €ur" ] , examples (simple Pound 10) [ "\x00a3\&10" , "десет паунда" ] , examples (simple Dollar 20.43) [ "$20 и 43ц" , "$20 43" , "20 долара 43ц" , "20 долара 43 цента" , "двадесет долара 43 цента" , "20 долара 43" , "двадесет долара и 43" ] , examples (simple GBP 3.01) [ "GBP3.01" , "GBP 3.01" , "3 GBP 1 пени" ] , examples (between Dollar (10, 20)) [ "между 10 и 20 долара" , "от 10 до 20 долара" , "около 10-20 долара" , "между 10 и 20 долара" , "около $10-$20" , "10-20 долара" ] , examples (under EUR 7) [ "под седем евро" , "по-малко от 7 Евро" , "под 7€" ] , examples (above Dollar 1.42) [ "над 1 долар и четиридесет и два цента" , "поне $1.42" , "над 1.42 долара" ] ]
2,527
allExamples = concat [ examples (simple BGN 1) [ "1 лв" , "един лев" , "1 Лев" ] , examples (simple BGN 10) [ "10 лв" , "десет лева" , "10лв" ] , examples (simple BGN 15.50) [ "15лв и 50ст" , "петнадесет лева и петдесет стотинки" , "15 Лв и 50 Ст" ] , examples (simple Dollar 1) [ "$1" , "един долар" , "1 долар" ] , examples (simple Dollar 10) [ "$10" , "$ 10" , "10$" , "10 Долара" , "десет долара" ] , examples (simple Cent 10) [ "10 цента" , "десет пенита" , "десет цента" , "10¢" ] , examples (simple Cent 50) [ "50 ст" , "петдесет стотинки" , "50ст" ] , examples (simple Dollar 1e4) [ "$10К" , "10к$" , "$10,000" ] , examples (simple USD 3.14) [ "USD3.14" , "3.14US$" , "US$ 3.14" ] , examples (simple EUR 20) [ "20\x20ac" , "20 евро" , "20 Евро" , "EUR 20" , "EUR 20.0" , "20€" , "20 €ur" ] , examples (simple Pound 10) [ "\x00a3\&10" , "десет паунда" ] , examples (simple Dollar 20.43) [ "$20 и 43ц" , "$20 43" , "20 долара 43ц" , "20 долара 43 цента" , "двадесет долара 43 цента" , "20 долара 43" , "двадесет долара и 43" ] , examples (simple GBP 3.01) [ "GBP3.01" , "GBP 3.01" , "3 GBP 1 пени" ] , examples (between Dollar (10, 20)) [ "между 10 и 20 долара" , "от 10 до 20 долара" , "около 10-20 долара" , "между 10 и 20 долара" , "около $10-$20" , "10-20 долара" ] , examples (under EUR 7) [ "под седем евро" , "по-малко от 7 Евро" , "под 7€" ] , examples (above Dollar 1.42) [ "над 1 долар и четиридесет и два цента" , "поне $1.42" , "над 1.42 долара" ] ]
2,502
false
true
0
10
1,344
469
264
205
null
null
razvan9310/barrelfish
hake/Main.hs
mit
parse_arguments ("--install-dir" : (s : t)) = (parse_arguments t) { opt_installdir = s }
90
parse_arguments ("--install-dir" : (s : t)) = (parse_arguments t) { opt_installdir = s }
90
parse_arguments ("--install-dir" : (s : t)) = (parse_arguments t) { opt_installdir = s }
90
false
false
0
8
15
42
21
21
null
null
seckcoder/vector
Data/Vector/Unboxed.hs
bsd-3-clause
update_ = G.update_
19
update_ = G.update_
19
update_ = G.update_
19
false
false
0
5
2
8
4
4
null
null
psibi/yesod
yesod-core/test/Hierarchy.hs
mit
postLoginR :: Int -> Handler site Text postLoginR i = pack $ "post login: " ++ show i
85
postLoginR :: Int -> Handler site Text postLoginR i = pack $ "post login: " ++ show i
85
postLoginR i = pack $ "post login: " ++ show i
46
false
true
0
6
17
34
16
18
null
null
lostbean/sledge
src/File/InternalParsers.hs
gpl-3.0
parseFloat :: Parser Double parseFloat = parseNumber (signed double <?> "Invalid float number")
95
parseFloat :: Parser Double parseFloat = parseNumber (signed double <?> "Invalid float number")
95
parseFloat = parseNumber (signed double <?> "Invalid float number")
67
false
true
0
8
12
27
13
14
null
null
jpbetz/protolang
haskell/Codegen.hs
apache-2.0
fmul :: Operand -> Operand -> Codegen Operand fmul a b = instr $ FMul a b []
76
fmul :: Operand -> Operand -> Codegen Operand fmul a b = instr $ FMul a b []
76
fmul a b = instr $ FMul a b []
30
false
true
2
8
17
48
20
28
null
null
melted/idris-java
src/IRTS/CodegenJava.hs
bsd-3-clause
-- Constants mkExp pp (SConst c) = ppExp pp $ mkConstant c
60
mkExp pp (SConst c) = ppExp pp $ mkConstant c
47
mkExp pp (SConst c) = ppExp pp $ mkConstant c
47
true
false
2
6
13
31
13
18
null
null
nkaretnikov/hhammer
Hammer.hs
gpl-2.0
p'HParser'backend_data :: Ptr (C'HParser) -> Ptr (Ptr ()) p'HParser'env p = plusPtr p 12
88
p'HParser'backend_data :: Ptr (C'HParser) -> Ptr (Ptr ()) p'HParser'env p = plusPtr p 12
88
p'HParser'env p = plusPtr p 12
30
false
true
0
10
13
46
20
26
null
null
gridaphobe/liquid-fixpoint
src/Language/Fixpoint/Smt/Serialize.hs
bsd-3-clause
smt2App :: LocSymbol -> [Expr] -> T.Text smt2App f es = fromMaybe (smt2App' f ds) (Thy.smt2App f ds) where ds = smt2 <$> es
135
smt2App :: LocSymbol -> [Expr] -> T.Text smt2App f es = fromMaybe (smt2App' f ds) (Thy.smt2App f ds) where ds = smt2 <$> es
135
smt2App f es = fromMaybe (smt2App' f ds) (Thy.smt2App f ds) where ds = smt2 <$> es
94
false
true
3
9
35
75
33
42
null
null
xicesky/sky-haskell-playground
src/Sky/Learn/GHCGenerics.hs
bsd-3-clause
example2 = LiteralABAB True False True False
44
example2 = LiteralABAB True False True False
44
example2 = LiteralABAB True False True False
44
false
false
0
5
6
15
7
8
null
null
peteg/ADHOC
Apps/Cache/Tests/030_cache_bugfinder.hs
gpl-2.0
mem_valP = "mv"
15
mem_valP = "mv"
15
mem_valP = "mv"
15
false
false
0
4
2
6
3
3
null
null
gafiatulin/codewars
src/5 kyu/Anagram.hs
mit
anagrams :: String -> [String] -> [String] anagrams w = filter $ (sort w ==) . sort
83
anagrams :: String -> [String] -> [String] anagrams w = filter $ (sort w ==) . sort
83
anagrams w = filter $ (sort w ==) . sort
40
false
true
2
9
16
50
24
26
null
null
yokto/Updater
Updater/List.hs
apache-2.0
null :: LinkedList a -> IO Bool null (LinkedList list_head) = do first <- readIORef $ nodeNext list_head return $ isNothing $ nodeValue first -- | /O(n)/. Count the number of items in the list.
202
null :: LinkedList a -> IO Bool null (LinkedList list_head) = do first <- readIORef $ nodeNext list_head return $ isNothing $ nodeValue first -- | /O(n)/. Count the number of items in the list.
202
null (LinkedList list_head) = do first <- readIORef $ nodeNext list_head return $ isNothing $ nodeValue first -- | /O(n)/. Count the number of items in the list.
170
false
true
0
9
43
63
28
35
null
null
bos/critbit
Data/CritBit/Tree.hs
bsd-2-clause
-- | /O(n)/. An alias for 'toAscList'. Return all key/value pairs in the map in -- ascending order. -- -- > assocs (fromList [(5,"a"), (3,"b")]) == [(3,"b"), (5,"a")] -- > assocs empty == [] assocs :: CritBit k v -> [(k,v)] assocs m = toAscList m
246
assocs :: CritBit k v -> [(k,v)] assocs m = toAscList m
55
assocs m = toAscList m
22
true
true
0
7
45
40
23
17
null
null
ml9951/ghc
compiler/cmm/Debug.hs
bsd-3-clause
toUnwindExpr (CmmLoad e _) = UwDeref (toUnwindExpr e)
67
toUnwindExpr (CmmLoad e _) = UwDeref (toUnwindExpr e)
67
toUnwindExpr (CmmLoad e _) = UwDeref (toUnwindExpr e)
67
false
false
0
7
21
26
12
14
null
null
sjfloat/bloodhound
src/Database/Bloodhound/Client.hs
bsd-3-clause
scroll' :: (FromJSON a, MonadBH m) => Maybe ScrollId -> m ([Hit a], Maybe ScrollId) scroll' Nothing = return ([], Nothing)
122
scroll' :: (FromJSON a, MonadBH m) => Maybe ScrollId -> m ([Hit a], Maybe ScrollId) scroll' Nothing = return ([], Nothing)
122
scroll' Nothing = return ([], Nothing)
38
false
true
0
10
20
69
34
35
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'VG.unstablePartition' vg_unstablePartition = VG.unstablePartition
70
vg_unstablePartition = VG.unstablePartition
43
vg_unstablePartition = VG.unstablePartition
43
true
false
0
5
4
9
5
4
null
null
dmjio/aeson
src/Data/Aeson/Encoding/Builder.hs
bsd-3-clause
localTime :: LocalTime -> Builder localTime (LocalTime d t) = dayTime d (toTimeOfDay64 t)
89
localTime :: LocalTime -> Builder localTime (LocalTime d t) = dayTime d (toTimeOfDay64 t)
89
localTime (LocalTime d t) = dayTime d (toTimeOfDay64 t)
55
false
true
0
7
13
37
18
19
null
null
bravit/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
doOp v (LSLt (ATInt ITChar)) [l, r] = doOp v (LSLt (ATInt ITNative)) [l, r]
75
doOp v (LSLt (ATInt ITChar)) [l, r] = doOp v (LSLt (ATInt ITNative)) [l, r]
75
doOp v (LSLt (ATInt ITChar)) [l, r] = doOp v (LSLt (ATInt ITNative)) [l, r]
75
false
false
0
9
14
56
29
27
null
null
phylake/avm3
vm/def.hs
mit
toBytes {- 0x71 -} (EscXmlElem) = 1
35
toBytes {- 0x71 -} (EscXmlElem) = 1
35
toBytes {- 0x71 -} (EscXmlElem) = 1
35
false
false
0
5
6
14
7
7
null
null
christiaanb/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
ibc i (IBCObj tgt n) f = return f { ibc_objs = (tgt, n) : ibc_objs f }
70
ibc i (IBCObj tgt n) f = return f { ibc_objs = (tgt, n) : ibc_objs f }
70
ibc i (IBCObj tgt n) f = return f { ibc_objs = (tgt, n) : ibc_objs f }
70
false
false
1
9
17
54
24
30
null
null
yliu120/K3
src/Language/K3/Stages.hs
apache-2.0
transformFixpointD :: ProgramTransformD -> ProgramTransform transformFixpointD f p = do (changed, np) <- f p (if not changed && compareDAST np p then return else transformFixpointD f) np
190
transformFixpointD :: ProgramTransformD -> ProgramTransform transformFixpointD f p = do (changed, np) <- f p (if not changed && compareDAST np p then return else transformFixpointD f) np
190
transformFixpointD f p = do (changed, np) <- f p (if not changed && compareDAST np p then return else transformFixpointD f) np
130
false
true
0
11
31
68
33
35
null
null
fpco/fpco-cereal
src/Data/Serialize/Get.hs
bsd-3-clause
getBytes n = do s <- ensure n let consume = B.unsafeTake n s rest = B.unsafeDrop n s -- (consume,rest) = B.splitAt n s put rest return consume
178
getBytes n = do s <- ensure n let consume = B.unsafeTake n s rest = B.unsafeDrop n s -- (consume,rest) = B.splitAt n s put rest return consume
178
getBytes n = do s <- ensure n let consume = B.unsafeTake n s rest = B.unsafeDrop n s -- (consume,rest) = B.splitAt n s put rest return consume
178
false
false
0
11
64
60
26
34
null
null
brendanhay/gogol
gogol-analytics/gen/Network/Google/Analytics/Types/Product.hs
mpl-2.0
-- | The total number of results for the query, regardless of the number of -- results in the response. pfflTotalResults :: Lens' ProFileFilterLinks (Maybe Int32) pfflTotalResults = lens _pfflTotalResults (\ s a -> s{_pfflTotalResults = a}) . mapping _Coerce
272
pfflTotalResults :: Lens' ProFileFilterLinks (Maybe Int32) pfflTotalResults = lens _pfflTotalResults (\ s a -> s{_pfflTotalResults = a}) . mapping _Coerce
168
pfflTotalResults = lens _pfflTotalResults (\ s a -> s{_pfflTotalResults = a}) . mapping _Coerce
109
true
true
0
10
53
56
29
27
null
null
mydaum/cabal
cabal-testsuite/Test/Cabal/Server.hs
bsd-3-clause
accumulate :: MVar [String] -> String -> IO () accumulate acc msg = modifyMVar_ acc (\msgs -> return (msg:msgs))
116
accumulate :: MVar [String] -> String -> IO () accumulate acc msg = modifyMVar_ acc (\msgs -> return (msg:msgs))
116
accumulate acc msg = modifyMVar_ acc (\msgs -> return (msg:msgs))
69
false
true
0
10
22
58
29
29
null
null
andreagenso/java2scala
src/J2s/Parser.hs
apache-2.0
pDims' = (AGS.sem_Dims_Cons ()) <$ pSpecialSimbol "[" <* pSpecialSimbol "]" <*> pDims' <|> pSucceed AGS.sem_Dims_Nil
122
pDims' = (AGS.sem_Dims_Cons ()) <$ pSpecialSimbol "[" <* pSpecialSimbol "]" <*> pDims' <|> pSucceed AGS.sem_Dims_Nil
122
pDims' = (AGS.sem_Dims_Cons ()) <$ pSpecialSimbol "[" <* pSpecialSimbol "]" <*> pDims' <|> pSucceed AGS.sem_Dims_Nil
122
false
false
4
10
20
50
22
28
null
null
edahlgren/protocol-buffers
Text/ProtocolBuffers/WireMessage.hs
apache-2.0
-- | Used in generated code. wirePutRep :: Wire v => WireTag -> FieldType -> Seq v -> Put wirePutRep wireTag fieldType vs = F.forM_ vs (\v -> wirePutReq wireTag fieldType v)
173
wirePutRep :: Wire v => WireTag -> FieldType -> Seq v -> Put wirePutRep wireTag fieldType vs = F.forM_ vs (\v -> wirePutReq wireTag fieldType v)
144
wirePutRep wireTag fieldType vs = F.forM_ vs (\v -> wirePutReq wireTag fieldType v)
83
true
true
0
10
31
68
32
36
null
null
jgm/pandoc-citeproc
src/Text/CSL/Pandoc.hs
bsd-3-clause
toPath (MetaInlines ils) = Just $ T.unpack $ stringify ils
58
toPath (MetaInlines ils) = Just $ T.unpack $ stringify ils
58
toPath (MetaInlines ils) = Just $ T.unpack $ stringify ils
58
false
false
0
7
9
28
13
15
null
null
JacquesCarette/literate-scientific-software
code/drasil-utils/Utils/Drasil/Sentence.hs
bsd-2-clause
inThe = sentHelper "in the"
29
inThe = sentHelper "in the"
29
inThe = sentHelper "in the"
29
false
false
1
5
6
12
4
8
null
null
naoto-ogawa/h-xproto-mysql
src/DataBase/MySQLX/CRUD.hs
mit
createDelete :: PCll.Collection -- ^ Collection -> PDM.DataModel -- ^ DataModel -> PEx.Expr -- ^ where -> [PS.Scalar] -- ^ bindings -> PL.Limit -- ^ Limit -> [PO.Order] -- ^ Order -> PD.Delete -- ^ Delete Object createDelete col model criteria args lmt orders = PB.defaultValue `setCollection` col `setDataModel` model `setCriteria` criteria -- Expr `setArgs` args -- [Scalar] `setLimit` lmt -- Limit `setOrder` orders
563
createDelete :: PCll.Collection -- ^ Collection -> PDM.DataModel -- ^ DataModel -> PEx.Expr -- ^ where -> [PS.Scalar] -- ^ bindings -> PL.Limit -- ^ Limit -> [PO.Order] -- ^ Order -> PD.Delete createDelete col model criteria args lmt orders = PB.defaultValue `setCollection` col `setDataModel` model `setCriteria` criteria -- Expr `setArgs` args -- [Scalar] `setLimit` lmt -- Limit `setOrder` orders
538
createDelete col model criteria args lmt orders = PB.defaultValue `setCollection` col `setDataModel` model `setCriteria` criteria -- Expr `setArgs` args -- [Scalar] `setLimit` lmt -- Limit `setOrder` orders
264
true
true
2
12
208
118
70
48
null
null
silverweed/ketchup
Ketchup/Utils.hs
mit
statusMsg 501 = "501 Not Implemented"
37
statusMsg 501 = "501 Not Implemented"
37
statusMsg 501 = "501 Not Implemented"
37
false
false
0
5
5
9
4
5
null
null
beni55/cryptol
src/Cryptol/TypeCheck/Unify.hs
bsd-3-clause
bindVar v@(TVBound _ k) t | k == kindOf t = if k == KNum then return (emptySubst, [TVar v =#= t]) else uniError $ UniNonPoly v t | otherwise = uniError $ UniKindMismatch k (kindOf t)
236
bindVar v@(TVBound _ k) t | k == kindOf t = if k == KNum then return (emptySubst, [TVar v =#= t]) else uniError $ UniNonPoly v t | otherwise = uniError $ UniKindMismatch k (kindOf t)
236
bindVar v@(TVBound _ k) t | k == kindOf t = if k == KNum then return (emptySubst, [TVar v =#= t]) else uniError $ UniNonPoly v t | otherwise = uniError $ UniKindMismatch k (kindOf t)
236
false
false
1
11
90
97
48
49
null
null
romanb/amazonka
amazonka-redshift/gen/Network/AWS/Redshift/Types.hs
mpl-2.0
-- | The version ID of the Amazon Redshift engine that is running on the cluster. sClusterVersion :: Lens' Snapshot (Maybe Text) sClusterVersion = lens _sClusterVersion (\s a -> s { _sClusterVersion = a })
205
sClusterVersion :: Lens' Snapshot (Maybe Text) sClusterVersion = lens _sClusterVersion (\s a -> s { _sClusterVersion = a })
123
sClusterVersion = lens _sClusterVersion (\s a -> s { _sClusterVersion = a })
76
true
true
0
9
34
46
25
21
null
null
tjakway/ghcjvm
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
boringCxtNotOk, boringCxtOk :: Bool boringCxtOk = True
57
boringCxtNotOk, boringCxtOk :: Bool boringCxtOk = True
57
boringCxtOk = True
21
false
true
0
4
9
13
8
5
null
null
rgaiacs/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
umlaut 'a' = "ä"
16
umlaut 'a' = "ä"
16
umlaut 'a' = "ä"
16
false
false
0
5
3
9
4
5
null
null
Zomega/thesis
Wurm/INGEST/QuasiVoroni/voroni.hs
mit
csv :: ScatterPlot -> String csv [] = ""
40
csv :: ScatterPlot -> String csv [] = ""
40
csv [] = ""
11
false
true
0
6
8
20
10
10
null
null
mattneary/GenerationY
src/main.hs
mit
black = rgb 0 0 0
17
black = rgb 0 0 0
17
black = rgb 0 0 0
17
false
false
0
5
5
13
6
7
null
null
rodrigosetti/hreddit
src/Main.hs
mit
-- | The full list of commands available for the user redditCommands :: [Command RedditContext IO] redditCommands = [Command 0 "quit" cmdQuit "Exit the program", Command 0 "next" cmdNextPage "Go to next page and list", Command 0 "previous" cmdPreviousPage "Go to previous page and list", Command 0 "first" cmdFirstPage "Go to first page and list", Command 1 "subreddit" cmdSubreddit "Change or show subredit", Command 0 "hot" cmdSortingHot "Go to the \"hot\" sorting", Command 0 "new" cmdSortingNew "Go to the \"new\" sorting", Command 0 "top" cmdSortingTop "Go to the \"top\" sorting", Command 0 "controversial" cmdSortingControversial "Go to the \"controversial\" sorting", Command 1 "help" (cmdHelp redditCommands) "Display help about a command or all commands", Command 1 "page" cmdPageSize "Set or display the current page size", Command 0 "list" cmdList "List current page", Command 1 "open" cmdOpen "Open link ID in default browser" ]
1,613
redditCommands :: [Command RedditContext IO] redditCommands = [Command 0 "quit" cmdQuit "Exit the program", Command 0 "next" cmdNextPage "Go to next page and list", Command 0 "previous" cmdPreviousPage "Go to previous page and list", Command 0 "first" cmdFirstPage "Go to first page and list", Command 1 "subreddit" cmdSubreddit "Change or show subredit", Command 0 "hot" cmdSortingHot "Go to the \"hot\" sorting", Command 0 "new" cmdSortingNew "Go to the \"new\" sorting", Command 0 "top" cmdSortingTop "Go to the \"top\" sorting", Command 0 "controversial" cmdSortingControversial "Go to the \"controversial\" sorting", Command 1 "help" (cmdHelp redditCommands) "Display help about a command or all commands", Command 1 "page" cmdPageSize "Set or display the current page size", Command 0 "list" cmdList "List current page", Command 1 "open" cmdOpen "Open link ID in default browser" ]
1,559
redditCommands = [Command 0 "quit" cmdQuit "Exit the program", Command 0 "next" cmdNextPage "Go to next page and list", Command 0 "previous" cmdPreviousPage "Go to previous page and list", Command 0 "first" cmdFirstPage "Go to first page and list", Command 1 "subreddit" cmdSubreddit "Change or show subredit", Command 0 "hot" cmdSortingHot "Go to the \"hot\" sorting", Command 0 "new" cmdSortingNew "Go to the \"new\" sorting", Command 0 "top" cmdSortingTop "Go to the \"top\" sorting", Command 0 "controversial" cmdSortingControversial "Go to the \"controversial\" sorting", Command 1 "help" (cmdHelp redditCommands) "Display help about a command or all commands", Command 1 "page" cmdPageSize "Set or display the current page size", Command 0 "list" cmdList "List current page", Command 1 "open" cmdOpen "Open link ID in default browser" ]
1,514
true
true
0
8
812
182
92
90
null
null
da-x/autofix-ghc
src/Main.hs
gpl-2.0
parseLine :: forall a. (Num a, Read a) => Text -> a parseLine line = (read $ T.unpack line) - 1
95
parseLine :: forall a. (Num a, Read a) => Text -> a parseLine line = (read $ T.unpack line) - 1
95
parseLine line = (read $ T.unpack line) - 1
43
false
true
0
9
20
60
29
31
null
null
DigitalBrains1/clash-lt24
LT24/Timing.hs
bsd-2-clause
{- - Because of the register that is in front of the ltdin signal, the data is - available after at least the access time plus one additional clock tick to - get through the register. So the minimum low time is the greater of either - tREADAFM + 1 or tReadLFM. Same for the ID timings. -} wReadLFM = max (ticks tReadLFM) (ticks tReadAFM + 1)
346
wReadLFM = max (ticks tReadLFM) (ticks tReadAFM + 1)
52
wReadLFM = max (ticks tReadLFM) (ticks tReadAFM + 1)
52
true
false
0
8
71
28
14
14
null
null
Happstack/ixset
src/Data/IxSet.hs
bsd-3-clause
(@=) :: (Indexable a, Typeable a, Ord a, Typeable k) => IxSet a -> k -> IxSet a ix @= v = getEQ v ix
105
(@=) :: (Indexable a, Typeable a, Ord a, Typeable k) => IxSet a -> k -> IxSet a ix @= v = getEQ v ix
105
ix @= v = getEQ v ix
20
false
true
0
10
29
68
33
35
null
null
adizere/nifty-tree
src/Streamer/Parents.hs
mit
-- | How many microseconds to pause between subsequent parents checks. checkParentsDelay :: Int checkParentsDelay = 1000000
123
checkParentsDelay :: Int checkParentsDelay = 1000000
52
checkParentsDelay = 1000000
27
true
true
0
4
16
12
7
5
null
null
stefanocerruti/haskell-primer-alpha
src/Playground17.hs
bsd-3-clause
first :: Triple a -> a first (Triple x _ _) = x
47
first :: Triple a -> a first (Triple x _ _) = x
47
first (Triple x _ _) = x
24
false
true
0
9
12
37
16
21
null
null
jwiegley/hnix
src/Nix/Expr/Types/Annotated.hs
bsd-3-clause
nHasAttr _ _ = error "nHasAttr: unexpected"
67
nHasAttr _ _ = error "nHasAttr: unexpected"
67
nHasAttr _ _ = error "nHasAttr: unexpected"
67
false
false
1
5
30
14
6
8
null
null
spechub/Hets
THF/StaticAnalysisTHF.hs
gpl-2.0
thfTypedConstToType :: THFTypedConst -> Maybe (Type, Constant) thfTypedConstToType (T0TC_THF_TypedConst_Par tcp) = thfTypedConstToType tcp
138
thfTypedConstToType :: THFTypedConst -> Maybe (Type, Constant) thfTypedConstToType (T0TC_THF_TypedConst_Par tcp) = thfTypedConstToType tcp
138
thfTypedConstToType (T0TC_THF_TypedConst_Par tcp) = thfTypedConstToType tcp
75
false
true
0
7
12
36
18
18
null
null
minoki/LambdaQuest
src/LambdaQuest/SystemFsub/PrettyPrint.hs
bsd-3-clause
prettyPrintTypeP :: Int -> [NameBinding] -> Type -> ShowS prettyPrintTypeP p ctx t = case t of TyPrim PTyInt -> showString "Int" TyPrim PTyReal -> showString "Real" TyPrim PTyBool -> showString "Bool" TyPrim PTyUnit -> showString "Unit" TyTop -> showString "Top" TyArr s t -> showParen (p > 1) $ prettyPrintTypeP 2 ctx s . showString " -> " . prettyPrintTypeP 1 (NAnonymousBind : ctx) t TyRef i _ | i < length ctx -> case ctx !! i of NTyVarBind n -> showString n n -> showString "<invalid type variable reference #" . shows i . showString ": " . shows n . showChar '>' | otherwise -> showString "<invalid type variable reference #" . shows i . showString ", index out of range>" TyAll name TyTop t -> let name' = rename (tyVarNames ctx) name in showParen (p > 0) $ showString "forall " . showString name' . showString ". " . prettyPrintTypeP 0 (NTyVarBind name' : ctx) t TyAll name b t -> let name' = rename (tyVarNames ctx) name in showParen (p > 0) $ showString "forall " . showString name' . showString "<:" . prettyPrintTypeP 1 ctx b . showString ". " . prettyPrintTypeP 0 (NTyVarBind name' : ctx) t
1,245
prettyPrintTypeP :: Int -> [NameBinding] -> Type -> ShowS prettyPrintTypeP p ctx t = case t of TyPrim PTyInt -> showString "Int" TyPrim PTyReal -> showString "Real" TyPrim PTyBool -> showString "Bool" TyPrim PTyUnit -> showString "Unit" TyTop -> showString "Top" TyArr s t -> showParen (p > 1) $ prettyPrintTypeP 2 ctx s . showString " -> " . prettyPrintTypeP 1 (NAnonymousBind : ctx) t TyRef i _ | i < length ctx -> case ctx !! i of NTyVarBind n -> showString n n -> showString "<invalid type variable reference #" . shows i . showString ": " . shows n . showChar '>' | otherwise -> showString "<invalid type variable reference #" . shows i . showString ", index out of range>" TyAll name TyTop t -> let name' = rename (tyVarNames ctx) name in showParen (p > 0) $ showString "forall " . showString name' . showString ". " . prettyPrintTypeP 0 (NTyVarBind name' : ctx) t TyAll name b t -> let name' = rename (tyVarNames ctx) name in showParen (p > 0) $ showString "forall " . showString name' . showString "<:" . prettyPrintTypeP 1 ctx b . showString ". " . prettyPrintTypeP 0 (NTyVarBind name' : ctx) t
1,245
prettyPrintTypeP p ctx t = case t of TyPrim PTyInt -> showString "Int" TyPrim PTyReal -> showString "Real" TyPrim PTyBool -> showString "Bool" TyPrim PTyUnit -> showString "Unit" TyTop -> showString "Top" TyArr s t -> showParen (p > 1) $ prettyPrintTypeP 2 ctx s . showString " -> " . prettyPrintTypeP 1 (NAnonymousBind : ctx) t TyRef i _ | i < length ctx -> case ctx !! i of NTyVarBind n -> showString n n -> showString "<invalid type variable reference #" . shows i . showString ": " . shows n . showChar '>' | otherwise -> showString "<invalid type variable reference #" . shows i . showString ", index out of range>" TyAll name TyTop t -> let name' = rename (tyVarNames ctx) name in showParen (p > 0) $ showString "forall " . showString name' . showString ". " . prettyPrintTypeP 0 (NTyVarBind name' : ctx) t TyAll name b t -> let name' = rename (tyVarNames ctx) name in showParen (p > 0) $ showString "forall " . showString name' . showString "<:" . prettyPrintTypeP 1 ctx b . showString ". " . prettyPrintTypeP 0 (NTyVarBind name' : ctx) t
1,187
false
true
0
18
346
450
204
246
null
null
expipiplus1/vulkan
generate-new/src/Marshal/Scheme.hs
bsd-3-clause
isReturnPtr :: Marshalable a => a -> Bool isReturnPtr p' = case type' p' of Ptr NonConst _ -> True _ -> False -- | Get all the @a@s which are sized with this name
180
isReturnPtr :: Marshalable a => a -> Bool isReturnPtr p' = case type' p' of Ptr NonConst _ -> True _ -> False -- | Get all the @a@s which are sized with this name
180
isReturnPtr p' = case type' p' of Ptr NonConst _ -> True _ -> False -- | Get all the @a@s which are sized with this name
138
false
true
3
6
52
48
24
24
null
null
jcsaenzcarrasco/MPhil-thesis
frwFS.hs
mit
-- ~~~~~~~~~~ Auxiliary functions vertices :: GraphFRW -> [Vertex] vertices g = range (limitsG g)
99
vertices :: GraphFRW -> [Vertex] vertices g = range (limitsG g)
63
vertices g = range (limitsG g)
30
true
true
0
8
16
37
17
20
null
null
xtendo-org/positron
library/Positron.hs
apache-2.0
model :: String -> [Column] -> Q [Dec] model tableName plainColumns = do columns <- mapM (analyze tableName) plainColumns thisModuleStr <- show <$> thisModule addTable thisModuleStr (tableName, [(acn, a) | a@AC{..} <- columns]) let recs = for columns $ \ac@AC{..} -> ( mkName acFullName , Bang NoSourceUnpackedness SourceStrict , columnTypeCon ac ) condDecs <- fmap fold <$> forM columns $ \ AC{..} -> let condName = mkName $ acFullName ++ "EqParam" in do defAST <- [| Condition acn Parameter |] return [ SigD condName $ ConT ''Condition , ValD (VarP condName) (NormalB defAST) [] ] return $ DataD [] dataName [] Nothing [RecC dataName recs] [DerivClause Nothing [ConT ''Eq, ConT ''Show]] : condDecs where dataName = mkName tableName
915
model :: String -> [Column] -> Q [Dec] model tableName plainColumns = do columns <- mapM (analyze tableName) plainColumns thisModuleStr <- show <$> thisModule addTable thisModuleStr (tableName, [(acn, a) | a@AC{..} <- columns]) let recs = for columns $ \ac@AC{..} -> ( mkName acFullName , Bang NoSourceUnpackedness SourceStrict , columnTypeCon ac ) condDecs <- fmap fold <$> forM columns $ \ AC{..} -> let condName = mkName $ acFullName ++ "EqParam" in do defAST <- [| Condition acn Parameter |] return [ SigD condName $ ConT ''Condition , ValD (VarP condName) (NormalB defAST) [] ] return $ DataD [] dataName [] Nothing [RecC dataName recs] [DerivClause Nothing [ConT ''Eq, ConT ''Show]] : condDecs where dataName = mkName tableName
915
model tableName plainColumns = do columns <- mapM (analyze tableName) plainColumns thisModuleStr <- show <$> thisModule addTable thisModuleStr (tableName, [(acn, a) | a@AC{..} <- columns]) let recs = for columns $ \ac@AC{..} -> ( mkName acFullName , Bang NoSourceUnpackedness SourceStrict , columnTypeCon ac ) condDecs <- fmap fold <$> forM columns $ \ AC{..} -> let condName = mkName $ acFullName ++ "EqParam" in do defAST <- [| Condition acn Parameter |] return [ SigD condName $ ConT ''Condition , ValD (VarP condName) (NormalB defAST) [] ] return $ DataD [] dataName [] Nothing [RecC dataName recs] [DerivClause Nothing [ConT ''Eq, ConT ''Show]] : condDecs where dataName = mkName tableName
876
false
true
0
18
299
329
162
167
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/book/2014-Alejandro_Serrano_Mena-Beginning_Haskell/old/code/src/C05.hs
unlicense
sumForce2 :: [Integer] -> Integer sumForce2 xs = sumForce' xs 0 where sumForce' [] z = z sumForce' (y:ys) z = sumForce' ys $! (z+y) -- sumForce [1 .. 1000000000] -- sumForce2 [1 .. 1000000000] ------------------------------------------------------------------------------ -- bang patterns - p. 121 -- !y : make sure following addition is NOT given a thunk. -- !s : make addition happen at each step (instead of building a thunk)
446
sumForce2 :: [Integer] -> Integer sumForce2 xs = sumForce' xs 0 where sumForce' [] z = z sumForce' (y:ys) z = sumForce' ys $! (z+y) -- sumForce [1 .. 1000000000] -- sumForce2 [1 .. 1000000000] ------------------------------------------------------------------------------ -- bang patterns - p. 121 -- !y : make sure following addition is NOT given a thunk. -- !s : make addition happen at each step (instead of building a thunk)
446
sumForce2 xs = sumForce' xs 0 where sumForce' [] z = z sumForce' (y:ys) z = sumForce' ys $! (z+y) -- sumForce [1 .. 1000000000] -- sumForce2 [1 .. 1000000000] ------------------------------------------------------------------------------ -- bang patterns - p. 121 -- !y : make sure following addition is NOT given a thunk. -- !s : make addition happen at each step (instead of building a thunk)
412
false
true
1
8
85
77
42
35
null
null
MostAwesomeDude/lollerskates
Lol/Constraints.hs
bsd-2-clause
health :: Comparator health = csHealth . iCoreStats
51
health :: Comparator health = csHealth . iCoreStats
51
health = csHealth . iCoreStats
30
false
true
0
5
7
15
8
7
null
null
mydaum/cabal
cabal-testsuite/Test/Cabal/Monad.hs
bsd-3-clause
------------------------------------------------------------------------ -- * Directories -- | The absolute path to the root of the package directory; it's -- where the Cabal file lives. This is what you want the CWD of cabal -- calls to be. testCurrentDir :: TestEnv -> FilePath testCurrentDir env = (if testHaveSourceCopy env then testSourceCopyDir env else testSourceDir env) </> testRelativeCurrentDir env
431
testCurrentDir :: TestEnv -> FilePath testCurrentDir env = (if testHaveSourceCopy env then testSourceCopyDir env else testSourceDir env) </> testRelativeCurrentDir env
187
testCurrentDir env = (if testHaveSourceCopy env then testSourceCopyDir env else testSourceDir env) </> testRelativeCurrentDir env
149
true
true
0
8
77
50
27
23
null
null
cnc-patch/disass
src/Language/Assembly/X86/Parse.hs
bsd-3-clause
parseESC 0xda = do modrm <- anyWord8 let modrm' :: Word8 modrm' = modrm - 0xc0 if modrm <= 0xbf then do (op1, op2, mod, reg, rm) <- parseAddress32' OPNONE modrm return $ Instr (ops !! fromIntegral reg) OPNONE [op1] else if (modrm < 0xe0) then return $ Instr (ops' !! fromIntegral ((modrm' `shiftR` 3))) OPNONE [OpFPReg 0, OpFPReg (fromIntegral (modrm .&. 0x0f))] else case modrm of 0xe1 -> return $ Instr FUCOMPP OPNONE [] _ -> parseInvalidOpcode 0xda where ops = [FIADD, FIMUL, FICOM, FICOMP, FISUB, FISUBR, FIDIV, FIDIVR] ops' = [FCMOVB, FCMOVE, FCMOVBE, FCMOVU]
724
parseESC 0xda = do modrm <- anyWord8 let modrm' :: Word8 modrm' = modrm - 0xc0 if modrm <= 0xbf then do (op1, op2, mod, reg, rm) <- parseAddress32' OPNONE modrm return $ Instr (ops !! fromIntegral reg) OPNONE [op1] else if (modrm < 0xe0) then return $ Instr (ops' !! fromIntegral ((modrm' `shiftR` 3))) OPNONE [OpFPReg 0, OpFPReg (fromIntegral (modrm .&. 0x0f))] else case modrm of 0xe1 -> return $ Instr FUCOMPP OPNONE [] _ -> parseInvalidOpcode 0xda where ops = [FIADD, FIMUL, FICOM, FICOMP, FISUB, FISUBR, FIDIV, FIDIVR] ops' = [FCMOVB, FCMOVE, FCMOVBE, FCMOVU]
724
parseESC 0xda = do modrm <- anyWord8 let modrm' :: Word8 modrm' = modrm - 0xc0 if modrm <= 0xbf then do (op1, op2, mod, reg, rm) <- parseAddress32' OPNONE modrm return $ Instr (ops !! fromIntegral reg) OPNONE [op1] else if (modrm < 0xe0) then return $ Instr (ops' !! fromIntegral ((modrm' `shiftR` 3))) OPNONE [OpFPReg 0, OpFPReg (fromIntegral (modrm .&. 0x0f))] else case modrm of 0xe1 -> return $ Instr FUCOMPP OPNONE [] _ -> parseInvalidOpcode 0xda where ops = [FIADD, FIMUL, FICOM, FICOMP, FISUB, FISUBR, FIDIV, FIDIVR] ops' = [FCMOVB, FCMOVE, FCMOVBE, FCMOVU]
724
false
false
1
16
255
259
138
121
null
null
nevrenato/Hets_Fork
Isabelle/IsaImport.hs
gpl-2.0
hXmlTypeDecl2IsaTypeDecl :: TypeDecl -> [IsaSign.DomainEntry] hXmlTypeDecl2IsaTypeDecl (TypeDecl _ rs) = let recmap = foldl (\m (RecType ra vs _) -> Map.insert ((read (recTypeI ra))::Int) ((if length (recTypeVsToString vs) > 0 then (recTypeVsToString vs) ++ " " else "") ++ (recTypeName ra)) m) Map.empty rs where recTypeVsToString (Vars vs) = intercalate " " (map (\v -> case v of Vars_DtTFree f -> dtTFreeS f _ -> "") vs) in map (hXmlRecType2IsaTypeDecl recmap) rs
701
hXmlTypeDecl2IsaTypeDecl :: TypeDecl -> [IsaSign.DomainEntry] hXmlTypeDecl2IsaTypeDecl (TypeDecl _ rs) = let recmap = foldl (\m (RecType ra vs _) -> Map.insert ((read (recTypeI ra))::Int) ((if length (recTypeVsToString vs) > 0 then (recTypeVsToString vs) ++ " " else "") ++ (recTypeName ra)) m) Map.empty rs where recTypeVsToString (Vars vs) = intercalate " " (map (\v -> case v of Vars_DtTFree f -> dtTFreeS f _ -> "") vs) in map (hXmlRecType2IsaTypeDecl recmap) rs
701
hXmlTypeDecl2IsaTypeDecl (TypeDecl _ rs) = let recmap = foldl (\m (RecType ra vs _) -> Map.insert ((read (recTypeI ra))::Int) ((if length (recTypeVsToString vs) > 0 then (recTypeVsToString vs) ++ " " else "") ++ (recTypeName ra)) m) Map.empty rs where recTypeVsToString (Vars vs) = intercalate " " (map (\v -> case v of Vars_DtTFree f -> dtTFreeS f _ -> "") vs) in map (hXmlRecType2IsaTypeDecl recmap) rs
639
false
true
0
20
306
215
109
106
null
null
geophf/1HaskellADay
exercises/HAD/Y2020/M11/D17/Solution.hs
mit
samp :: ByteString samp = BL.concat ["{\"country\":\"http://www.wikidata.org/entity/Q31\"", ",\"countryLabel\":\"Belgium\",\"capital\":\"http://www.wikidata.org/", "entity/Q239\",\"capitalLabel\":\"Brussels\",\"latlongLabel\":\"Point", "(4.351666666 50.846666666)\"}"]
289
samp :: ByteString samp = BL.concat ["{\"country\":\"http://www.wikidata.org/entity/Q31\"", ",\"countryLabel\":\"Belgium\",\"capital\":\"http://www.wikidata.org/", "entity/Q239\",\"capitalLabel\":\"Brussels\",\"latlongLabel\":\"Point", "(4.351666666 50.846666666)\"}"]
289
samp = BL.concat ["{\"country\":\"http://www.wikidata.org/entity/Q31\"", ",\"countryLabel\":\"Belgium\",\"capital\":\"http://www.wikidata.org/", "entity/Q239\",\"capitalLabel\":\"Brussels\",\"latlongLabel\":\"Point", "(4.351666666 50.846666666)\"}"]
270
false
true
0
6
31
28
16
12
null
null
shayan-najd/HsParser
Ctype.hs
gpl-3.0
cLower = 16
12
cLower = 16
12
cLower = 16
12
false
false
1
5
3
10
3
7
null
null
nushio3/ghc
compiler/basicTypes/RdrName.hs
bsd-3-clause
rdrNameOcc (Exact name) = nameOccName name
42
rdrNameOcc (Exact name) = nameOccName name
42
rdrNameOcc (Exact name) = nameOccName name
42
false
false
0
7
5
18
8
10
null
null
badp/ganeti
src/Ganeti/Constants.hs
gpl-2.0
htKvmSpiceValidLossyImgComprOptions :: FrozenSet String htKvmSpiceValidLossyImgComprOptions = ConstantUtils.mkSet [htKvmSpiceLossyImgComprAlways, htKvmSpiceLossyImgComprAuto, htKvmSpiceLossyImgComprNever]
252
htKvmSpiceValidLossyImgComprOptions :: FrozenSet String htKvmSpiceValidLossyImgComprOptions = ConstantUtils.mkSet [htKvmSpiceLossyImgComprAlways, htKvmSpiceLossyImgComprAuto, htKvmSpiceLossyImgComprNever]
252
htKvmSpiceValidLossyImgComprOptions = ConstantUtils.mkSet [htKvmSpiceLossyImgComprAlways, htKvmSpiceLossyImgComprAuto, htKvmSpiceLossyImgComprNever]
196
false
true
0
6
57
28
15
13
null
null
alexandersgreen/qio-haskell
QIO/QExamples.hs
bsd-2-clause
obsU (False,True) eq = (unot eq)
37
bobsU (False,True) eq = (unot eq)
37
bobsU (False,True) eq = (unot eq)
37
false
false
1
7
10
26
12
14
null
null
icyfork/shellcheck
ShellCheck/Parser.hs
gpl-3.0
g_CLOBBER = tryToken ">|" T_CLOBBER
35
g_CLOBBER = tryToken ">|" T_CLOBBER
35
g_CLOBBER = tryToken ">|" T_CLOBBER
35
false
false
0
5
4
11
5
6
null
null
sdiehl/ghc
compiler/basicTypes/Literal.hs
bsd-3-clause
absent_lits :: UniqFM Literal absent_lits = listToUFM [ (addrPrimTyConKey, LitNullAddr) , (charPrimTyConKey, LitChar 'x') , (intPrimTyConKey, mkLitIntUnchecked 0) , (int64PrimTyConKey, mkLitInt64Unchecked 0) , (wordPrimTyConKey, mkLitWordUnchecked 0) , (word64PrimTyConKey, mkLitWord64Unchecked 0) , (floatPrimTyConKey, LitFloat 0) , (doublePrimTyConKey, LitDouble 0) ]
580
absent_lits :: UniqFM Literal absent_lits = listToUFM [ (addrPrimTyConKey, LitNullAddr) , (charPrimTyConKey, LitChar 'x') , (intPrimTyConKey, mkLitIntUnchecked 0) , (int64PrimTyConKey, mkLitInt64Unchecked 0) , (wordPrimTyConKey, mkLitWordUnchecked 0) , (word64PrimTyConKey, mkLitWord64Unchecked 0) , (floatPrimTyConKey, LitFloat 0) , (doublePrimTyConKey, LitDouble 0) ]
580
absent_lits = listToUFM [ (addrPrimTyConKey, LitNullAddr) , (charPrimTyConKey, LitChar 'x') , (intPrimTyConKey, mkLitIntUnchecked 0) , (int64PrimTyConKey, mkLitInt64Unchecked 0) , (wordPrimTyConKey, mkLitWordUnchecked 0) , (word64PrimTyConKey, mkLitWord64Unchecked 0) , (floatPrimTyConKey, LitFloat 0) , (doublePrimTyConKey, LitDouble 0) ]
550
false
true
0
8
249
116
64
52
null
null
DataStewardshipPortal/ds-elixir-cz
Server/app/PageGenerator.hs
apache-2.0
renderTabs :: Html renderTabs = H.ul ! A.class_ "nav mainNav" $ do H.li ! A.id "tab_100" $ H.a ! A.onclick "Haste['toVision']()" $ "Vision" H.li ! A.id "tab_200" $ H.a ! A.onclick "Haste['toAction']()" $ "Action steps" H.li ! A.id "tab_300" $ H.a ! A.onclick "Haste['toLifecycle']()" $ "Lifecycle" H.li ! A.id "tab_400" $ H.a ! A.onclick "Haste['toData']()" $ "Data" H.li ! A.id "tab_500" $ H.a ! A.onclick "Haste['toRoles']()" $ "Roles" H.li ! A.id "tab_600" $ H.a ! A.onclick "Haste['toMQuestionnaire']()" $ "Managerial Questionnaire" H.li ! A.id "tab_700" $ H.a ! A.onclick "Haste['toTQuestionnaire']()" $ "Technical Questionnaire"
648
renderTabs :: Html renderTabs = H.ul ! A.class_ "nav mainNav" $ do H.li ! A.id "tab_100" $ H.a ! A.onclick "Haste['toVision']()" $ "Vision" H.li ! A.id "tab_200" $ H.a ! A.onclick "Haste['toAction']()" $ "Action steps" H.li ! A.id "tab_300" $ H.a ! A.onclick "Haste['toLifecycle']()" $ "Lifecycle" H.li ! A.id "tab_400" $ H.a ! A.onclick "Haste['toData']()" $ "Data" H.li ! A.id "tab_500" $ H.a ! A.onclick "Haste['toRoles']()" $ "Roles" H.li ! A.id "tab_600" $ H.a ! A.onclick "Haste['toMQuestionnaire']()" $ "Managerial Questionnaire" H.li ! A.id "tab_700" $ H.a ! A.onclick "Haste['toTQuestionnaire']()" $ "Technical Questionnaire"
648
renderTabs = H.ul ! A.class_ "nav mainNav" $ do H.li ! A.id "tab_100" $ H.a ! A.onclick "Haste['toVision']()" $ "Vision" H.li ! A.id "tab_200" $ H.a ! A.onclick "Haste['toAction']()" $ "Action steps" H.li ! A.id "tab_300" $ H.a ! A.onclick "Haste['toLifecycle']()" $ "Lifecycle" H.li ! A.id "tab_400" $ H.a ! A.onclick "Haste['toData']()" $ "Data" H.li ! A.id "tab_500" $ H.a ! A.onclick "Haste['toRoles']()" $ "Roles" H.li ! A.id "tab_600" $ H.a ! A.onclick "Haste['toMQuestionnaire']()" $ "Managerial Questionnaire" H.li ! A.id "tab_700" $ H.a ! A.onclick "Haste['toTQuestionnaire']()" $ "Technical Questionnaire"
629
false
true
0
13
105
257
118
139
null
null
gtk2hs/gi-gtk-hs
src/Data/GI/Gtk/ModelView/ForestStore.hs
lgpl-2.1
-- | Insert a single node into the store. -- -- * This function inserts a single node without children into the tree. -- Its arguments are similar to those of 'forestStoreInsert'. -- forestStoreInsert :: MonadIO m => ForestStore a -- ^ the store -> TreePath -- ^ @path@ - the position of the parent -> Int -- ^ @pos@ - the index of the new tree -> a -- ^ the value to be inserted -> m () forestStoreInsert store path pos node = forestStoreInsertForest store path pos [Node node []]
511
forestStoreInsert :: MonadIO m => ForestStore a -- ^ the store -> TreePath -- ^ @path@ - the position of the parent -> Int -- ^ @pos@ - the index of the new tree -> a -- ^ the value to be inserted -> m () forestStoreInsert store path pos node = forestStoreInsertForest store path pos [Node node []]
326
forestStoreInsert store path pos node = forestStoreInsertForest store path pos [Node node []]
95
true
true
0
12
121
85
43
42
null
null
allanderek/ipclib
Language/Hydra/Syntax.hs
gpl-2.0
arseSolutionMethod _ = error "Invalid solution method"
68
parseSolutionMethod _ = error "Invalid solution method"
68
parseSolutionMethod _ = error "Invalid solution method"
68
false
false
0
5
20
12
5
7
null
null
rawlep/EQS
sourceCode/GlobalParameters.hs
mit
hPanedArea w1 w2 n = do lr <- doublePanedArea w1 w2 True n case lr of Left hpane -> return hpane _ -> fail "no right pane" -- vertical panes --vPanedArea :: G.Frame -> G.Frame -> Int -> IO (G.VPaned)
236
hPanedArea w1 w2 n = do lr <- doublePanedArea w1 w2 True n case lr of Left hpane -> return hpane _ -> fail "no right pane" -- vertical panes --vPanedArea :: G.Frame -> G.Frame -> Int -> IO (G.VPaned)
236
hPanedArea w1 w2 n = do lr <- doublePanedArea w1 w2 True n case lr of Left hpane -> return hpane _ -> fail "no right pane" -- vertical panes --vPanedArea :: G.Frame -> G.Frame -> Int -> IO (G.VPaned)
236
false
false
1
11
76
65
27
38
null
null
qrilka/xlsx
src/Codec/Xlsx/Types/ConditionalFormatting.hs
mit
conditionData (ColorScale2 minv minc maxv maxc) = ( "colorScale" , M.empty , [ NodeElement $ elementListSimple "colorScale" [ toElement "cfvo" minv , toElement "cfvo" maxv , toElement "color" minc , toElement "color" maxc ] ])
290
conditionData (ColorScale2 minv minc maxv maxc) = ( "colorScale" , M.empty , [ NodeElement $ elementListSimple "colorScale" [ toElement "cfvo" minv , toElement "cfvo" maxv , toElement "color" minc , toElement "color" maxc ] ])
290
conditionData (ColorScale2 minv minc maxv maxc) = ( "colorScale" , M.empty , [ NodeElement $ elementListSimple "colorScale" [ toElement "cfvo" minv , toElement "cfvo" maxv , toElement "color" minc , toElement "color" maxc ] ])
290
false
false
0
10
98
77
39
38
null
null
ocean0yohsuke/Simply-Typed-Lambda
src/Lambda/DataType/Expr.hs
bsd-3-clause
appseq xs = APPSeq xs Nothing
29
appseq xs = APPSeq xs Nothing
29
appseq xs = APPSeq xs Nothing
29
false
false
0
5
5
14
6
8
null
null
coolhacks/scripts-hacks
examples/shellcheck-master/ShellCheck/ASTLib.hs
mit
isGlob (T_Glob {}) = True
25
isGlob (T_Glob {}) = True
25
isGlob (T_Glob {}) = True
25
false
false
0
7
4
16
8
8
null
null
pushkinma/frag
src/Game.hs
gpl-2.0
game' :: IL Object -> BSPMap -> SF (GameInput, IL ObjOutput) (IL ObjOutput) game' objs bspmap = dpSwitch (route bspmap) objs (noEvent --> arr killOrSpawn) (\ sfs' f -> game' (f sfs') bspmap)
204
game' :: IL Object -> BSPMap -> SF (GameInput, IL ObjOutput) (IL ObjOutput) game' objs bspmap = dpSwitch (route bspmap) objs (noEvent --> arr killOrSpawn) (\ sfs' f -> game' (f sfs') bspmap)
204
game' objs bspmap = dpSwitch (route bspmap) objs (noEvent --> arr killOrSpawn) (\ sfs' f -> game' (f sfs') bspmap)
122
false
true
0
10
46
93
46
47
null
null
Ferdinand-vW/Wlp-verification-engine
src/Verification.hs
gpl-3.0
permutations xs = xs : L.nub [ zs | (x,ys) <- selections xs, zs <- permutations ys ]
84
permutations xs = xs : L.nub [ zs | (x,ys) <- selections xs, zs <- permutations ys ]
84
permutations xs = xs : L.nub [ zs | (x,ys) <- selections xs, zs <- permutations ys ]
84
false
false
3
9
17
53
24
29
null
null
ctford/Idris-Elba-dev
src/IRTS/CodegenJava.hs
bsd-3-clause
mkMethodCallClosure :: Name -> [LVar] -> CodeGeneration Exp mkMethodCallClosure name args = (\ name args -> closure (call name args)) <$> mangleFull name <*> mapM (Nothing <>@!) args
188
mkMethodCallClosure :: Name -> [LVar] -> CodeGeneration Exp mkMethodCallClosure name args = (\ name args -> closure (call name args)) <$> mangleFull name <*> mapM (Nothing <>@!) args
188
mkMethodCallClosure name args = (\ name args -> closure (call name args)) <$> mangleFull name <*> mapM (Nothing <>@!) args
128
false
true
5
9
33
75
38
37
null
null
brendanhay/gogol
gogol-slides/gen/Network/Google/Slides/Types/Product.hs
mpl-2.0
-- | Properties and contents of each cell. Cells that span multiple columns -- are represented only once with a column_span greater than 1. As a -- result, the length of this collection does not always match the number -- of columns of the entire table. trTableCells :: Lens' TableRow [TableCell] trTableCells = lens _trTableCells (\ s a -> s{_trTableCells = a}) . _Default . _Coerce
397
trTableCells :: Lens' TableRow [TableCell] trTableCells = lens _trTableCells (\ s a -> s{_trTableCells = a}) . _Default . _Coerce
143
trTableCells = lens _trTableCells (\ s a -> s{_trTableCells = a}) . _Default . _Coerce
100
true
true
0
11
79
56
31
25
null
null
kim/amazonka
amazonka-s3/gen/Network/AWS/S3/GetObject.hs
mpl-2.0
-- | Provides information about object restoration operation and expiration time -- of the restored object copy. gorRestore :: Lens' GetObjectResponse (Maybe Text) gorRestore = lens _gorRestore (\s a -> s { _gorRestore = a })
225
gorRestore :: Lens' GetObjectResponse (Maybe Text) gorRestore = lens _gorRestore (\s a -> s { _gorRestore = a })
112
gorRestore = lens _gorRestore (\s a -> s { _gorRestore = a })
61
true
true
0
9
35
47
26
21
null
null
doctau/garbagehat
Main.hs
epl-1.0
report :: ([Event] -> IO ()) -> String -> IO () report f filename = do input <- readFile filename case (parseInput filename input) of Left err -> putStrLn $ show err Right events -> f events
202
report :: ([Event] -> IO ()) -> String -> IO () report f filename = do input <- readFile filename case (parseInput filename input) of Left err -> putStrLn $ show err Right events -> f events
202
report f filename = do input <- readFile filename case (parseInput filename input) of Left err -> putStrLn $ show err Right events -> f events
154
false
true
0
11
48
97
45
52
null
null
kyren/hsgb
lib/Gameboy/Instructions.hs
unlicense
encodeInstruction (RES_B_R Bit5 ARegister) = [0xcb, 0xaf]
57
encodeInstruction (RES_B_R Bit5 ARegister) = [0xcb, 0xaf]
57
encodeInstruction (RES_B_R Bit5 ARegister) = [0xcb, 0xaf]
57
false
false
0
6
6
24
12
12
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/topic/random/hc-random/src/Lib.hs
unlicense
(r1,g2) = randomR (1::Int, 6::Int) g1
37
(r1,g2) = randomR (1::Int, 6::Int) g1
37
(r1,g2) = randomR (1::Int, 6::Int) g1
37
false
false
0
6
5
30
17
13
null
null
Fuuzetsu/hcore
src/Core/Parser.hs
bsd-3-clause
pDefns :: Parser [(Name, CoreExpr)] pDefns = pOneOrMoreWithSep pDefn (pLit ";")
79
pDefns :: Parser [(Name, CoreExpr)] pDefns = pOneOrMoreWithSep pDefn (pLit ";")
79
pDefns = pOneOrMoreWithSep pDefn (pLit ";")
43
false
true
0
7
10
34
18
16
null
null
Hi-Angel/yi
yi-core/src/Yi/Misc.hs
gpl-2.0
rot13Char :: Char -> Char rot13Char = onCharLetterCode (+13)
60
rot13Char :: Char -> Char rot13Char = onCharLetterCode (+13)
60
rot13Char = onCharLetterCode (+13)
34
false
true
0
6
8
22
12
10
null
null
contivero/hasmin
src/Hasmin/Parser/Primitives.hs
bsd-3-clause
-- nmchar: [_a-z0-9-]|{nonascii}|{escape} nmchar :: Parser Builder nmchar = B.singleton <$> A.satisfy cond <|> escape where cond x = C.isAlphaNum x || x == '_' || x == '-' || (not . C.isAscii) x -- | \<integer\> data type parser, but into a String instead of an Int, for other -- parsers to use (e.g.: see the parsers int, or rational)
352
nmchar :: Parser Builder nmchar = B.singleton <$> A.satisfy cond <|> escape where cond x = C.isAlphaNum x || x == '_' || x == '-' || (not . C.isAscii) x -- | \<integer\> data type parser, but into a String instead of an Int, for other -- parsers to use (e.g.: see the parsers int, or rational)
310
nmchar = B.singleton <$> A.satisfy cond <|> escape where cond x = C.isAlphaNum x || x == '_' || x == '-' || (not . C.isAscii) x -- | \<integer\> data type parser, but into a String instead of an Int, for other -- parsers to use (e.g.: see the parsers int, or rational)
285
true
true
0
11
77
79
40
39
null
null
ganeti/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- * Opportunistic allocator usage -- | Time delay in seconds between repeated opportunistic instance creations. -- Rather than failing with an informative error message if the opportunistic -- creation cannot grab enough nodes, for some uses it is better to retry the -- creation with an interval between attempts. This is a reasonable default. defaultOpportunisticRetryInterval :: Int defaultOpportunisticRetryInterval = 30
426
defaultOpportunisticRetryInterval :: Int defaultOpportunisticRetryInterval = 30
79
defaultOpportunisticRetryInterval = 30
38
true
true
0
4
61
16
11
5
null
null
google/codeworld
codeworld-base/src/Extras/Colors.hs
apache-2.0
byName ("turquoise") = colorNamed' ("#40e0d0")
46
byName ("turquoise") = colorNamed' ("#40e0d0")
46
byName ("turquoise") = colorNamed' ("#40e0d0")
46
false
false
0
6
4
18
9
9
null
null
HIPERFIT/futhark
src/Futhark/IR/Prop/Aliases.hs
isc
basicOpAliases Concat {} = [mempty]
35
basicOpAliases Concat {} = [mempty]
35
basicOpAliases Concat {} = [mempty]
35
false
false
0
5
4
17
8
9
null
null