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
mboes/hs-asn1
encoding/Data/ASN1/Prim.hs
bsd-3-clause
encodePrimitiveData o = error ("not a primitive " ++ show o)
78
encodePrimitiveData o = error ("not a primitive " ++ show o)
78
encodePrimitiveData o = error ("not a primitive " ++ show o)
78
false
false
0
8
28
22
10
12
null
null
alanz/htelehash
src/Network/TeleHash/Utils.hs
bsd-3-clause
get_str_from_value _ _ = Nothing
32
get_str_from_value _ _ = Nothing
32
get_str_from_value _ _ = Nothing
32
false
false
0
5
4
11
5
6
null
null
acowley/language-c
src/Language/C/Parser/Tokens.hs
bsd-3-clause
posLenOfTok (CTokShiftL pos ) = pos
38
posLenOfTok (CTokShiftL pos ) = pos
38
posLenOfTok (CTokShiftL pos ) = pos
38
false
false
0
6
8
16
7
9
null
null
yjwen/hada
test/TestJobGraph.hs
lgpl-3.0
initJG = vertexTodo 0
21
initJG = vertexTodo 0
21
initJG = vertexTodo 0
21
false
false
0
5
3
9
4
5
null
null
bb010g/aura
aura/lib/Aura/Languages.hs
gpl-3.0
reportUnneededPackages_1 :: Language -> Doc AnsiStyle reportUnneededPackages_1 = \case Japanese -> "下記のパッケージは既にインストールされています:" Polish -> "Następujące pakiety zostały już zainstalowane:" Portuguese -> "Os seguintes pacotes já estão instalados:" Russian -> "Следующие пакеты уже установлены:" I...
787
reportUnneededPackages_1 :: Language -> Doc AnsiStyle reportUnneededPackages_1 = \case Japanese -> "下記のパッケージは既にインストールされています:" Polish -> "Następujące pakiety zostały już zainstalowane:" Portuguese -> "Os seguintes pacotes já estão instalados:" Russian -> "Следующие пакеты уже установлены:" I...
787
reportUnneededPackages_1 = \case Japanese -> "下記のパッケージは既にインストールされています:" Polish -> "Następujące pakiety zostały już zainstalowane:" Portuguese -> "Os seguintes pacotes já estão instalados:" Russian -> "Следующие пакеты уже установлены:" Italian -> "I seguenti pacchetti sono già stati inst...
733
false
true
12
6
178
115
46
69
null
null
ruicc/haskell-protocol-buffers
Text/ProtocolBuffers/WireMessage.hs
apache-2.0
-- | Used in generated code. wirePutPacked :: Wire v => WireTag -> FieldType -> Seq v -> Put wirePutPacked wireTag fieldType vs = do putVarUInt (getWireTag wireTag) let size = F.foldl' (\n v -> n + wireSize fieldType v) 0 vs putSize size F.forM_ vs (\v -> wirePut fieldType v)
286
wirePutPacked :: Wire v => WireTag -> FieldType -> Seq v -> Put wirePutPacked wireTag fieldType vs = do putVarUInt (getWireTag wireTag) let size = F.foldl' (\n v -> n + wireSize fieldType v) 0 vs putSize size F.forM_ vs (\v -> wirePut fieldType v)
257
wirePutPacked wireTag fieldType vs = do putVarUInt (getWireTag wireTag) let size = F.foldl' (\n v -> n + wireSize fieldType v) 0 vs putSize size F.forM_ vs (\v -> wirePut fieldType v)
193
true
true
0
14
60
124
57
67
null
null
chadbrewbaker/combinat
Math/Combinat/Partitions/Integer.hs
bsd-3-clause
dualPartition xs@(k:_) = [ length $ filter (>=i) xs | i <- [1..k] ]
68
_dualPartition xs@(k:_) = [ length $ filter (>=i) xs | i <- [1..k] ]
68
_dualPartition xs@(k:_) = [ length $ filter (>=i) xs | i <- [1..k] ]
68
false
false
0
8
14
48
26
22
null
null
danidiaz/lens
src/Control/Lens/Fold.hs
bsd-3-clause
-- | A variant of 'foldlOf'' that has no base case and thus may only be applied -- to folds and structures such that the fold views at least one element of -- the structure. -- -- @ -- 'foldl1Of'' l f ≡ 'Data.List.foldl1'' f '.' 'toListOf' l -- @ -- -- @ -- 'foldl1Of'' :: 'Getter' s a -> (a -> a -> a) -> s -> a -- ...
804
foldl1Of' :: Getting (Endo (Endo (Maybe a))) s a -> (a -> a -> a) -> s -> a foldl1Of' l f xs = fromMaybe (error "foldl1Of': empty structure") (foldlOf' l mf Nothing xs) where mf Nothing y = Just $! y mf (Just x) y = Just $! f x y
234
foldl1Of' l f xs = fromMaybe (error "foldl1Of': empty structure") (foldlOf' l mf Nothing xs) where mf Nothing y = Just $! y mf (Just x) y = Just $! f x y
158
true
true
0
12
212
144
79
65
null
null
kylcarte/qclib
src/.Db.hs
bsd-3-clause
fldULogin = "login"
21
fldULogin = "login"
21
fldULogin = "login"
21
false
false
0
4
4
6
3
3
null
null
tom-szczarkowski/matasano-crypto-puzzles-solutions
set5/RSA.hs
mit
newRsaPrimes k e = do p <- cryptoRandomPrime k q <- cryptoRandomPrime k if (p-1)*(q-1) `mod` e == 0 then newRsaPrimes k e else return (p,q)
153
newRsaPrimes k e = do p <- cryptoRandomPrime k q <- cryptoRandomPrime k if (p-1)*(q-1) `mod` e == 0 then newRsaPrimes k e else return (p,q)
153
newRsaPrimes k e = do p <- cryptoRandomPrime k q <- cryptoRandomPrime k if (p-1)*(q-1) `mod` e == 0 then newRsaPrimes k e else return (p,q)
153
false
false
0
12
39
84
42
42
null
null
adizere/nifty-tree
src/Streamer/SessionManager/ParallelPull.hs
mit
pullThreadFunc :: C.Chan PullTask -- input channel -> STC.TChan PullTask -- output channel -> IO () pullThreadFunc iC oC = forever $ do C.readChan iC >>= (\task -> executePullTask task >>= (\mSeqNr -> if isJust mSeqNr then do ...
1,274
pullThreadFunc :: C.Chan PullTask -- input channel -> STC.TChan PullTask -- output channel -> IO () pullThreadFunc iC oC = forever $ do C.readChan iC >>= (\task -> executePullTask task >>= (\mSeqNr -> if isJust mSeqNr then do ...
1,274
pullThreadFunc iC oC = forever $ do C.readChan iC >>= (\task -> executePullTask task >>= (\mSeqNr -> if isJust mSeqNr then do deliverSeqNr (fromJust mSeqNr) atomically $ STC.writeTChan oC (okT task) ...
1,152
false
true
0
17
420
281
144
137
null
null
JacquesCarette/literate-scientific-software
code/drasil-printers/Language/Drasil/Printing/Import.hs
bsd-2-clause
neg' (Int _) = True
32
neg' (Int _) = True
32
neg' (Int _) = True
32
false
false
0
6
17
16
7
9
null
null
fmapfmapfmap/amazonka
amazonka-efs/gen/Network/AWS/EFS/Types/Product.hs
mpl-2.0
-- | The file system ID assigned by Amazon EFS. fsdFileSystemId :: Lens' FileSystemDescription Text fsdFileSystemId = lens _fsdFileSystemId (\ s a -> s{_fsdFileSystemId = a})
174
fsdFileSystemId :: Lens' FileSystemDescription Text fsdFileSystemId = lens _fsdFileSystemId (\ s a -> s{_fsdFileSystemId = a})
126
fsdFileSystemId = lens _fsdFileSystemId (\ s a -> s{_fsdFileSystemId = a})
74
true
true
1
9
25
43
22
21
null
null
phischu/fragnix
tests/packages/scotty/Data.Aeson.Encoding.Builder.hs
bsd-3-clause
-- | Encode a JSON value to a "Data.ByteString" 'B.Builder'. -- -- Use this function if you are encoding over the wire, or need to -- prepend or append further bytes to the encoded JSON value. encodeToBuilder :: Value -> Builder encodeToBuilder Null = null_
263
encodeToBuilder :: Value -> Builder encodeToBuilder Null = null_
70
encodeToBuilder Null = null_
34
true
true
0
5
50
22
13
9
null
null
raichoo/Idris-dev
src/Idris/Core/CaseTree.hs
bsd-3-clause
directUse _ = []
16
directUse _ = []
16
directUse _ = []
16
false
false
0
5
3
12
5
7
null
null
unisonweb/platform
parser-typechecker/src/Unison/Codebase/SqliteCodebase/Conversions.hs
mit
decltype1to2 :: CT.ConstructorType -> V2.Decl.DeclType decltype1to2 = \case CT.Data -> V2.Decl.Data CT.Effect -> V2.Decl.Effect
131
decltype1to2 :: CT.ConstructorType -> V2.Decl.DeclType decltype1to2 = \case CT.Data -> V2.Decl.Data CT.Effect -> V2.Decl.Effect
131
decltype1to2 = \case CT.Data -> V2.Decl.Data CT.Effect -> V2.Decl.Effect
76
false
true
0
8
17
44
24
20
null
null
ellis/OnTopOfThings
old-20150308/old/otot.hs
gpl-3.0
showOptions :: [OptDescr (ShowOptions -> IO ShowOptions)] showOptions = [ Option ['v'] ["verbose"] (NoArg (\opts -> return opts { showOptVerbose = True })) "verbose output" , Option [] ["list"] (NoArg (\opts -> return opts { showOptType = "list" })) "show a new list" , Option ['p'] ["parent"] ...
628
showOptions :: [OptDescr (ShowOptions -> IO ShowOptions)] showOptions = [ Option ['v'] ["verbose"] (NoArg (\opts -> return opts { showOptVerbose = True })) "verbose output" , Option [] ["list"] (NoArg (\opts -> return opts { showOptType = "list" })) "show a new list" , Option ['p'] ["parent"] ...
628
showOptions = [ Option ['v'] ["verbose"] (NoArg (\opts -> return opts { showOptVerbose = True })) "verbose output" , Option [] ["list"] (NoArg (\opts -> return opts { showOptType = "list" })) "show a new list" , Option ['p'] ["parent"] (ReqArg (\uuid opts -> return opts { showOptParent = Just ...
570
false
true
0
17
148
230
122
108
null
null
lifengsun/haskell-exercise
scheme/05/equalparser.hs
gpl-3.0
eval val@(Number _) = return val
32
eval val@(Number _) = return val
32
eval val@(Number _) = return val
32
false
false
0
8
5
21
10
11
null
null
s9gf4ult/yesod
yesod-form/Yesod/Form/Fields.hs
mit
parseDate :: String -> Either FormMessage Day parseDate = maybe (Left MsgInvalidDay) Right . readMay . replace '/' '-'
132
parseDate :: String -> Either FormMessage Day parseDate = maybe (Left MsgInvalidDay) Right . readMay . replace '/' '-'
132
parseDate = maybe (Left MsgInvalidDay) Right . readMay . replace '/' '-'
86
false
true
2
7
32
53
22
31
null
null
formrre/soft-heap-haskell
soft-heap/src/Data/SoftHeap/SHNode.hs
bsd-3-clause
right (Node _ _ _ _ r _)=readSTRef r
36
right (Node _ _ _ _ r _)=readSTRef r
36
right (Node _ _ _ _ r _)=readSTRef r
36
false
false
0
6
8
29
13
16
null
null
ezyang/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
deTagExpr (Type ty) = Type ty
45
deTagExpr (Type ty) = Type ty
45
deTagExpr (Type ty) = Type ty
45
false
false
0
7
21
18
8
10
null
null
dolio/vector
Data/Vector/Storable.hs
bsd-3-clause
filter = G.filter
17
filter = G.filter
17
filter = G.filter
17
false
false
1
6
2
12
4
8
null
null
GaloisInc/ivory
ivory-model-check/test/RingBuffer.hs
bsd-3-clause
bounded :: ANat n => Ix n -> IBool bounded x = x >=? 0 .&& x <=? (fromIntegral $ ixSize x - 1)
94
bounded :: ANat n => Ix n -> IBool bounded x = x >=? 0 .&& x <=? (fromIntegral $ ixSize x - 1)
94
bounded x = x >=? 0 .&& x <=? (fromIntegral $ ixSize x - 1)
59
false
true
8
9
23
68
32
36
null
null
dmbarbour/haskell-vcache
hsrc_lib/Database/VCache/VPutAux.hs
bsd-2-clause
| Store an 8 bit word. putWord8 :: Word8 -> VPut () putWord8 w8 = reserving 1 $ unsafePutWord8 w8 {
100
putWord8 :: Word8 -> VPut () putWord8 w8 = reserving 1 $ unsafePutWord8 w8
74
putWord8 w8 = reserving 1 $ unsafePutWord8 w8
45
true
true
3
8
20
51
23
28
null
null
amerlyq/airy
xmonad/cfg/Control.hs
mit
-- | Get params from current window -- TRY? we could use simply W.tag on w? See src of toggleWS' wkspName = ask >>= (\w -> liftX $ withWindowSet $ \ws -> return $ fromMaybe "" $ W.findTag w ws) :: Query String
209
wkspName = ask >>= (\w -> liftX $ withWindowSet $ \ws -> return $ fromMaybe "" $ W.findTag w ws) :: Query String
112
wkspName = ask >>= (\w -> liftX $ withWindowSet $ \ws -> return $ fromMaybe "" $ W.findTag w ws) :: Query String
112
true
false
0
12
42
57
30
27
null
null
NMouad21/HaskellSamples
Huffman.hs
mit
decode' orgH (Node _ l r) (x:xs) = decode' orgH (if x == '0' then l else r) xs
78
decode' orgH (Node _ l r) (x:xs) = decode' orgH (if x == '0' then l else r) xs
78
decode' orgH (Node _ l r) (x:xs) = decode' orgH (if x == '0' then l else r) xs
78
false
false
0
8
18
56
28
28
null
null
momomimachli/Hedsql
tests/Database/Hedsql/Statements/Select.hs
gpl-3.0
{-| > SELECT * > FROM "People" WHERE "nickNameAsKind" IS NOT DISTINCT FROM "nickNameAsAdult" -} isNotDistinctFromQuery :: Select [[Undefined]] dbVendor isNotDistinctFromQuery = selectPeople |> where_ ("nickNameAsKind" `isNotDistinctFrom` "nickNameAsAdult") |> end
278
isNotDistinctFromQuery :: Select [[Undefined]] dbVendor isNotDistinctFromQuery = selectPeople |> where_ ("nickNameAsKind" `isNotDistinctFrom` "nickNameAsAdult") |> end
182
isNotDistinctFromQuery = selectPeople |> where_ ("nickNameAsKind" `isNotDistinctFrom` "nickNameAsAdult") |> end
126
true
true
5
9
44
53
27
26
null
null
Mokosha/Lambency
lib/Lambency/Loaders/OBJLoader.hs
mit
normTexturedObj2Mesh :: OBJVertexList -> OBJTexCoordList -> OBJNormalList -> OBJFaceList -> Mesh OTVertex3 normTexturedObj2Mesh verts texcoords normals faces = let ns = mkVec3fLookup normals tcs = mkVec2fLookup texcoords vs = mkVec3fLookup verts idx2Vertex :: OBJIndex -> OTVertex3 idx...
501
normTexturedObj2Mesh :: OBJVertexList -> OBJTexCoordList -> OBJNormalList -> OBJFaceList -> Mesh OTVertex3 normTexturedObj2Mesh verts texcoords normals faces = let ns = mkVec3fLookup normals tcs = mkVec2fLookup texcoords vs = mkVec3fLookup verts idx2Vertex :: OBJIndex -> OTVertex3 idx...
501
normTexturedObj2Mesh verts texcoords normals faces = let ns = mkVec3fLookup normals tcs = mkVec2fLookup texcoords vs = mkVec3fLookup verts idx2Vertex :: OBJIndex -> OTVertex3 idx2Vertex (x, Just tc, Just n) = mkNormTexVertex3 (vs x) (ns n) (tcs tc) idx2Vertex i = error $ "Ill formatted OTV3 index: " ++ (sh...
370
false
true
0
11
107
159
78
81
null
null
batterseapower/edit-distance
Text/EditDistance/Bits.hs
bsd-3-clause
levenshteinDistance :: String -> String -> Int levenshteinDistance str1 str2 = levenshteinDistanceWithLengths m n str1 str2 where m = length str1 n = length str2
171
levenshteinDistance :: String -> String -> Int levenshteinDistance str1 str2 = levenshteinDistanceWithLengths m n str1 str2 where m = length str1 n = length str2
171
levenshteinDistance str1 str2 = levenshteinDistanceWithLengths m n str1 str2 where m = length str1 n = length str2
124
false
true
0
6
34
52
25
27
null
null
jamesyang124/haskell-playground
src/Chp94.hs
bsd-3-clause
view :: [String] -> IO () view [fileName] = do contents <- readFile fileName let todoTasks = lines contents numberedTasks = zipWith (\n line -> show n ++ " - " ++ line) [0..] todoTasks putStr $ unlines numberedTasks
235
view :: [String] -> IO () view [fileName] = do contents <- readFile fileName let todoTasks = lines contents numberedTasks = zipWith (\n line -> show n ++ " - " ++ line) [0..] todoTasks putStr $ unlines numberedTasks
235
view [fileName] = do contents <- readFile fileName let todoTasks = lines contents numberedTasks = zipWith (\n line -> show n ++ " - " ++ line) [0..] todoTasks putStr $ unlines numberedTasks
209
false
true
0
15
58
97
47
50
null
null
robertclancy/tapl
lambda/src/LambdaParser.hs
gpl-2.0
parens :: Parser a -> Parser a parens p = do _ <- char '(' r <- p _ <- char ')' return r
130
parens :: Parser a -> Parser a parens p = do _ <- char '(' r <- p _ <- char ')' return r
130
parens p = do _ <- char '(' r <- p _ <- char ')' return r
99
false
true
0
9
65
62
25
37
null
null
brodyberg/Notes
ProjectRosalind.hsproj/LearnHaskell/lib/HaskellBook/MyLinesChapter9.hs
mit
shouldEqual = [ "Tyger, Tyger, burning bright" , "In the forests of the night" , "What immortal hand or eye" , "Could frame thy fearful symmetry?" ]
159
shouldEqual = [ "Tyger, Tyger, burning bright" , "In the forests of the night" , "What immortal hand or eye" , "Could frame thy fearful symmetry?" ]
159
shouldEqual = [ "Tyger, Tyger, burning bright" , "In the forests of the night" , "What immortal hand or eye" , "Could frame thy fearful symmetry?" ]
159
false
false
0
5
37
18
11
7
null
null
lpeterse/koka
src/Type/TypeVar.hs
apache-2.0
{-------------------------------------------------------------------------- Entities with type variables --------------------------------------------------------------------------} -- | Return the free unifiable type variables in a particular order ofuv :: HasOrderedTypeVar a => a -> [TypeVar] ofuv x = filter isMeta...
329
ofuv :: HasOrderedTypeVar a => a -> [TypeVar] ofuv x = filter isMeta (oftv x)
77
ofuv x = filter isMeta (oftv x)
31
true
true
0
7
35
44
22
22
null
null
merijn/GPU-benchmarks
benchmark-analysis/src/Pretty/List.hs
gpl-3.0
toFilter :: forall rec . String -> FieldSpec rec -> Parser [Filter rec] toFilter name field = parseMultiple <|> pure [] where parseMultiple :: Parser [Filter rec] parseMultiple = foldr1 (||.) . map pure <$> some (optParser field) showLower :: Show a => a -> String showLower = map toLower . show ...
1,841
toFilter :: forall rec . String -> FieldSpec rec -> Parser [Filter rec] toFilter name field = parseMultiple <|> pure [] where parseMultiple :: Parser [Filter rec] parseMultiple = foldr1 (||.) . map pure <$> some (optParser field) showLower :: Show a => a -> String showLower = map toLower . show ...
1,841
toFilter name field = parseMultiple <|> pure [] where parseMultiple :: Parser [Filter rec] parseMultiple = foldr1 (||.) . map pure <$> some (optParser field) showLower :: Show a => a -> String showLower = map toLower . show fieldEq :: PersistField v => Field rec v -> v -> Filter rec fieldEq ...
1,769
false
true
19
11
482
731
332
399
null
null
energyflowanalysis/efa-2.1
attic/examples/elementary/vierbein_delta/Main.hs
bsd-3-clause
rec0, rec1 :: Idx.Record rec0 = Idx.Record 0
44
rec0, rec1 :: Idx.Record rec0 = Idx.Record 0
44
rec0 = Idx.Record 0
19
false
true
0
6
7
20
11
9
null
null
phischu/fragnix
tests/packages/scotty/Data.Vector.Unboxed.hs
bsd-3-clause
foldl1' = G.foldl1'
19
foldl1' = G.foldl1'
19
foldl1' = G.foldl1'
19
false
false
1
6
2
12
4
8
null
null
flocc-net/flocc
v0.1/Compiler/Types2/TermBuilder.hs
apache-2.0
varh :: FuncTerm t varh = (Var 7)
33
varh :: FuncTerm t varh = (Var 7)
33
varh = (Var 7)
14
false
true
0
6
7
20
10
10
null
null
fmapfmapfmap/amazonka
amazonka-elasticache/gen/Network/AWS/ElastiCache/Types/Product.hs
mpl-2.0
-- | The duration of the offering. in seconds. rcnoDuration :: Lens' ReservedCacheNodesOffering (Maybe Int) rcnoDuration = lens _rcnoDuration (\ s a -> s{_rcnoDuration = a})
173
rcnoDuration :: Lens' ReservedCacheNodesOffering (Maybe Int) rcnoDuration = lens _rcnoDuration (\ s a -> s{_rcnoDuration = a})
126
rcnoDuration = lens _rcnoDuration (\ s a -> s{_rcnoDuration = a})
65
true
true
0
9
25
46
25
21
null
null
ony/hledger
hledger-lib/Hledger/Query.hs
gpl-3.0
queryDateSpans' (Date2 span) = [span]
37
queryDateSpans' (Date2 span) = [span]
37
queryDateSpans' (Date2 span) = [span]
37
false
false
0
6
4
19
9
10
null
null
awgn/cgrep
src/CGrep/Common.hs
gpl-2.0
trim :: String -> String trim = (dropWhile isSpace . reverse) . dropWhile isSpace . reverse
91
trim :: String -> String trim = (dropWhile isSpace . reverse) . dropWhile isSpace . reverse
91
trim = (dropWhile isSpace . reverse) . dropWhile isSpace . reverse
66
false
true
0
9
15
43
19
24
null
null
mbrock/HBEAM
src/Language/Erlang/BEAM/Emulator.hs
gpl-3.0
advanceSP :: Int -> Emulation () advanceSP n = asks emuProcess >>= \p -> liftIO (modifyIORef (procSP p) (+ n))
110
advanceSP :: Int -> Emulation () advanceSP n = asks emuProcess >>= \p -> liftIO (modifyIORef (procSP p) (+ n))
110
advanceSP n = asks emuProcess >>= \p -> liftIO (modifyIORef (procSP p) (+ n))
77
false
true
0
11
19
56
28
28
null
null
vladimir-ipatov/ganeti
src/Ganeti/HTools/Backend/Text.hs
gpl-2.0
loadNode ktg [name, tm, nm, fm, td, fd, tc, fo, gu, spindles, tags, excl_stor] = loadNode ktg [name, tm, nm, fm, td, fd, tc, fo, gu, spindles, tags, excl_stor, "0"]
196
loadNode ktg [name, tm, nm, fm, td, fd, tc, fo, gu, spindles, tags, excl_stor] = loadNode ktg [name, tm, nm, fm, td, fd, tc, fo, gu, spindles, tags, excl_stor, "0"]
196
loadNode ktg [name, tm, nm, fm, td, fd, tc, fo, gu, spindles, tags, excl_stor] = loadNode ktg [name, tm, nm, fm, td, fd, tc, fo, gu, spindles, tags, excl_stor, "0"]
196
false
false
0
6
61
91
57
34
null
null
shlevy/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
mkGivens :: CtLoc -> [EvId] -> [Ct] mkGivens loc ev_ids = map mk ev_ids where mk ev_id = mkNonCanonical (CtGiven { ctev_evar = ev_id , ctev_pred = evVarPred ev_id , ctev_loc = loc })
268
mkGivens :: CtLoc -> [EvId] -> [Ct] mkGivens loc ev_ids = map mk ev_ids where mk ev_id = mkNonCanonical (CtGiven { ctev_evar = ev_id , ctev_pred = evVarPred ev_id , ctev_loc = loc })
268
mkGivens loc ev_ids = map mk ev_ids where mk ev_id = mkNonCanonical (CtGiven { ctev_evar = ev_id , ctev_pred = evVarPred ev_id , ctev_loc = loc })
232
false
true
1
9
119
85
41
44
null
null
pparkkin/eta
compiler/ETA/BasicTypes/Var.hs
bsd-3-clause
setTcTyVarDetails :: TyVar -> TcTyVarDetails -> TyVar setTcTyVarDetails tv details = tv { tc_tv_details = details }
115
setTcTyVarDetails :: TyVar -> TcTyVarDetails -> TyVar setTcTyVarDetails tv details = tv { tc_tv_details = details }
115
setTcTyVarDetails tv details = tv { tc_tv_details = details }
61
false
true
0
6
16
32
17
15
null
null
s9gf4ult/market
Market/Board/BoardSimulator.hs
bsd-3-clause
runWithPool :: BoardSimulator -> SqlPersistM a -> IO a runWithPool sim action = do let p = bsPool sim runSqlPersistMPool action p -- simulate order execution until specified time
183
runWithPool :: BoardSimulator -> SqlPersistM a -> IO a runWithPool sim action = do let p = bsPool sim runSqlPersistMPool action p -- simulate order execution until specified time
183
runWithPool sim action = do let p = bsPool sim runSqlPersistMPool action p -- simulate order execution until specified time
128
false
true
0
11
33
56
24
32
null
null
obcode/hitlab
library/Pull.hs
bsd-3-clause
pull :: RichConf -> PullOptions -> IO () pull richconf opts = do repoList <- getRemoteRepoList (pullUser opts) (pullHost opts) (pullPort opts) (pullPrefix opts) responses <- mapM (pullRepo opts) repoList putStrLn $ '\n' : ...
2,188
pull :: RichConf -> PullOptions -> IO () pull richconf opts = do repoList <- getRemoteRepoList (pullUser opts) (pullHost opts) (pullPort opts) (pullPrefix opts) responses <- mapM (pullRepo opts) repoList putStrLn $ '\n' : ...
2,188
pull richconf opts = do repoList <- getRemoteRepoList (pullUser opts) (pullHost opts) (pullPort opts) (pullPrefix opts) responses <- mapM (pullRepo opts) repoList putStrLn $ '\n' : stats responses log $ pack $ longstat...
2,147
false
true
4
18
642
706
357
349
null
null
bergmark/clay
src/Clay/Color.hs
bsd-3-clause
(+.) :: Color -> Integer -> Color (+.) (Rgba r g b a) i = Rgba (clamp (r + i)) (clamp (g + i)) (clamp (b + i)) a
112
(+.) :: Color -> Integer -> Color (+.) (Rgba r g b a) i = Rgba (clamp (r + i)) (clamp (g + i)) (clamp (b + i)) a
112
(+.) (Rgba r g b a) i = Rgba (clamp (r + i)) (clamp (g + i)) (clamp (b + i)) a
78
false
true
0
9
28
88
47
41
null
null
skogsbaer/HTF
Test/Framework/HUnitWrapper.hs
lgpl-2.1
-- -- Assertions on Maybe -- assertJust_ :: (HasCallStack, AssertM m) => String -> String -> Maybe a -> m a assertJust_ _ _ (Just x) = return x
144
assertJust_ :: (HasCallStack, AssertM m) => String -> String -> Maybe a -> m a assertJust_ _ _ (Just x) = return x
114
assertJust_ _ _ (Just x) = return x
35
true
true
0
12
29
65
32
33
null
null
jasonbaker/hamt
Data/Hamt.hs
mit
deleteWithMask (KeyValue key value) keyinfo = if (kfKey keyinfo) == key then Empty else KeyValue key value
219
deleteWithMask (KeyValue key value) keyinfo = if (kfKey keyinfo) == key then Empty else KeyValue key value
219
deleteWithMask (KeyValue key value) keyinfo = if (kfKey keyinfo) == key then Empty else KeyValue key value
219
false
false
0
8
129
42
21
21
null
null
vehk/Indoril
src/Bot/Core/Base.hs
bsd-3-clause
delChan c = do cs <- gets chans modify $ \s -> s { chans = delete c cs } -- |Disconnect from IRC with an optional parting message.
147
delChan c = do cs <- gets chans modify $ \s -> s { chans = delete c cs } -- |Disconnect from IRC with an optional parting message.
147
delChan c = do cs <- gets chans modify $ \s -> s { chans = delete c cs } -- |Disconnect from IRC with an optional parting message.
147
false
false
1
12
45
49
22
27
null
null
j-mueller/hldb
webapp/Graphics/Rendering/SVG.hs
bsd-3-clause
renderSeg :: SVGFloat n => Segment Closed V2 n -> AttributeValue renderSeg (Linear (OffsetClosed (V2 x 0))) = P.hR x
116
renderSeg :: SVGFloat n => Segment Closed V2 n -> AttributeValue renderSeg (Linear (OffsetClosed (V2 x 0))) = P.hR x
116
renderSeg (Linear (OffsetClosed (V2 x 0))) = P.hR x
51
false
true
0
11
19
57
27
30
null
null
Zankoku-Okuno/redo
src/Distribution/Redo/Util.hs
bsd-3-clause
swap :: (a, b) -> (b, a) swap (a, b) = (b, a)
45
swap :: (a, b) -> (b, a) swap (a, b) = (b, a)
45
swap (a, b) = (b, a)
20
false
true
0
6
12
46
26
20
null
null
thalerjonathan/phd
thesis/code/concurrent/sugarscape/SugarScapeSTMTArray/src/Renderer.hs
gpl-3.0
transformToWindow :: (Float, Float) -> (Int, Int) -> Discrete2dCoord -> (Float, Float) transformToWindow (rw, rh) (wx, wy) (x, y) = (x', y') where halfXSize = fromRational (toRational wx / 2.0) halfYSize = fromRational (toRational wy / 2.0) ...
457
transformToWindow :: (Float, Float) -> (Int, Int) -> Discrete2dCoord -> (Float, Float) transformToWindow (rw, rh) (wx, wy) (x, y) = (x', y') where halfXSize = fromRational (toRational wx / 2.0) halfYSize = fromRational (toRational wy / 2.0) ...
457
transformToWindow (rw, rh) (wx, wy) (x, y) = (x', y') where halfXSize = fromRational (toRational wx / 2.0) halfYSize = fromRational (toRational wy / 2.0) x' = fromRational (toRational (fromIntegral x * rw)) - halfXSize y' = fromRational (toRational (fromIntegral y * rh)) - halfYSize
302
false
true
0
11
143
167
90
77
null
null
guillep19/uulib
src/UU/PPrint.hs
bsd-3-clause
x <+> y = x <> space <> y
33
x <+> y = x <> space <> y
33
x <+> y = x <> space <> y
33
false
false
5
5
16
23
9
14
null
null
Paow/encore
src/ir/AST/Desugarer.hs
bsd-3-clause
-- If-expressions without else desugar IfThen{emeta, cond, thn} = IfThenElse{emeta ,cond ,thn ,els = Skip (Meta.meta (Meta.sourcePos (cloneMeta emeta))) }
214
desugar IfThen{emeta, cond, thn} = IfThenElse{emeta ,cond ,thn ,els = Skip (Meta.meta (Meta.sourcePos (cloneMeta emeta))) }
183
desugar IfThen{emeta, cond, thn} = IfThenElse{emeta ,cond ,thn ,els = Skip (Meta.meta (Meta.sourcePos (cloneMeta emeta))) }
183
true
false
0
13
79
64
35
29
null
null
alvisespano/Lw
extras/hml-prototype/PPrint.hs
gpl-3.0
string ('\n':s) = line <> string s
34
string ('\n':s) = line <> string s
34
string ('\n':s) = line <> string s
34
false
false
0
7
6
23
11
12
null
null
eriksvedang/Carp
src/StartingEnv.hs
mpl-2.0
-- | A template function for converting pointers to ref (it's up to the user of this function to make sure that is a safe operation). templatePointerToRef = defineTemplate (SymPath ["Pointer"] "to-ref") (FuncTy [(PointerTy (VarTy "p"))] (RefTy (VarTy "p"))) (toTemplate "$p* $NAME ($p *p)") (toTemplate $ unlines...
416
templatePointerToRef = defineTemplate (SymPath ["Pointer"] "to-ref") (FuncTy [(PointerTy (VarTy "p"))] (RefTy (VarTy "p"))) (toTemplate "$p* $NAME ($p *p)") (toTemplate $ unlines ["$DECL {" ," return p;" ,"}"]) (const [])
282
templatePointerToRef = defineTemplate (SymPath ["Pointer"] "to-ref") (FuncTy [(PointerTy (VarTy "p"))] (RefTy (VarTy "p"))) (toTemplate "$p* $NAME ($p *p)") (toTemplate $ unlines ["$DECL {" ," return p;" ,"}"]) (const [])
282
true
false
0
11
115
101
51
50
null
null
ahodgen/archer-calc
tests/TestCommon.hs
bsd-2-clause
circa (Right a) (Right b) = apRound a `shouldBe` apRound b where apRound :: Value -> Double -- XXX: Uncomment below to check for full precision -- apRound (VNum x) = x apRound (VNum x) = fromIntegral (round (x * 100) :: Int) / 100 apRound _ = error "Type inference failure." -- | Test e...
329
circa (Right a) (Right b) = apRound a `shouldBe` apRound b where apRound :: Value -> Double -- XXX: Uncomment below to check for full precision -- apRound (VNum x) = x apRound (VNum x) = fromIntegral (round (x * 100) :: Int) / 100 apRound _ = error "Type inference failure." -- | Test e...
329
circa (Right a) (Right b) = apRound a `shouldBe` apRound b where apRound :: Value -> Double -- XXX: Uncomment below to check for full precision -- apRound (VNum x) = x apRound (VNum x) = fromIntegral (round (x * 100) :: Int) / 100 apRound _ = error "Type inference failure." -- | Test e...
329
false
false
1
10
89
102
50
52
null
null
ribag/ganeti-experiments
src/Ganeti/HTools/Loader.hs
gpl-2.0
-- | In a cluster description, clear dynamic utilisation information. clearDynU :: ClusterData -> Result ClusterData clearDynU cdata@(ClusterData _ _ il _ _) = let il2 = Container.map (\ inst -> inst {Instance.util = zeroUtil }) il in Ok cdata { cdInstances = il2 }
269
clearDynU :: ClusterData -> Result ClusterData clearDynU cdata@(ClusterData _ _ il _ _) = let il2 = Container.map (\ inst -> inst {Instance.util = zeroUtil }) il in Ok cdata { cdInstances = il2 }
199
clearDynU cdata@(ClusterData _ _ il _ _) = let il2 = Container.map (\ inst -> inst {Instance.util = zeroUtil }) il in Ok cdata { cdInstances = il2 }
152
true
true
1
13
48
98
47
51
null
null
urbanslug/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
sTyConKey = mkPreludeTyConUnique 148
36
sTyConKey = mkPreludeTyConUnique 148
36
sTyConKey = mkPreludeTyConUnique 148
36
false
false
0
5
3
9
4
5
null
null
imccoy/utopia
src/Eval.hs
mit
dropTrail :: Trailing t t1 -> t1 dropTrail (Trailing _ v) = v
61
dropTrail :: Trailing t t1 -> t1 dropTrail (Trailing _ v) = v
61
dropTrail (Trailing _ v) = v
28
false
true
0
7
12
31
15
16
null
null
alang9/deque
Data/Deque/NonCat.hs
bsd-3-clause
fixup' :: Level T F F q i j -> Level F F T q i j fixup' l1 = case popL l1 of LGY f1 l2 -> case popL l2 of LGY f2 l3 -> case f1 of RX b1 b2 -> case f2 of YX b3 b4 -> fixup'' b1 b3 l3 b4 b2 GY b3 b4 -> fixup'' b1 b3 l3 b4 b2 GG b3 b4 -> fixup'' b1 b3 l3 b4 b2 XR b1 b2 -> case f2 ...
511
fixup' :: Level T F F q i j -> Level F F T q i j fixup' l1 = case popL l1 of LGY f1 l2 -> case popL l2 of LGY f2 l3 -> case f1 of RX b1 b2 -> case f2 of YX b3 b4 -> fixup'' b1 b3 l3 b4 b2 GY b3 b4 -> fixup'' b1 b3 l3 b4 b2 GG b3 b4 -> fixup'' b1 b3 l3 b4 b2 XR b1 b2 -> case f2 ...
511
fixup' l1 = case popL l1 of LGY f1 l2 -> case popL l2 of LGY f2 l3 -> case f1 of RX b1 b2 -> case f2 of YX b3 b4 -> fixup'' b1 b3 l3 b4 b2 GY b3 b4 -> fixup'' b1 b3 l3 b4 b2 GG b3 b4 -> fixup'' b1 b3 l3 b4 b2 XR b1 b2 -> case f2 of YX b3 b4 -> fixup'' b1 b3 l3 b4 b2 ...
462
false
true
0
17
196
269
123
146
null
null
agocorona/RefSerialize
Data/RefSerialize/Parser.hs
bsd-3-clause
ascii3codes = ["NUL","SOH","STX","ETX","EOT","ENQ","ACK","BEL", "DLE","DC1","DC2","DC3","DC4","NAK","SYN","ETB", "CAN","SUB","ESC","DEL"]
175
ascii3codes = ["NUL","SOH","STX","ETX","EOT","ENQ","ACK","BEL", "DLE","DC1","DC2","DC3","DC4","NAK","SYN","ETB", "CAN","SUB","ESC","DEL"]
175
ascii3codes = ["NUL","SOH","STX","ETX","EOT","ENQ","ACK","BEL", "DLE","DC1","DC2","DC3","DC4","NAK","SYN","ETB", "CAN","SUB","ESC","DEL"]
175
false
false
1
5
42
69
43
26
null
null
kfish/hogg
Codec/Container/Ogg/Chop.hs
bsd-3-clause
findState :: OggPage -> Chop ChopTrackState findState g = do l <- get let t = pageTrack g mSt = find (\x -> ctsTrack x == t) l return $ fromMaybe (newChopTrackState t) mSt -- | Replace a ChopTrackState (only if already existing)
249
findState :: OggPage -> Chop ChopTrackState findState g = do l <- get let t = pageTrack g mSt = find (\x -> ctsTrack x == t) l return $ fromMaybe (newChopTrackState t) mSt -- | Replace a ChopTrackState (only if already existing)
249
findState g = do l <- get let t = pageTrack g mSt = find (\x -> ctsTrack x == t) l return $ fromMaybe (newChopTrackState t) mSt -- | Replace a ChopTrackState (only if already existing)
205
false
true
0
14
63
84
40
44
null
null
ant1441/haskell-statsd
src/Statsd/Datastore.hs
bsd-3-clause
storeMetricsIO :: Datastore -> [Metric] -> IO () storeMetricsIO = mapM_ . storeMetricIO
87
storeMetricsIO :: Datastore -> [Metric] -> IO () storeMetricsIO = mapM_ . storeMetricIO
87
storeMetricsIO = mapM_ . storeMetricIO
38
false
true
1
9
12
38
17
21
null
null
kim/amazonka
amazonka-codedeploy/gen/Network/AWS/CodeDeploy/Types.hs
mpl-2.0
-- | 'DeploymentGroupInfo' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'dgiApplicationName' @::@ 'Maybe' 'Text' -- -- * 'dgiAutoScalingGroups' @::@ ['AutoScalingGroup'] -- -- * 'dgiDeploymentConfigName' @::@ 'Maybe' 'Text' -- -- * 'dgiDeploymentGroupId' @::@ 'Maybe' 'Text' -- -- *...
1,115
deploymentGroupInfo :: DeploymentGroupInfo deploymentGroupInfo = DeploymentGroupInfo { _dgiApplicationName = Nothing , _dgiDeploymentGroupId = Nothing , _dgiDeploymentGroupName = Nothing , _dgiDeploymentConfigName = Nothing , _dgiEc2TagFilters ...
528
deploymentGroupInfo = DeploymentGroupInfo { _dgiApplicationName = Nothing , _dgiDeploymentGroupId = Nothing , _dgiDeploymentGroupName = Nothing , _dgiDeploymentConfigName = Nothing , _dgiEc2TagFilters = mempty , _dgiOnPremisesInstanceTagFil...
485
true
true
0
6
251
89
65
24
null
null
yav/allegro
src/Allegro/Audio.hs
bsd-3-clause
destroySample :: Sample -> IO () destroySample (Sample x) = al_destroy_sample x
79
destroySample :: Sample -> IO () destroySample (Sample x) = al_destroy_sample x
79
destroySample (Sample x) = al_destroy_sample x
46
false
true
0
7
11
32
15
17
null
null
cryptica/slapnet
src/Parser/PNET.hs
gpl-3.0
-- parses a string literal reserved :: String -> Parser () reserved = Token.reserved lexer
94
reserved :: String -> Parser () reserved = Token.reserved lexer
67
reserved = Token.reserved lexer
35
true
true
0
7
18
26
13
13
null
null
bgwines/project-euler
src/solved/problem77.hs
bsd-3-clause
numFormations' n maxPrime = sum . map (\p -> numFormations (n - p) (min p (n - p))) . takeWhile (<= min maxPrime n) $ P.primes
142
numFormations' n maxPrime = sum . map (\p -> numFormations (n - p) (min p (n - p))) . takeWhile (<= min maxPrime n) $ P.primes
142
numFormations' n maxPrime = sum . map (\p -> numFormations (n - p) (min p (n - p))) . takeWhile (<= min maxPrime n) $ P.primes
142
false
false
4
12
41
79
38
41
null
null
sgillespie/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
isTypeHoleCt :: Ct -> Bool isTypeHoleCt (CHoleCan { cc_hole = TypeHole {} }) = True
83
isTypeHoleCt :: Ct -> Bool isTypeHoleCt (CHoleCan { cc_hole = TypeHole {} }) = True
83
isTypeHoleCt (CHoleCan { cc_hole = TypeHole {} }) = True
56
false
true
2
7
14
38
19
19
null
null
dbp/karamaan-opaleye
Karamaan/Opaleye/RunQuery.hs
bsd-3-clause
runQuery :: QueryRunner a b -> Query a -> SQL.Connection -> IO [b] runQuery (QueryRunner u rowParser) q conn = query_ rowParser conn sql where sql :: SQL.Query sql = fromString (showSqlForPostgres u q)
211
runQuery :: QueryRunner a b -> Query a -> SQL.Connection -> IO [b] runQuery (QueryRunner u rowParser) q conn = query_ rowParser conn sql where sql :: SQL.Query sql = fromString (showSqlForPostgres u q)
211
runQuery (QueryRunner u rowParser) q conn = query_ rowParser conn sql where sql :: SQL.Query sql = fromString (showSqlForPostgres u q)
144
false
true
1
9
43
88
42
46
null
null
reactive-systems/syfco
src/lib/Reader/InferType.hs
mit
typeChckP :: Expression -> Expression -> StateT ST (Either Error) () typeChckP x y = do typeCheck x TLtl typeCheck y TPattern -----------------------------------------------------------------------------
211
typeChckP :: Expression -> Expression -> StateT ST (Either Error) () typeChckP x y = do typeCheck x TLtl typeCheck y TPattern -----------------------------------------------------------------------------
210
typeChckP x y = do typeCheck x TLtl typeCheck y TPattern -----------------------------------------------------------------------------
139
false
true
0
9
30
60
27
33
null
null
xixi4Den/BSUIR-Haskell-lw2
src/CsvParser.hs
mit
showResult :: [Int] -> [(String, [(Double, Double)])] -> Reader ProgramOptions (IO ()) showResult indexes results = do opts <- ask if (outPath opts) == "" then return (showOnConsole results indexes) else return (runResourceT $ (CL.sourceList results) $$ CL.map (\x -> BS.pack $ resultToString x +...
389
showResult :: [Int] -> [(String, [(Double, Double)])] -> Reader ProgramOptions (IO ()) showResult indexes results = do opts <- ask if (outPath opts) == "" then return (showOnConsole results indexes) else return (runResourceT $ (CL.sourceList results) $$ CL.map (\x -> BS.pack $ resultToString x +...
389
showResult indexes results = do opts <- ask if (outPath opts) == "" then return (showOnConsole results indexes) else return (runResourceT $ (CL.sourceList results) $$ CL.map (\x -> BS.pack $ resultToString x ++ "\n" ++ (indexesToString indexes)) =$ (CB.sinkFile (outPath opts)))
302
false
true
0
18
76
173
89
84
null
null
owestphal/LootLanguage
src/BasicCategories.hs
bsd-3-clause
talismans = amulets `intersect` baseType "Talisman"
51
talismans = amulets `intersect` baseType "Talisman"
51
talismans = amulets `intersect` baseType "Talisman"
51
false
false
0
6
5
15
8
7
null
null
forsyde/forsyde-atom
src/ForSyDe/Atom/MoC/DE/Hybrid.hs
bsd-3-clause
mbedSY12 syproc de1 = let (ts, sy1) = DE.toSY1 de1 in SY.toDE2 ts >< syproc sy1
106
embedSY12 syproc de1 = let (ts, sy1) = DE.toSY1 de1 in SY.toDE2 ts >< syproc sy1
106
embedSY12 syproc de1 = let (ts, sy1) = DE.toSY1 de1 in SY.toDE2 ts >< syproc sy1
106
false
false
1
10
42
50
21
29
null
null
tylerjl/adventofcode
src/Y2015/D13.hs
mit
rePair ((x,y):xs) = [(x,y),(y,x)] ++ rePair xs
46
rePair ((x,y):xs) = [(x,y),(y,x)] ++ rePair xs
46
rePair ((x,y):xs) = [(x,y),(y,x)] ++ rePair xs
46
false
false
0
8
6
47
27
20
null
null
sol/hakyll
src/Hakyll/Core/Routes.hs
bsd-3-clause
runRoutes :: Routes -> Identifier a -> Maybe FilePath runRoutes = unRoutes
74
runRoutes :: Routes -> Identifier a -> Maybe FilePath runRoutes = unRoutes
74
runRoutes = unRoutes
20
false
true
0
7
11
25
12
13
null
null
spechub/Hets
OWL2/MS2Ship.hs
gpl-2.0
opFrame2Boxes :: Role -> FrameBit -> [RBox] opFrame2Boxes r b = case b of ListFrameBit mr lfb -> opListFrame2Boxes r mr lfb AnnFrameBit _ fb -> case fb of AnnotationFrameBit Declaration -> [RoleDecl r topRT] _ -> []
227
opFrame2Boxes :: Role -> FrameBit -> [RBox] opFrame2Boxes r b = case b of ListFrameBit mr lfb -> opListFrame2Boxes r mr lfb AnnFrameBit _ fb -> case fb of AnnotationFrameBit Declaration -> [RoleDecl r topRT] _ -> []
227
opFrame2Boxes r b = case b of ListFrameBit mr lfb -> opListFrame2Boxes r mr lfb AnnFrameBit _ fb -> case fb of AnnotationFrameBit Declaration -> [RoleDecl r topRT] _ -> []
183
false
true
0
12
49
95
44
51
null
null
nomeata/darcs-mirror-arbtt
src/Data/Conduit/Binary.hs
gpl-2.0
sinkSystemTempFile :: MonadResource m => String -- ^ filename pattern -> ConduitM ByteString o m FilePath sinkSystemTempFile pattern = do dir <- liftIO getTemporaryDirectory sinkTempFile dir pattern -- | Stream the contents of the input to a file, and also send it along the -- pipeline. Similar in ...
372
sinkSystemTempFile :: MonadResource m => String -- ^ filename pattern -> ConduitM ByteString o m FilePath sinkSystemTempFile pattern = do dir <- liftIO getTemporaryDirectory sinkTempFile dir pattern -- | Stream the contents of the input to a file, and also send it along the -- pipeline. Similar in ...
372
sinkSystemTempFile pattern = do dir <- liftIO getTemporaryDirectory sinkTempFile dir pattern -- | Stream the contents of the input to a file, and also send it along the -- pipeline. Similar in concept to the Unix command @tee@. -- -- Since 0.3.0
254
false
true
0
8
78
57
28
29
null
null
qwfy/fsquery
src/System/FSQuery/Parser.hs
mit
genOneOrderBy = do col <- genOneColumn ord <- elements ["asc", "desc"] return $ col ++ " " ++ ord
109
genOneOrderBy = do col <- genOneColumn ord <- elements ["asc", "desc"] return $ col ++ " " ++ ord
109
genOneOrderBy = do col <- genOneColumn ord <- elements ["asc", "desc"] return $ col ++ " " ++ ord
109
false
false
0
9
30
44
21
23
null
null
mimi1vx/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_checkSpacefulness18= verifyNotTree checkSpacefulness "$1 --flags"
70
prop_checkSpacefulness18= verifyNotTree checkSpacefulness "$1 --flags"
70
prop_checkSpacefulness18= verifyNotTree checkSpacefulness "$1 --flags"
70
false
false
0
5
4
11
5
6
null
null
rfranek/duckling
Duckling/Time/DE/Rules.hs
bsd-3-clause
ruleNamedday5 :: Rule ruleNamedday5 = Rule { name = "named-day" , pattern = [ regex "freitags?|fr\\.?" ] , prod = \_ -> tt $ dayOfWeek 5 }
154
ruleNamedday5 :: Rule ruleNamedday5 = Rule { name = "named-day" , pattern = [ regex "freitags?|fr\\.?" ] , prod = \_ -> tt $ dayOfWeek 5 }
154
ruleNamedday5 = Rule { name = "named-day" , pattern = [ regex "freitags?|fr\\.?" ] , prod = \_ -> tt $ dayOfWeek 5 }
132
false
true
0
10
42
53
29
24
null
null
brendanhay/gogol
gogol-containerbuilder/gen/Network/Google/Resource/Cloudbuild/Projects/Locations/WorkerPools/Create.hs
mpl-2.0
-- | OAuth access token. plwpcAccessToken :: Lens' ProjectsLocationsWorkerPoolsCreate (Maybe Text) plwpcAccessToken = lens _plwpcAccessToken (\ s a -> s{_plwpcAccessToken = a})
184
plwpcAccessToken :: Lens' ProjectsLocationsWorkerPoolsCreate (Maybe Text) plwpcAccessToken = lens _plwpcAccessToken (\ s a -> s{_plwpcAccessToken = a})
159
plwpcAccessToken = lens _plwpcAccessToken (\ s a -> s{_plwpcAccessToken = a})
85
true
true
0
9
29
48
25
23
null
null
expipiplus1/vulkan
examples/hlsl/Init.hs
bsd-3-clause
createVMA :: MonadResource m => Instance -> PhysicalDevice -> Device -> m Allocator createVMA inst phys dev = snd <$> withAllocator zero { flags = zero , physicalDevice = physicalDeviceHandle phys , device = deviceHandle dev , inst...
767
createVMA :: MonadResource m => Instance -> PhysicalDevice -> Device -> m Allocator createVMA inst phys dev = snd <$> withAllocator zero { flags = zero , physicalDevice = physicalDeviceHandle phys , device = deviceHandle dev , inst...
767
createVMA inst phys dev = snd <$> withAllocator zero { flags = zero , physicalDevice = physicalDeviceHandle phys , device = deviceHandle dev , instance' = instanceHandle inst , vulkanApiVersion = myApiVersion ...
681
false
true
0
18
308
165
85
80
null
null
imalsogreg/reflex-dom
src/Reflex/Dom/Widget/Basic.hs
bsd-3-clause
workflowView :: forall t m a. MonadWidget t m => Workflow t m a -> m (Event t a) workflowView w0 = do rec eResult <- dyn =<< mapDyn unWorkflow =<< holdDyn w0 eReplace eReplace <- liftM switch $ hold never $ fmap snd eResult return $ fmap fst eResult
259
workflowView :: forall t m a. MonadWidget t m => Workflow t m a -> m (Event t a) workflowView w0 = do rec eResult <- dyn =<< mapDyn unWorkflow =<< holdDyn w0 eReplace eReplace <- liftM switch $ hold never $ fmap snd eResult return $ fmap fst eResult
259
workflowView w0 = do rec eResult <- dyn =<< mapDyn unWorkflow =<< holdDyn w0 eReplace eReplace <- liftM switch $ hold never $ fmap snd eResult return $ fmap fst eResult
178
false
true
0
12
59
116
53
63
null
null
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/EventsRuleInputTransformer.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-events-rule-inputtransformer.html#cfn-events-rule-inputtransformer-inputpathsmap eritInputPathsMap :: Lens' EventsRuleInputTransformer (Maybe Object) eritInputPathsMap = lens _eventsRuleInputTransformerInputPathsMap (\s a -> s { _eventsRu...
358
eritInputPathsMap :: Lens' EventsRuleInputTransformer (Maybe Object) eritInputPathsMap = lens _eventsRuleInputTransformerInputPathsMap (\s a -> s { _eventsRuleInputTransformerInputPathsMap = a })
195
eritInputPathsMap = lens _eventsRuleInputTransformerInputPathsMap (\s a -> s { _eventsRuleInputTransformerInputPathsMap = a })
126
true
true
0
9
21
46
25
21
null
null
GaloisInc/saw-script
saw-core/src/Verifier/SAW/Simulator/Prims.hs
bsd-3-clause
lazyMuxValue :: (HasCallStack, VMonadLazy l, Show (Extra l)) => BasePrims l -> TValue l -> VBool l -> EvalM l (Value l) -> EvalM l (Value l) -> EvalM l (Value l) lazyMuxValue bp tp b x y = case bpAsBool bp b of Just True -> x Just False -> y Nothing -> do x' <- x y' <- y ...
347
lazyMuxValue :: (HasCallStack, VMonadLazy l, Show (Extra l)) => BasePrims l -> TValue l -> VBool l -> EvalM l (Value l) -> EvalM l (Value l) -> EvalM l (Value l) lazyMuxValue bp tp b x y = case bpAsBool bp b of Just True -> x Just False -> y Nothing -> do x' <- x y' <- y ...
347
lazyMuxValue bp tp b x y = case bpAsBool bp b of Just True -> x Just False -> y Nothing -> do x' <- x y' <- y muxValue bp tp b x' y'
171
false
true
0
14
119
175
80
95
null
null
bgaster/blocks
Blocks.hs
mit
loop :: IO UI -> World -> IO () loop tick world = do clearColor $= Color4 0.00 0.1 0.1 1 r <- Blocks.renderer world go camera2D world r where go :: Camera GLfloat -> World -> (GLInfo -> World -> UI -> IO (Maybe World)) -> IO () go c world draw = do ui <- tick clear [ColorBuffer, Dept...
845
loop :: IO UI -> World -> IO () loop tick world = do clearColor $= Color4 0.00 0.1 0.1 1 r <- Blocks.renderer world go camera2D world r where go :: Camera GLfloat -> World -> (GLInfo -> World -> UI -> IO (Maybe World)) -> IO () go c world draw = do ui <- tick clear [ColorBuffer, Dept...
845
loop tick world = do clearColor $= Color4 0.00 0.1 0.1 1 r <- Blocks.renderer world go camera2D world r where go :: Camera GLfloat -> World -> (GLInfo -> World -> UI -> IO (Maybe World)) -> IO () go c world draw = do ui <- tick clear [ColorBuffer, DepthBuffer] let mCam = c...
813
false
true
4
14
300
252
121
131
null
null
choener/RNAfold
BioInf/RNAfold/QuickCheck.hs
gpl-3.0
prop_Combined (Small i, Small j) = fCombined (i,j) == bCombined (i,j)
69
prop_Combined (Small i, Small j) = fCombined (i,j) == bCombined (i,j)
69
prop_Combined (Small i, Small j) = fCombined (i,j) == bCombined (i,j)
69
false
false
0
7
10
43
22
21
null
null
diminishedprime/.org
programmey_stuff/write_yourself_a_scheme/ch_04/hello.hs
mit
escapedChars = [ -- Double Quote '"' -- New Line , 'n' -- Whatever \r is ?? , 'r' -- Tab , 't' -- Backslash ,'\\' ]
137
escapedChars = [ -- Double Quote '"' -- New Line , 'n' -- Whatever \r is ?? , 'r' -- Tab , 't' -- Backslash ,'\\' ]
137
escapedChars = [ -- Double Quote '"' -- New Line , 'n' -- Whatever \r is ?? , 'r' -- Tab , 't' -- Backslash ,'\\' ]
137
false
false
0
5
48
26
18
8
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Parse.hs
bsd-3-clause
inlineP :: Parser LocSymbol inlineP = locParserP binderP
56
inlineP :: Parser LocSymbol inlineP = locParserP binderP
56
inlineP = locParserP binderP
28
false
true
0
5
7
17
8
9
null
null
Heather/Idris-dev
src/Idris/IdrisDoc.hs
bsd-3-clause
extractPTermNames (PIdiom _ p) = extract p
48
extractPTermNames (PIdiom _ p) = extract p
48
extractPTermNames (PIdiom _ p) = extract p
48
false
false
0
6
12
21
9
12
null
null
pparkkin/eta
compiler/ETA/Prelude/PrimOp.hs
bsd-3-clause
tagOf_PrimOp UnsafeFreezeSmallArrayOp = _ILIT(162)
50
tagOf_PrimOp UnsafeFreezeSmallArrayOp = _ILIT(162)
50
tagOf_PrimOp UnsafeFreezeSmallArrayOp = _ILIT(162)
50
false
false
0
6
3
15
7
8
null
null
ganeti/htools
Ganeti/HTools/Loader.hs
gpl-2.0
-- * Functions -- | Lookups a node into an assoc list. lookupNode :: (Monad m) => NameAssoc -> String -> String -> m Ndx lookupNode ktn inst node = case M.lookup node ktn of Nothing -> fail $ "Unknown node '" ++ node ++ "' for instance " ++ inst Just idx -> return idx -- | Lookups an instance into an ...
331
lookupNode :: (Monad m) => NameAssoc -> String -> String -> m Ndx lookupNode ktn inst node = case M.lookup node ktn of Nothing -> fail $ "Unknown node '" ++ node ++ "' for instance " ++ inst Just idx -> return idx -- | Lookups an instance into an assoc list.
275
lookupNode ktn inst node = case M.lookup node ktn of Nothing -> fail $ "Unknown node '" ++ node ++ "' for instance " ++ inst Just idx -> return idx -- | Lookups an instance into an assoc list.
209
true
true
0
11
82
90
45
45
null
null
bryant/haskid
src/Data/HaskID.hs
apache-2.0
decode :: HaskID -> String -> [Int] decode (HaskID alpha separators _ salt guards) encoded = case str_split (`Vec.elem` guards) $ map ord encoded of [_, seed : it, _] -> decode' it $ Vec.cons seed salt [_, seed : it] -> decode' it $ Vec.cons seed salt [seed : it] -> decode' it $ Vec.cons see...
473
decode :: HaskID -> String -> [Int] decode (HaskID alpha separators _ salt guards) encoded = case str_split (`Vec.elem` guards) $ map ord encoded of [_, seed : it, _] -> decode' it $ Vec.cons seed salt [_, seed : it] -> decode' it $ Vec.cons seed salt [seed : it] -> decode' it $ Vec.cons see...
473
decode (HaskID alpha separators _ salt guards) encoded = case str_split (`Vec.elem` guards) $ map ord encoded of [_, seed : it, _] -> decode' it $ Vec.cons seed salt [_, seed : it] -> decode' it $ Vec.cons seed salt [seed : it] -> decode' it $ Vec.cons seed salt _ -> [] where dec...
437
false
true
0
10
148
207
106
101
null
null
bgamari/pipes-vector
Test.hs
bsd-3-clause
main :: IO () main = do -- Extracting elements from a Pipe into a Vector a <- runEffect $ runToVectorP $ each [1..5] >-> toVector :: IO (V.Vector Int) print a -- Pushing elements from a Vector into a Pipe is just a standard -- Pipes for-each loop runEffect $ for (each $ V.enumFromTo 1 5) (lift ...
328
main :: IO () main = do -- Extracting elements from a Pipe into a Vector a <- runEffect $ runToVectorP $ each [1..5] >-> toVector :: IO (V.Vector Int) print a -- Pushing elements from a Vector into a Pipe is just a standard -- Pipes for-each loop runEffect $ for (each $ V.enumFromTo 1 5) (lift ...
328
main = do -- Extracting elements from a Pipe into a Vector a <- runEffect $ runToVectorP $ each [1..5] >-> toVector :: IO (V.Vector Int) print a -- Pushing elements from a Vector into a Pipe is just a standard -- Pipes for-each loop runEffect $ for (each $ V.enumFromTo 1 5) (lift . print)
314
false
true
0
12
84
99
49
50
null
null
laurencer/confluence-sync
src/Confluence/Sync/XmlRpc/Api.hs
bsd-3-clause
logout :: ApiCall Bool logout = invoke "confluence2.logout"
59
logout :: ApiCall Bool logout = invoke "confluence2.logout"
59
logout = invoke "confluence2.logout"
36
false
true
0
5
7
17
8
9
null
null
stepcut/minecraft-data
Minecraft/Combinators.hs
bsd-3-clause
-- | Make a solid arch of radius 'r' and thickness 't'. solidArch :: Int32 -- ^ radius -> Int32 -- ^ thickness -> Blocks solidArch r t = replicate z 1 t $ solidCircle xyPlane r <> wall x (2*r + 1) r
227
solidArch :: Int32 -- ^ radius -> Int32 -- ^ thickness -> Blocks solidArch r t = replicate z 1 t $ solidCircle xyPlane r <> wall x (2*r + 1) r
170
solidArch r t = replicate z 1 t $ solidCircle xyPlane r <> wall x (2*r + 1) r
85
true
true
2
9
72
66
33
33
null
null
cnc-patch/disass
src/Language/Assembly/X86.hs
bsd-3-clause
disassembleBlockWithConfig :: Config -> Ptr Word8 -> Int -> IO (Either ParseError [Instruction]) disassembleBlockWithConfig config ptr len = do l <- toList ptr len 0 [] parseInstructions (configToState config) (reverse l) where toList :: (Ptr Word8) -> Int -> Int -> [Word8] -> IO [Word8] toList ptr len...
576
disassembleBlockWithConfig :: Config -> Ptr Word8 -> Int -> IO (Either ParseError [Instruction]) disassembleBlockWithConfig config ptr len = do l <- toList ptr len 0 [] parseInstructions (configToState config) (reverse l) where toList :: (Ptr Word8) -> Int -> Int -> [Word8] -> IO [Word8] toList ptr len...
576
disassembleBlockWithConfig config ptr len = do l <- toList ptr len 0 [] parseInstructions (configToState config) (reverse l) where toList :: (Ptr Word8) -> Int -> Int -> [Word8] -> IO [Word8] toList ptr len idx acc | idx < len = do p <- peekByteOff ptr idx toList ...
479
false
true
5
11
184
203
98
105
null
null
sifmelcara/pgdl
src/Utils.hs
unlicense
placeTextIntoRectangle :: Int -> -- ^ height Int -> -- ^ width Text -> Text placeTextIntoRectangle h w t | l > w = error "placeTextIntoRectangle: text too long" | otherwise = T.unlines $ replicate (h `div` 2) (T.replicate w " ") ++ [T.concat [T...
544
placeTextIntoRectangle :: Int -> -- ^ height Int -> -- ^ width Text -> Text placeTextIntoRectangle h w t | l > w = error "placeTextIntoRectangle: text too long" | otherwise = T.unlines $ replicate (h `div` 2) (T.replicate w " ") ++ [T.concat [T...
544
placeTextIntoRectangle h w t | l > w = error "placeTextIntoRectangle: text too long" | otherwise = T.unlines $ replicate (h `div` 2) (T.replicate w " ") ++ [T.concat [T.replicate leftspace " ", t, T.replicate rightspace " "]] ++ replicate (h `div` 2) (T.replicate w " ") where l =...
416
false
true
6
11
180
214
103
111
null
null