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
sebastiaanvisser/fixpoints
src/Data/List/Algebras.hs
bsd-3-clause
sum :: Num x => Cata.Algebra (ListF x) (Sum x) sum = foldMap Sum
64
sum :: Num x => Cata.Algebra (ListF x) (Sum x) sum = foldMap Sum
64
sum = foldMap Sum
17
false
true
0
9
13
45
20
25
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/mapM__1.hs
mit
pt :: (a -> b) -> (c -> a) -> c -> b; pt f g x = f (g x)
66
pt :: (a -> b) -> (c -> a) -> c -> b pt f g x = f (g x)
65
pt f g x = f (g x)
18
false
true
0
8
30
54
28
26
null
null
ryuichiueda/ProbabilisticRaspiMouse
pfc/offline_calculation/state_transition/gen_state_trans.hs
mit
--後ろに行く方が優先する one_step_cost = "100"
35
one_step_cost = "100"
21
one_step_cost = "100"
21
true
false
0
4
3
7
4
3
null
null
massysett/penny
genPennyCabal/genPennyCabal.hs
bsd-3-clause
tastyHunit :: Package tastyHunit = atLeast "tasty-hunit" [0,9,2]
64
tastyHunit :: Package tastyHunit = atLeast "tasty-hunit" [0,9,2]
64
tastyHunit = atLeast "tasty-hunit" [0,9,2]
42
false
true
0
6
7
31
15
16
null
null
Blaisorblade/stack
src/Stack/Config.hs
bsd-3-clause
packagesParser :: Parser [String] packagesParser = many (strOption (long "package" <> help "Additional packages that must be installed"))
137
packagesParser :: Parser [String] packagesParser = many (strOption (long "package" <> help "Additional packages that must be installed"))
137
packagesParser = many (strOption (long "package" <> help "Additional packages that must be installed"))
103
false
true
0
10
17
39
19
20
null
null
salamansar/GA-cube
src/EilerGenAlg.hs
mit
isEilerPath :: EilerGraph -> Bool isEilerPath eg = fitnesse eg == (maxEilerFitnesse $ graph eg)
97
isEilerPath :: EilerGraph -> Bool isEilerPath eg = fitnesse eg == (maxEilerFitnesse $ graph eg)
96
isEilerPath eg = fitnesse eg == (maxEilerFitnesse $ graph eg)
62
false
true
0
8
16
35
17
18
null
null
GaloisInc/halvm-ghc
compiler/basicTypes/BasicTypes.hs
bsd-3-clause
tupleSortBoxity UnboxedTuple = Unboxed
41
tupleSortBoxity UnboxedTuple = Unboxed
41
tupleSortBoxity UnboxedTuple = Unboxed
41
false
false
0
4
6
10
4
6
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/book/2014-Alejandro_Serrano_Mena-Beginning_Haskell/old/code/src/C04.hs
unlicense
treeInsert :: TravelGuide -> BinaryTree -> BinaryTree treeInsert t n@(BNode v l r) = case compare t v of EQ -> n LT -> BNode v (treeInsert t l) r GT -> BNode v l (treeInsert t r)
298
treeInsert :: TravelGuide -> BinaryTree -> BinaryTree treeInsert t n@(BNode v l r) = case compare t v of EQ -> n LT -> BNode v (treeInsert t l) r GT -> BNode v l (treeInsert t r)
298
treeInsert t n@(BNode v l r) = case compare t v of EQ -> n LT -> BNode v (treeInsert t l) r GT -> BNode v l (treeInsert t r)
244
false
true
6
7
157
94
47
47
null
null
pbl64k/WatLog
watlog.hs
bsd-2-clause
next :: Interpretation -> Interpretation next (Interpretation step assgn diseq) = Interpretation (succ step) assgn diseq
120
next :: Interpretation -> Interpretation next (Interpretation step assgn diseq) = Interpretation (succ step) assgn diseq
120
next (Interpretation step assgn diseq) = Interpretation (succ step) assgn diseq
79
false
true
0
9
15
46
21
25
null
null
NickAger/LearningHaskell
HaskellProgrammingFromFirstPrinciples/Chapter24/LogFileParser/src/LogFileParser.hs
mit
parseLineWithComment :: Parser String parseLineWithComment = manyTill (noneOf "\n") (many (char ' ') *> string "--") <* parseToNextLineOrEof
140
parseLineWithComment :: Parser String parseLineWithComment = manyTill (noneOf "\n") (many (char ' ') *> string "--") <* parseToNextLineOrEof
140
parseLineWithComment = manyTill (noneOf "\n") (many (char ' ') *> string "--") <* parseToNextLineOrEof
102
false
true
0
11
17
48
23
25
null
null
icyfork/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
-- Get a literal string ignoring all non-literals onlyLiteralString :: Token -> String onlyLiteralString = fromJust . getLiteralStringExt (const $ return "")
157
onlyLiteralString :: Token -> String onlyLiteralString = fromJust . getLiteralStringExt (const $ return "")
107
onlyLiteralString = fromJust . getLiteralStringExt (const $ return "")
70
true
true
1
8
21
40
18
22
null
null
aelve/guide
back/src/Guide/JS.hs
bsd-3-clause
prependData :: JSFunction a => a prependData = makeJSFunction "prependData" ["node"] [text| return function(data) {$(node).prepend(data);}; |]
152
prependData :: JSFunction a => a prependData = makeJSFunction "prependData" ["node"] [text| return function(data) {$(node).prepend(data);}; |]
152
prependData = makeJSFunction "prependData" ["node"] [text| return function(data) {$(node).prepend(data);}; |]
119
false
true
0
6
25
33
18
15
null
null
HuwCampbell/machines
src/Data/Machine/Stack.hs
bsd-3-clause
-- | Push back into the input stream push :: a -> Plan (Stack a) b () push a = awaits (Push a)
94
push :: a -> Plan (Stack a) b () push a = awaits (Push a)
57
push a = awaits (Push a)
24
true
true
0
9
22
47
22
25
null
null
sgillespie/ghc
compiler/basicTypes/DataCon.hs
bsd-3-clause
dataConInstOrigArgTys :: DataCon -- Works for any DataCon -> [Type] -- Includes existential tyvar args, but NOT -- equality constraints or dicts -> [Type] -- For vanilla datacons, it's all quite straightforward -- But for the call in MatchCon, we really do want...
886
dataConInstOrigArgTys :: DataCon -- Works for any DataCon -> [Type] -- Includes existential tyvar args, but NOT -- equality constraints or dicts -> [Type] dataConInstOrigArgTys dc@(MkData {dcOrigArgTys = arg_tys, dcUnivTyVars =...
759
dataConInstOrigArgTys dc@(MkData {dcOrigArgTys = arg_tys, dcUnivTyVars = univ_tvs, dcExTyVars = ex_tvs}) inst_tys = ASSERT2( length tyvars == length inst_tys , text "dataConInstOrigArgTys" <+> ppr dc $$ ppr tyvars $$ ppr inst_tys ) map ...
545
true
true
0
10
261
141
75
66
null
null
ancientlanguage/haskell-analysis
grammar/src/Grammar/Common/Decompose.hs
mit
decomposeChar '\x2F9D0' = "\x8AED"
34
decomposeChar '\x2F9D0' = "\x8AED"
34
decomposeChar '\x2F9D0' = "\x8AED"
34
false
false
0
5
3
9
4
5
null
null
Heather/stack
src/Stack/Build/Cache.hs
bsd-3-clause
writePrecompiledCache :: (MonadThrow m, MonadReader env m, HasEnvConfig env, MonadIO m, MonadLogger m) => BaseConfigOpts -> PackageIdentifier -> ConfigureOpts -> Set GhcPkgId -- ^ dependencies -> Installed -- ^...
1,232
writePrecompiledCache :: (MonadThrow m, MonadReader env m, HasEnvConfig env, MonadIO m, MonadLogger m) => BaseConfigOpts -> PackageIdentifier -> ConfigureOpts -> Set GhcPkgId -- ^ dependencies -> Installed -- ^...
1,232
writePrecompiledCache baseConfigOpts pkgident copts depIDs mghcPkgId exes = do file <- precompiledCacheFile pkgident copts depIDs ensureDir (parent file) mlibpath <- case mghcPkgId of Executable _ -> return Nothing Library _ ipid -> liftM Just $ do ipid' <- pa...
822
false
true
0
17
422
293
140
153
null
null
unknownloner/pagerenc
src/Data/TransmissionParser.hs
mit
spaceConsumer :: Parser () spaceConsumer = Lexer.space (void whitespaceChar) empty empty
90
spaceConsumer :: Parser () spaceConsumer = Lexer.space (void whitespaceChar) empty empty
90
spaceConsumer = Lexer.space (void whitespaceChar) empty empty
63
false
true
0
7
12
37
16
21
null
null
IanConnolly/distributed-process-aws
src/Control/Distributed/Process/Backend/AWS.hs
bsd-3-clause
onVmMain _ _ = error "Invalid arguments passed on onVmMain"
61
onVmMain _ _ = error "Invalid arguments passed on onVmMain"
61
onVmMain _ _ = error "Invalid arguments passed on onVmMain"
61
false
false
0
5
11
14
6
8
null
null
UBMLtonGroup/timberc
src/Core.hs
bsd-3-clause
mustAc (ETempl x tx te c) = True
38
mustAc (ETempl x tx te c) = True
38
mustAc (ETempl x tx te c) = True
38
false
false
0
6
13
22
10
12
null
null
adituv/qbscript
src/Compiler/QbScript/Parser.hs
bsd-3-clause
op :: String -> Parser String op n = (lexeme . try) (string n <* notFollowedBy opChar)
86
op :: String -> Parser String op n = (lexeme . try) (string n <* notFollowedBy opChar)
86
op n = (lexeme . try) (string n <* notFollowedBy opChar)
56
false
true
0
8
16
44
21
23
null
null
Thell/pandoc
src/Text/Pandoc/Writers/Markdown.hs
gpl-2.0
jsonToYaml (String s) = case T.unpack s of x | '\n' `elem` x -> hang 2 ("|" <> cr) $ text x | not (any isPunctuation x) -> text x | otherwise -> text $ "'" ++ substitute "'" "''" x ++ "'"
212
jsonToYaml (String s) = case T.unpack s of x | '\n' `elem` x -> hang 2 ("|" <> cr) $ text x | not (any isPunctuation x) -> text x | otherwise -> text $ "'" ++ substitute "'" "''" x ++ "'"
212
jsonToYaml (String s) = case T.unpack s of x | '\n' `elem` x -> hang 2 ("|" <> cr) $ text x | not (any isPunctuation x) -> text x | otherwise -> text $ "'" ++ substitute "'" "''" x ++ "'"
212
false
false
0
13
67
112
52
60
null
null
urv/fixhs
src/Data/FIX/Spec/FIX42.hs
lgpl-2.1
tClientID :: FIXTag tClientID = FIXTag { tName = "ClientID" , tnum = 109 , tparser = toFIXString , arbitraryValue = FIXString <$> arbitrary }
154
tClientID :: FIXTag tClientID = FIXTag { tName = "ClientID" , tnum = 109 , tparser = toFIXString , arbitraryValue = FIXString <$> arbitrary }
154
tClientID = FIXTag { tName = "ClientID" , tnum = 109 , tparser = toFIXString , arbitraryValue = FIXString <$> arbitrary }
134
false
true
0
8
37
45
26
19
null
null
goalieca/haskelling
020.hs
gpl-3.0
fac n = n * (fac (n-1))
23
fac n = n * (fac (n-1))
23
fac n = n * (fac (n-1))
23
false
false
0
9
6
26
13
13
null
null
gcampax/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
dataClassKey = mkPreludeClassUnique 9
48
dataClassKey = mkPreludeClassUnique 9
48
dataClassKey = mkPreludeClassUnique 9
48
false
false
0
5
14
9
4
5
null
null
yhoshino11/learning_haskell
ch7/Shapes.hs
mit
baseRect :: Float -> Float -> Shape baseRect width height = Rectangle (Point 0 0) (Point width height)
102
baseRect :: Float -> Float -> Shape baseRect width height = Rectangle (Point 0 0) (Point width height)
102
baseRect width height = Rectangle (Point 0 0) (Point width height)
66
false
true
0
7
17
45
22
23
null
null
brendanhay/gogol
gogol-doubleclick-search/gen/Network/Google/DoubleClickSearch/Types/Product.hs
mpl-2.0
-- | The availabilities being returned. uAvailabilities :: Lens' UpdateAvailabilityResponse [Availability] uAvailabilities = lens _uAvailabilities (\ s a -> s{_uAvailabilities = a}) . _Default . _Coerce
222
uAvailabilities :: Lens' UpdateAvailabilityResponse [Availability] uAvailabilities = lens _uAvailabilities (\ s a -> s{_uAvailabilities = a}) . _Default . _Coerce
182
uAvailabilities = lens _uAvailabilities (\ s a -> s{_uAvailabilities = a}) . _Default . _Coerce
115
true
true
0
11
45
53
28
25
null
null
gnn/Hets
GUI/GtkUtils.hs
gpl-2.0
-- | create a window which displays a given question questionDialogExt :: String -- ^ Title -> String -- ^ Message -> IO Bool questionDialogExt title = postGUISync . questionDialog title
224
questionDialogExt :: String -- ^ Title -> String -- ^ Message -> IO Bool questionDialogExt title = postGUISync . questionDialog title
171
questionDialogExt title = postGUISync . questionDialog title
60
true
true
0
7
68
35
18
17
null
null
MortimerMcMire315/grasph
src/Grasph/Graph.hs
gpl-3.0
reverseEdge :: Edge v w c -> Edge v w c reverseEdge e@(Edge (v1,v2) _ _) = e { endpoints=(v2,v1) }
98
reverseEdge :: Edge v w c -> Edge v w c reverseEdge e@(Edge (v1,v2) _ _) = e { endpoints=(v2,v1) }
98
reverseEdge e@(Edge (v1,v2) _ _) = e { endpoints=(v2,v1) }
58
false
true
5
8
20
70
36
34
null
null
kawu/feature-structure
src/NLP/FeatureStructure/AVM.hs
bsd-2-clause
avm :: AVMM i f a b -> T.FN i f a avm m = S.execState (unAVM m) T.empty
71
avm :: AVMM i f a b -> T.FN i f a avm m = S.execState (unAVM m) T.empty
71
avm m = S.execState (unAVM m) T.empty
37
false
true
0
8
18
56
25
31
null
null
shlevy/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
dATA_TYPE_EQUALITY = mkBaseModule (fsLit "Data.Type.Equality")
62
dATA_TYPE_EQUALITY = mkBaseModule (fsLit "Data.Type.Equality")
62
dATA_TYPE_EQUALITY = mkBaseModule (fsLit "Data.Type.Equality")
62
false
false
0
7
4
15
7
8
null
null
jgm/pandoc-highlight
Text/Pandoc/Highlighting.hs
gpl-2.0
highlight :: (FormatOptions -> [SourceLine] -> a) -- ^ Formatter -> Attr -- ^ Attributes of the CodeBlock -> String -- ^ Raw contents of the CodeBlock -> Maybe a -- ^ Maybe the formatted result highlight formatter (_, classes, keyvals) rawCode = let firstNum = case readMay (fromMaybe "...
1,119
highlight :: (FormatOptions -> [SourceLine] -> a) -- ^ Formatter -> Attr -- ^ Attributes of the CodeBlock -> String -- ^ Raw contents of the CodeBlock -> Maybe a highlight formatter (_, classes, keyvals) rawCode = let firstNum = case readMay (fromMaybe "1" $ lookup "startFrom" keyvals)...
1,087
highlight formatter (_, classes, keyvals) rawCode = let firstNum = case readMay (fromMaybe "1" $ lookup "startFrom" keyvals) of Just n -> n Nothing -> 1 fmtOpts = defaultFormatOpts{ startNumber = firstNum, numberLines = any (`elem`...
893
true
true
0
15
421
232
126
106
null
null
nevrenato/Hets_Fork
Common/Lib/Tabular.hs
gpl-2.0
col :: ch -> [a] -> SemiTable ch a col = SemiTable . Header
59
col :: ch -> [a] -> SemiTable ch a col = SemiTable . Header
59
col = SemiTable . Header
24
false
true
0
7
13
31
16
15
null
null
duplode/threepenny-gui
src/Graphics/UI/Threepenny/SVG/Attributes.hs
bsd-3-clause
onmouseup = strAttr "onmouseup"
51
onmouseup = strAttr "onmouseup"
51
onmouseup = strAttr "onmouseup"
51
false
false
1
5
23
12
4
8
null
null
truls/language-vhdl-quote
src/Language/VHDL/Lexer.hs
mpl-2.0
integer :: Parser Integer integer = toInteger . (read :: String -> Integer) <$> number
88
integer :: Parser Integer integer = toInteger . (read :: String -> Integer) <$> number
88
integer = toInteger . (read :: String -> Integer) <$> number
62
false
true
2
7
16
36
17
19
null
null
svenssonjoel/ArrowObsidian
Obsidian/ArrowObsidian/Execute.hs
bsd-3-clause
-- ULGY FIX simple mode f list = do exec where arr' = Arr (\ix -> (Index "input0" [unE ix] undefined)) nInputElements :: Arr DExp arr = readL inputShape arr' -- generate code that does not check bounds kernel = genKernelMT "generated" f' arr res sm t ...
2,448
simple mode f list = do exec where arr' = Arr (\ix -> (Index "input0" [unE ix] undefined)) nInputElements :: Arr DExp arr = readL inputShape arr' -- generate code that does not check bounds kernel = genKernelMT "generated" f' arr res sm t -- or cod...
2,436
simple mode f list = do exec where arr' = Arr (\ix -> (Index "input0" [unE ix] undefined)) nInputElements :: Arr DExp arr = readL inputShape arr' -- generate code that does not check bounds kernel = genKernelMT "generated" f' arr res sm t -- or cod...
2,436
true
false
31
10
956
476
255
221
null
null
tiqwab/md-parser
src/Text/Md/MdParser.hs
bsd-3-clause
pReferenceLink = P.try $ do text <- pEnclosed "[" "]" P.optional spaceChar refId <- pEnclosed "[" "]" return $ ReferenceLink text refId
144
pReferenceLink = P.try $ do text <- pEnclosed "[" "]" P.optional spaceChar refId <- pEnclosed "[" "]" return $ ReferenceLink text refId
144
pReferenceLink = P.try $ do text <- pEnclosed "[" "]" P.optional spaceChar refId <- pEnclosed "[" "]" return $ ReferenceLink text refId
144
false
false
3
9
30
61
24
37
null
null
plietar/super-user-spark
src/Parser.hs
mit
intoDir :: Parser Declaration intoDir = do string keywordInto linespace dir <- directory return $ IntoDir dir <?> "into directory declaration"
162
intoDir :: Parser Declaration intoDir = do string keywordInto linespace dir <- directory return $ IntoDir dir <?> "into directory declaration"
162
intoDir = do string keywordInto linespace dir <- directory return $ IntoDir dir <?> "into directory declaration"
132
false
true
2
8
40
46
19
27
null
null
SAdams601/HaRe
old/testing/unfoldAsPatterns/P3.hs
bsd-3-clause
buildtree :: Ord a => [a] -> BTree a buildtree [] = Empty
57
buildtree :: Ord a => [a] -> BTree a buildtree [] = Empty
57
buildtree [] = Empty
20
false
true
0
7
12
33
16
17
null
null
DavidAlphaFox/darcs
src/Darcs/UI/Commands/Pull.hs
gpl-2.0
fetchPatches :: forall p wR wU . (RepoPatch p, ApplyState p ~ Tree) => AbsolutePath -> [DarcsFlag] -> [String] -> String -> Repository p wR wU wR -> IO (SealedPatchSet p Origin, Sealed ((FL (PatchInfoAnd p) :\/: FL (PatchInfoAnd p)) wR)) fetchPatches o opts un...
2,728
fetchPatches :: forall p wR wU . (RepoPatch p, ApplyState p ~ Tree) => AbsolutePath -> [DarcsFlag] -> [String] -> String -> Repository p wR wU wR -> IO (SealedPatchSet p Origin, Sealed ((FL (PatchInfoAnd p) :\/: FL (PatchInfoAnd p)) wR)) fetchPatches o opts un...
2,728
fetchPatches o opts unfixedrepodirs@(_:_) jobname repository = do here <- getCurrentDirectory repodirs <- (nub . filter (/= here)) `fmap` mapM (fixUrl o) unfixedrepodirs -- Test to make sure we aren't trying to pull from the current repo when (null repodirs) $ fail "Can't pull from current repository!" ...
2,430
false
true
0
21
742
878
428
450
null
null
Alexander-Ignatyev/morpheus
hmatrix-morpheus/test/Numeric/Morpheus/MatrixReduceTest.hs
bsd-3-clause
columnMaxIndicesRM = fromList [0, 2, 3, 3, 2]
45
columnMaxIndicesRM = fromList [0, 2, 3, 3, 2]
45
columnMaxIndicesRM = fromList [0, 2, 3, 3, 2]
45
false
false
0
6
7
24
14
10
null
null
skeuchel/CoqPP
Language/Coq/Pretty.hs
bsd-3-clause
prettyMbAnnotation (Just tm) = [pretty tm]
42
prettyMbAnnotation (Just tm) = [pretty tm]
42
prettyMbAnnotation (Just tm) = [pretty tm]
42
false
false
0
6
5
22
10
12
null
null
phadej/streaming-commons
Data/Streaming/Network.hs
mit
removeFileSafe :: FilePath -> IO () removeFileSafe path = removeFile path `E.catch` handleExists where handleExists e | isDoesNotExistError e = return () | otherwise = throwIO e -- | Smart constructor.
232
removeFileSafe :: FilePath -> IO () removeFileSafe path = removeFile path `E.catch` handleExists where handleExists e | isDoesNotExistError e = return () | otherwise = throwIO e -- | Smart constructor.
232
removeFileSafe path = removeFile path `E.catch` handleExists where handleExists e | isDoesNotExistError e = return () | otherwise = throwIO e -- | Smart constructor.
196
false
true
1
8
61
80
36
44
null
null
raichoo/Idris-dev
src/Idris/Core/CaseTree.hs
bsd-3-clause
match :: [Name] -> [Clause] -> SC -- error case -> CaseBuilder SC match [] (([], ret) : xs) err = do (ts, v, ntys) <- get put (ts ++ (map (fst.snd) xs), v, ntys) case snd ret of Impossible -> return ImpossibleCase tm -> return $ STerm tm -- run o...
335
match :: [Name] -> [Clause] -> SC -- error case -> CaseBuilder SC match [] (([], ret) : xs) err = do (ts, v, ntys) <- get put (ts ++ (map (fst.snd) xs), v, ntys) case snd ret of Impossible -> return ImpossibleCase tm -> return $ STerm tm -- run o...
335
match [] (([], ret) : xs) err = do (ts, v, ntys) <- get put (ts ++ (map (fst.snd) xs), v, ntys) case snd ret of Impossible -> return ImpossibleCase tm -> return $ STerm tm -- run out of arguments
241
false
true
0
14
127
143
73
70
null
null
kim/amazonka
amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/CreateEnvironment.hs
mpl-2.0
-- | For load-balanced, autoscaling environments, the URL to the LoadBalancer. For -- single-instance environments, the IP address of the instance. cerEndpointURL :: Lens' CreateEnvironmentResponse (Maybe Text) cerEndpointURL = lens _cerEndpointURL (\s a -> s { _cerEndpointURL = a })
284
cerEndpointURL :: Lens' CreateEnvironmentResponse (Maybe Text) cerEndpointURL = lens _cerEndpointURL (\s a -> s { _cerEndpointURL = a })
136
cerEndpointURL = lens _cerEndpointURL (\s a -> s { _cerEndpointURL = a })
73
true
true
1
9
39
52
26
26
null
null
pacak/cuddly-bassoon
unordered-containers-0.2.8.0/tests/HashSetProperties.hs
bsd-3-clause
pEq :: [Key] -> [Key] -> Bool pEq xs = (Set.fromList xs ==) `eq` (S.fromList xs ==)
83
pEq :: [Key] -> [Key] -> Bool pEq xs = (Set.fromList xs ==) `eq` (S.fromList xs ==)
83
pEq xs = (Set.fromList xs ==) `eq` (S.fromList xs ==)
53
false
true
0
9
16
56
30
26
null
null
aslatter/smallstring
Data/SmallString.hs
bsd-3-clause
-- | Convert a 'T.Text' into a 'SmallString'. fromText :: T.Text -> SmallString fromText = fromBS . T.encodeUtf8
112
fromText :: T.Text -> SmallString fromText = fromBS . T.encodeUtf8
66
fromText = fromBS . T.encodeUtf8
32
true
true
0
6
17
24
13
11
null
null
lambdageek/insomnia
src/FOmega/Syntax.hs
bsd-3-clause
-- | λε:⋆. { Nil : {} | Cons : { #0 : τ; #1 : (listT τ) } } listSumT :: Type listSumT = let ve = s2n "ε" e = TV ve in TLam $ bind (ve, embed KType) $ TSum [(FUser "Nil", unitT) , (FUser "Cons", tupleT [e, listT `TApp` e])]
251
listSumT :: Type listSumT = let ve = s2n "ε" e = TV ve in TLam $ bind (ve, embed KType) $ TSum [(FUser "Nil", unitT) , (FUser "Cons", tupleT [e, listT `TApp` e])]
191
listSumT = let ve = s2n "ε" e = TV ve in TLam $ bind (ve, embed KType) $ TSum [(FUser "Nil", unitT) , (FUser "Cons", tupleT [e, listT `TApp` e])]
174
true
true
0
13
82
96
51
45
null
null
meteogrid/mime-mail-parser
Network/Mail/Mime/Parser/Internal/Rfc2822.hs
bsd-3-clause
-- |Parse a 'second' but allow for the obsolete folding syntax. obs_second :: Parser Int obs_second = unfold second <?> "second"
139
obs_second :: Parser Int obs_second = unfold second <?> "second"
74
obs_second = unfold second <?> "second"
44
true
true
1
6
31
26
11
15
null
null
shouya/poi
src/Lib.hs
gpl-3.0
runCommand CmdRun = deploy
26
runCommand CmdRun = deploy
26
runCommand CmdRun = deploy
26
false
false
1
5
3
13
4
9
null
null
t0yv0/haskell-earley
Text/Earley.hs
bsd-3-clause
runGrammar :: Grammar a -> a runGrammar (Grammar g) = fst $ runState g (0, IM.empty)
84
runGrammar :: Grammar a -> a runGrammar (Grammar g) = fst $ runState g (0, IM.empty)
84
runGrammar (Grammar g) = fst $ runState g (0, IM.empty)
55
false
true
0
8
15
44
22
22
null
null
keera-studios/hsQt
Qtc/ClassTypes/Opengl.hs
bsd-2-clause
qGLPixelBufferAddFinalizer1 :: QGLPixelBuffer a -> IO () qGLPixelBufferAddFinalizer1 (Object fp) = addForeignPtrFinalizer qtc_QGLPixelBuffer_getFinalizer1 fp
159
qGLPixelBufferAddFinalizer1 :: QGLPixelBuffer a -> IO () qGLPixelBufferAddFinalizer1 (Object fp) = addForeignPtrFinalizer qtc_QGLPixelBuffer_getFinalizer1 fp
159
qGLPixelBufferAddFinalizer1 (Object fp) = addForeignPtrFinalizer qtc_QGLPixelBuffer_getFinalizer1 fp
102
false
true
0
7
15
37
17
20
null
null
BartAdv/Idris-dev
src/Idris/Core/Elaborate.hs
bsd-3-clause
get_context :: Elab' aux Context get_context = do ES p _ _ <- get return $! (context (fst p)) -- | Update the context. -- (should only be used for adding temporary definitions or all sorts of -- stuff could go wrong)
235
get_context :: Elab' aux Context get_context = do ES p _ _ <- get return $! (context (fst p)) -- | Update the context. -- (should only be used for adding temporary definitions or all sorts of -- stuff could go wrong)
235
get_context = do ES p _ _ <- get return $! (context (fst p)) -- | Update the context. -- (should only be used for adding temporary definitions or all sorts of -- stuff could go wrong)
202
false
true
1
12
60
56
26
30
null
null
sdiehl/ghc
compiler/GHC/Hs/Utils.hs
bsd-3-clause
nlConPatName :: Name -> [LPat GhcRn] -> LPat GhcRn nlConPatName con pats = noLoc (ConPatIn (noLoc con) (PrefixCon (map (parenthesizePat appPrec) pats)))
154
nlConPatName :: Name -> [LPat GhcRn] -> LPat GhcRn nlConPatName con pats = noLoc (ConPatIn (noLoc con) (PrefixCon (map (parenthesizePat appPrec) pats)))
154
nlConPatName con pats = noLoc (ConPatIn (noLoc con) (PrefixCon (map (parenthesizePat appPrec) pats)))
103
false
true
0
13
23
70
34
36
null
null
peter-fogg/pardoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
readFileFromDirs (d:ds) f = E.catch (UTF8.readFile $ d </> f) $ \(_ :: E.SomeException) -> readFileFromDirs ds f
118
readFileFromDirs (d:ds) f = E.catch (UTF8.readFile $ d </> f) $ \(_ :: E.SomeException) -> readFileFromDirs ds f
118
readFileFromDirs (d:ds) f = E.catch (UTF8.readFile $ d </> f) $ \(_ :: E.SomeException) -> readFileFromDirs ds f
118
false
false
0
10
23
59
30
29
null
null
yangsiwei880813/CS644
src/Weeder.hs
gpl-2.0
weedExpression (InstanceOf refType expression _) = Nothing
58
weedExpression (InstanceOf refType expression _) = Nothing
58
weedExpression (InstanceOf refType expression _) = Nothing
58
false
false
0
6
6
20
9
11
null
null
lukexi/ftgl3-haskell
Graphics/Rendering/FTGL3.hs
bsd-2-clause
readTextAlignment 3 = Justify
29
readTextAlignment 3 = Justify
29
readTextAlignment 3 = Justify
29
false
false
1
5
3
13
4
9
null
null
forked-upstream-packages-for-ghcjs/ghc
libraries/base/tests/IO/T4144.hs
bsd-3-clause
seekBS :: BSIODevice -> SeekMode -> Int -> IO () seekBS dev AbsoluteSeek pos | pos < 0 = error "Cannot seek to a negative position!" | pos > sizeBS dev = error "Cannot seek past end of handle!" | otherwise = case dev of BSIODevice _ mPos -> modifyMVar_ mPos $ \_ -...
332
seekBS :: BSIODevice -> SeekMode -> Int -> IO () seekBS dev AbsoluteSeek pos | pos < 0 = error "Cannot seek to a negative position!" | pos > sizeBS dev = error "Cannot seek past end of handle!" | otherwise = case dev of BSIODevice _ mPos -> modifyMVar_ mPos $ \_ -...
332
seekBS dev AbsoluteSeek pos | pos < 0 = error "Cannot seek to a negative position!" | pos > sizeBS dev = error "Cannot seek past end of handle!" | otherwise = case dev of BSIODevice _ mPos -> modifyMVar_ mPos $ \_ -> return pos
283
false
true
0
11
111
106
48
58
null
null
xpika/mohws
src/Network/MoHWS/Module/Description.hs
bsd-3-clause
empty :: T body ext empty = Cons { name = "<unnamed module>", load = const $ return Module.empty, configParser = fail "no parser available", -- identity element for 'Parsec.choice' setDefltConfig = id }
232
empty :: T body ext empty = Cons { name = "<unnamed module>", load = const $ return Module.empty, configParser = fail "no parser available", -- identity element for 'Parsec.choice' setDefltConfig = id }
232
empty = Cons { name = "<unnamed module>", load = const $ return Module.empty, configParser = fail "no parser available", -- identity element for 'Parsec.choice' setDefltConfig = id }
212
false
true
0
9
63
55
31
24
null
null
harendra-kumar/asyncly
src/Streamly/Internal/Benchmark/FileIO/Stream.hs
bsd-3-clause
splitOnSeqUtf8 :: String -> Handle -> IO Int splitOnSeqUtf8 str inh = (S.length $ IP.splitOnSeq (A.fromList str) FL.drain $ IUS.decodeUtf8ArraysLenient $ IFH.toChunks inh)
191
splitOnSeqUtf8 :: String -> Handle -> IO Int splitOnSeqUtf8 str inh = (S.length $ IP.splitOnSeq (A.fromList str) FL.drain $ IUS.decodeUtf8ArraysLenient $ IFH.toChunks inh)
191
splitOnSeqUtf8 str inh = (S.length $ IP.splitOnSeq (A.fromList str) FL.drain $ IUS.decodeUtf8ArraysLenient $ IFH.toChunks inh)
146
false
true
0
12
42
68
33
35
null
null
ennocramer/hindent
src/HIndent/Pretty.hs
bsd-3-clause
exp x@XTag{} = pretty' x
24
exp x@XTag{} = pretty' x
24
exp x@XTag{} = pretty' x
24
false
false
0
6
4
20
9
11
null
null
rrnewton/accelerate
Data/Array/Accelerate/Interpreter.hs
bsd-3-clause
evalNEq (NumScalarType (FloatingNumType ty)) | FloatingDict <- floatingDict ty = uncurry (/=)
93
evalNEq (NumScalarType (FloatingNumType ty)) | FloatingDict <- floatingDict ty = uncurry (/=)
93
evalNEq (NumScalarType (FloatingNumType ty)) | FloatingDict <- floatingDict ty = uncurry (/=)
93
false
false
0
9
11
40
18
22
null
null
yliu120/K3
src/Language/K3/Core/Utils.hs
apache-2.0
skipChildrenForReturns :: (Monad m) => (a -> K3 Expression -> m (a, [a])) -> (Bool, a) -> K3 Expression -> m ((Bool, a), [(Bool, a)]) skipChildrenForReturns tdF (skip, tdAcc) e = let chSkip = replicate (length $ children e) True in do { (nTd, chTd) <- tdF tdAcc e; ...
1,156
skipChildrenForReturns :: (Monad m) => (a -> K3 Expression -> m (a, [a])) -> (Bool, a) -> K3 Expression -> m ((Bool, a), [(Bool, a)]) skipChildrenForReturns tdF (skip, tdAcc) e = let chSkip = replicate (length $ children e) True in do { (nTd, chTd) <- tdF tdAcc e; ...
1,156
skipChildrenForReturns tdF (skip, tdAcc) e = let chSkip = replicate (length $ children e) True in do { (nTd, chTd) <- tdF tdAcc e; if skip then return ((True, nTd), zip chSkip chTd) else skipChildren e >>= return . ((False, nTd),) . flip zip chTd } where skipChildren :: (Monad m) => K3 Ex...
976
false
true
0
13
295
463
246
217
null
null
pepeiborra/bytestring-xml
Validate.hs
bsd-3-clause
main = do Args args paths <- getRecord "Validate XML" hSetBuffering stdout LineBuffering forM_ paths $ \p -> do contents <- BS.readFile p case parse contents of Left e -> print e Right node -> do putStrLn "OK" when (unHelpful $ reprint args) $ do let destPath = p <.> ...
566
main = do Args args paths <- getRecord "Validate XML" hSetBuffering stdout LineBuffering forM_ paths $ \p -> do contents <- BS.readFile p case parse contents of Left e -> print e Right node -> do putStrLn "OK" when (unHelpful $ reprint args) $ do let destPath = p <.> ...
566
main = do Args args paths <- getRecord "Validate XML" hSetBuffering stdout LineBuffering forM_ paths $ \p -> do contents <- BS.readFile p case parse contents of Left e -> print e Right node -> do putStrLn "OK" when (unHelpful $ reprint args) $ do let destPath = p <.> ...
566
false
false
0
22
181
179
79
100
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 9018565 = 3342
34
getValueFromProduct 9018565 = 3342
34
getValueFromProduct 9018565 = 3342
34
false
false
0
5
3
9
4
5
null
null
mdietz94/asteroids
src/Base/InputHandler.hs
gpl-3.0
release sym (x:xs) = if x == sym then xs else x : release sym xs
64
release sym (x:xs) = if x == sym then xs else x : release sym xs
64
release sym (x:xs) = if x == sym then xs else x : release sym xs
64
false
false
0
7
15
39
20
19
null
null
TheCrafter/tvaddict
src/Main.hs
mit
myMenuItems = [ (M.MenuItem "View all Series" printSeries) , (M.MenuItem "Add series" addSeries) , (M.MenuItem "Delete series" deleteSeries) , (M.MenuItem "Exit" exitSuccess) ]
209
myMenuItems = [ (M.MenuItem "View all Series" printSeries) , (M.MenuItem "Add series" addSeries) , (M.MenuItem "Delete series" deleteSeries) , (M.MenuItem "Exit" exitSuccess) ]
209
myMenuItems = [ (M.MenuItem "View all Series" printSeries) , (M.MenuItem "Add series" addSeries) , (M.MenuItem "Delete series" deleteSeries) , (M.MenuItem "Exit" exitSuccess) ]
209
false
false
0
8
55
58
31
27
null
null
dimara/ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pNodeName :: Field pNodeName = withDoc "A required node name (for single-node LUs)" $ simpleField "node_name" [t| NonEmptyString |]
135
pNodeName :: Field pNodeName = withDoc "A required node name (for single-node LUs)" $ simpleField "node_name" [t| NonEmptyString |]
135
pNodeName = withDoc "A required node name (for single-node LUs)" $ simpleField "node_name" [t| NonEmptyString |]
116
false
true
0
6
22
27
15
12
null
null
ducis/haAni
hs/common/Graphics/UI/GLUT/Raw/Tokens.hs
gpl-2.0
glut_WINDOW_CURSOR :: GLenum glut_WINDOW_CURSOR = 0x007A
56
glut_WINDOW_CURSOR :: GLenum glut_WINDOW_CURSOR = 0x007A
56
glut_WINDOW_CURSOR = 0x007A
27
false
true
0
4
5
11
6
5
null
null
budgefeeney/amixtureofmusings
Site/Meta.hs
gpl-3.0
filterDrafts :: MonadMetadata m => [Identifier] -> m [Identifier] filterDrafts = filterM isNotDraft
100
filterDrafts :: MonadMetadata m => [Identifier] -> m [Identifier] filterDrafts = filterM isNotDraft
100
filterDrafts = filterM isNotDraft
34
false
true
0
8
13
34
17
17
null
null
dpiponi/Bine
src/Core.hs
bsd-3-clause
set :: Emu6502 m => (Bool -> m ()) -> Bool -> m () set putFlag value = do tick 1 discard $ getPC >>= readMemory putFlag value -- 2 clock cycles
157
set :: Emu6502 m => (Bool -> m ()) -> Bool -> m () set putFlag value = do tick 1 discard $ getPC >>= readMemory putFlag value -- 2 clock cycles
157
set putFlag value = do tick 1 discard $ getPC >>= readMemory putFlag value -- 2 clock cycles
106
false
true
0
10
45
76
34
42
null
null
sopvop/snap
test/suite/Snap/Snaplet/Auth/Handlers/Tests.hs
bsd-3-clause
------------------------------------------------------------------------------ testCreateUserGood :: Test testCreateUserGood = testCase "createUser good params" assertGoodUser where assertGoodUser :: Assertion assertGoodUser = withTemporaryFile "users.json" $ do let hdl = with auth $ A.createUser "fo...
615
testCreateUserGood :: Test testCreateUserGood = testCase "createUser good params" assertGoodUser where assertGoodUser :: Assertion assertGoodUser = withTemporaryFile "users.json" $ do let hdl = with auth $ A.createUser "foo" "foo" res <- evalHandler Nothing (ST.get "" Map.empty) hdl appInit ...
536
testCreateUserGood = testCase "createUser good params" assertGoodUser where assertGoodUser :: Assertion assertGoodUser = withTemporaryFile "users.json" $ do let hdl = with auth $ A.createUser "foo" "foo" res <- evalHandler Nothing (ST.get "" Map.empty) hdl appInit either (assertFailur...
509
true
true
2
14
99
124
59
65
null
null
binesiyu/ifl
Core/CoreParse.hs
mit
{- pExpr1 = pThen assembleOp pExpr2 pExpr1c -} assembleOp e1 NoOp = e1
71
assembleOp e1 NoOp = e1
23
assembleOp e1 NoOp = e1
23
true
false
1
5
13
17
6
11
null
null
marcinmrotek/repa-linear-algebra
src/Numeric/LinearAlgebra/Repa.hs
bsd-3-clause
norm_FrobS :: (Normed (Vector t), Element t) => Array D DIM2 t -> Double norm_FrobS = H.norm_Frob . repa2hmS
108
norm_FrobS :: (Normed (Vector t), Element t) => Array D DIM2 t -> Double norm_FrobS = H.norm_Frob . repa2hmS
108
norm_FrobS = H.norm_Frob . repa2hmS
35
false
true
0
9
18
56
26
30
null
null
ikirill/ComputationalMathematics
Cube/Permutation.hs
gpl-3.0
unproject :: Proj -> Perm -> Perm unproject !proj@Proj{..} !p = Perm $ perm (idPerm _projOldSize) // updates -- This is not faster: -- = Perm $ array (1,_projOldSize) $ [(i,i) | i <- [1.._projOldSize]] ++ updates where n = projSize proj updates = [(unprojIxUnsafe proj i, unprojIxUnsafe proj $ appUnsafe ...
676
unproject :: Proj -> Perm -> Perm unproject !proj@Proj{..} !p = Perm $ perm (idPerm _projOldSize) // updates -- This is not faster: -- = Perm $ array (1,_projOldSize) $ [(i,i) | i <- [1.._projOldSize]] ++ updates where n = projSize proj updates = [(unprojIxUnsafe proj i, unprojIxUnsafe proj $ appUnsafe ...
676
unproject !proj@Proj{..} !p = Perm $ perm (idPerm _projOldSize) // updates -- This is not faster: -- = Perm $ array (1,_projOldSize) $ [(i,i) | i <- [1.._projOldSize]] ++ updates where n = projSize proj updates = [(unprojIxUnsafe proj i, unprojIxUnsafe proj $ appUnsafe p i) | i <- [1..n]] -- This is no...
642
false
true
7
9
159
126
61
65
null
null
kim/amazonka
amazonka-elastictranscoder/gen/Network/AWS/ElasticTranscoder/Types.hs
mpl-2.0
-- | You can create an output file that contains an excerpt from the input file. -- This excerpt, called a clip, can come from the beginning, middle, or end of -- the file. The Composition object contains settings for the clips that make up -- an output file. For the current release, you can only specify settings for a...
510
joComposition :: Lens' JobOutput [Clip] joComposition = lens _joComposition (\s a -> s { _joComposition = a }) . _List
118
joComposition = lens _joComposition (\s a -> s { _joComposition = a }) . _List
78
true
true
0
10
91
51
30
21
null
null
NicolasDP/hs-packer
Data/Packer/Internal.hs
bsd-2-clause
-- | Set the new position from the beginning in the memory block. -- This is useful to skip bytes or when using absolute offsets from a header or some such. unpackSetPosition :: Int -> Unpacking () unpackSetPosition pos = Unpacking $ \(iniBlock@(MemView _ sz)) _ -> do when (pos < 0 || pos > sz) (throwIO $ OutOfBoun...
423
unpackSetPosition :: Int -> Unpacking () unpackSetPosition pos = Unpacking $ \(iniBlock@(MemView _ sz)) _ -> do when (pos < 0 || pos > sz) (throwIO $ OutOfBoundUnpacking pos 0) return ((), memViewPlus iniBlock pos) -- | Get the position in the memory block.
266
unpackSetPosition pos = Unpacking $ \(iniBlock@(MemView _ sz)) _ -> do when (pos < 0 || pos > sz) (throwIO $ OutOfBoundUnpacking pos 0) return ((), memViewPlus iniBlock pos) -- | Get the position in the memory block.
225
true
true
0
13
83
105
54
51
null
null
brendanhay/gogol
gogol-cloudsearch/gen/Network/Google/Resource/CloudSearch/Indexing/Datasources/Items/Poll.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). idipdUploadProtocol :: Lens' IndexingDatasourcesItemsPoll (Maybe Text) idipdUploadProtocol = lens _idipdUploadProtocol (\ s a -> s{_idipdUploadProtocol = a})
227
idipdUploadProtocol :: Lens' IndexingDatasourcesItemsPoll (Maybe Text) idipdUploadProtocol = lens _idipdUploadProtocol (\ s a -> s{_idipdUploadProtocol = a})
165
idipdUploadProtocol = lens _idipdUploadProtocol (\ s a -> s{_idipdUploadProtocol = a})
94
true
true
1
9
33
51
25
26
null
null
laszlopandy/elm-package
src/Elm/Package/Paths.hs
bsd-3-clause
{-| Name of directory for all of a project's dependencies. -} stuffDirectory :: FilePath stuffDirectory = "elm-stuff"
121
stuffDirectory :: FilePath stuffDirectory = "elm-stuff"
59
stuffDirectory = "elm-stuff"
32
true
true
0
4
20
12
7
5
null
null
chengzh2008/hpffp
src/ch18-Monad/chapterExercise.hs
bsd-3-clause
a :: Monad m => m a -> m (a -> b) -> m b a ma mf = ma >>= \a -> mf >>= return . ($ a)
85
a :: Monad m => m a -> m (a -> b) -> m b a ma mf = ma >>= \a -> mf >>= return . ($ a)
85
a ma mf = ma >>= \a -> mf >>= return . ($ a)
44
false
true
0
10
28
73
35
38
null
null
input-output-hk/pos-haskell-prototype
explorer/src/Pos/Explorer/Web/ClientTypes.hs
mit
tiToTxEntry :: TxInternal -> CTxEntry tiToTxEntry txi@TxInternal{..} = toTxEntry (tiTimestamp txi) tiTx
103
tiToTxEntry :: TxInternal -> CTxEntry tiToTxEntry txi@TxInternal{..} = toTxEntry (tiTimestamp txi) tiTx
103
tiToTxEntry txi@TxInternal{..} = toTxEntry (tiTimestamp txi) tiTx
65
false
true
0
8
11
38
19
19
null
null
spoqa/nirum
src/Nirum/Constructs/Module.hs
gpl-3.0
coreModulePath :: ModulePath coreModulePath = ["core"]
54
coreModulePath :: ModulePath coreModulePath = ["core"]
54
coreModulePath = ["core"]
25
false
true
0
6
5
21
9
12
null
null
rolph-recto/liquidhaskell
src/Language/Haskell/Liquid/Parse.hs
bsd-3-clause
tupDataCon n = dummyLoc $ symbol $ "(" <> replicate (n - 1) ',' <> ")"
73
tupDataCon n = dummyLoc $ symbol $ "(" <> replicate (n - 1) ',' <> ")"
73
tupDataCon n = dummyLoc $ symbol $ "(" <> replicate (n - 1) ',' <> ")"
73
false
false
0
9
18
37
18
19
null
null
msullivan/advent-of-code
2018/A16b.hs
mit
eval_instr' Ibor = (.|.)
24
eval_instr' Ibor = (.|.)
24
eval_instr' Ibor = (.|.)
24
false
false
0
5
3
11
6
5
null
null
changlinli/nikki
src/Utils.hs
lgpl-3.0
-- | can be used to try out different values for constants without recompiling tweakValue :: Read a => FilePath -> a tweakValue file = System.IO.Unsafe.unsafePerformIO $ do value <- readFile file logg Debug (file ++ " = " ++ value) return $ case readMay value of Nothing -> error ("cannot read: " ++ ...
347
tweakValue :: Read a => FilePath -> a tweakValue file = System.IO.Unsafe.unsafePerformIO $ do value <- readFile file logg Debug (file ++ " = " ++ value) return $ case readMay value of Nothing -> error ("cannot read: " ++ value) Just x -> x
268
tweakValue file = System.IO.Unsafe.unsafePerformIO $ do value <- readFile file logg Debug (file ++ " = " ++ value) return $ case readMay value of Nothing -> error ("cannot read: " ++ value) Just x -> x
230
true
true
0
14
87
107
50
57
null
null
kawu/data-morphosyntax
Data/Morphosyntax/Compare.hs
bsd-2-clause
-- ^ Number of segments in gold corpus (.+.) :: Stats -> Stats -> Stats Stats x y .+. Stats x' y' = Stats (x + x') (y + y')
124
(.+.) :: Stats -> Stats -> Stats Stats x y .+. Stats x' y' = Stats (x + x') (y + y')
84
Stats x y .+. Stats x' y' = Stats (x + x') (y + y')
51
true
true
0
7
30
57
29
28
null
null
bringert/haskell-tar
Codec/Archive/Tar/Write.hs
bsd-3-clause
putTarHeader :: TarHeader -> Put putTarHeader hdr = do let block = B.concat $ L.toChunks $ runPut (putHeaderNoChkSum hdr) chkSum = B.foldl' (\x y -> x + ord y) 0 block putByteString $ B.take 148 block putOct 8 chkSum putByteString $ B.drop 156 block
286
putTarHeader :: TarHeader -> Put putTarHeader hdr = do let block = B.concat $ L.toChunks $ runPut (putHeaderNoChkSum hdr) chkSum = B.foldl' (\x y -> x + ord y) 0 block putByteString $ B.take 148 block putOct 8 chkSum putByteString $ B.drop 156 block
286
putTarHeader hdr = do let block = B.concat $ L.toChunks $ runPut (putHeaderNoChkSum hdr) chkSum = B.foldl' (\x y -> x + ord y) 0 block putByteString $ B.take 148 block putOct 8 chkSum putByteString $ B.drop 156 block
253
false
true
0
15
80
121
55
66
null
null
jtdaugherty/dbmigrations-client
src/Types.hs
bsd-3-clause
initialState :: Configuration -> B.Backend -> S.MigrationStore -> Chan AppEvent -> St initialState cfg theBackend theStore ch = St { _uiMode = MigrationListing , _backend = theBackend , _store = theStore , _availableMigrations = [] , _installedMigrations = [] , _migrationList = li...
639
initialState :: Configuration -> B.Backend -> S.MigrationStore -> Chan AppEvent -> St initialState cfg theBackend theStore ch = St { _uiMode = MigrationListing , _backend = theBackend , _store = theStore , _availableMigrations = [] , _installedMigrations = [] , _migrationList = li...
639
initialState cfg theBackend theStore ch = St { _uiMode = MigrationListing , _backend = theBackend , _store = theStore , _availableMigrations = [] , _installedMigrations = [] , _migrationList = list (Name "migrationList") mempty 1 , _config = cfg , _editMigrationName ...
553
false
true
0
9
171
175
98
77
null
null
unisonweb/platform
parser-typechecker/src/Unison/Util/Pretty.hs
mit
parenthesizeIf True s = parenthesize s
38
parenthesizeIf True s = parenthesize s
38
parenthesizeIf True s = parenthesize s
38
false
false
0
5
5
14
6
8
null
null
karamellpelle/grid
designer/source/OpenGL/Helpers/GL2D.hs
gpl-3.0
-- | set up projection and modelview for 2D drawing, -- with screen size as described by 'wth' and 'hth' --as2DView :: MonadIO m => Double -> Double -> m a -> m a as2DView wth hth ma = do -- begin liftIO $ glMatrixMode gl_PROJECTION liftIO $ glPushMatrix liftIO $ glLoadIdentity liftIO $ glOrtho 0 ...
966
as2DView wth hth ma = do -- begin liftIO $ glMatrixMode gl_PROJECTION liftIO $ glPushMatrix liftIO $ glLoadIdentity liftIO $ glOrtho 0 (realToFrac wth) 0 (realToFrac hth) (-1) 1 liftIO $ glMatrixMode gl_MODELVIEW liftIO $ glPushMatrix liftIO $ glLoadIdentity liftIO $ glTranslatef 0 0...
801
as2DView wth hth ma = do -- begin liftIO $ glMatrixMode gl_PROJECTION liftIO $ glPushMatrix liftIO $ glLoadIdentity liftIO $ glOrtho 0 (realToFrac wth) 0 (realToFrac hth) (-1) 1 liftIO $ glMatrixMode gl_MODELVIEW liftIO $ glPushMatrix liftIO $ glLoadIdentity liftIO $ glTranslatef 0 0...
801
true
false
1
11
241
209
93
116
null
null
travitch/foreign-inference
src/Foreign/Inference/Interface.hs
bsd-3-clause
-- | Determine if the given Type is ref counted. Any non-struct type -- will return False. isRefCountedObject :: DependencySummary -> Type -> Maybe (String, String) isRefCountedObject ds t = case t of TypeStruct (Right _) _ _ -> do let Just n = structTypeToName t Map.lookup n (refCountSuperclasses ds...
338
isRefCountedObject :: DependencySummary -> Type -> Maybe (String, String) isRefCountedObject ds t = case t of TypeStruct (Right _) _ _ -> do let Just n = structTypeToName t Map.lookup n (refCountSuperclasses ds) _ -> Nothing
246
isRefCountedObject ds t = case t of TypeStruct (Right _) _ _ -> do let Just n = structTypeToName t Map.lookup n (refCountSuperclasses ds) _ -> Nothing
172
true
true
0
13
75
96
46
50
null
null
haraldsteinlechner/lambdaWolf
EdslTest.hs
gpl-3.0
eval :: Expr a -> a eval (Vec x) = x
36
eval :: Expr a -> a eval (Vec x) = x
36
eval (Vec x) = x
16
false
true
0
9
10
33
14
19
null
null
skepner/ssheet
tests/Test.hs
gpl-2.0
---------------------------------------------------------------------- main :: IO () main = mapM_ testIt [("tests/simple.xlsx", simpleExpected), ("tests/simple.xls", simpleExpected), ("tests/simple.csv", simpleExpectedCsv), ("tests/dates.xlsx", datesExpected), ...
528
main :: IO () main = mapM_ testIt [("tests/simple.xlsx", simpleExpected), ("tests/simple.xls", simpleExpected), ("tests/simple.csv", simpleExpectedCsv), ("tests/dates.xlsx", datesExpected), ("tests/dates1904.xlsx", dates1904Expected) ] ...
456
main = mapM_ testIt [("tests/simple.xlsx", simpleExpected), ("tests/simple.xls", simpleExpected), ("tests/simple.csv", simpleExpectedCsv), ("tests/dates.xlsx", datesExpected), ("tests/dates1904.xlsx", dates1904Expected) ] where test...
442
true
true
0
7
118
89
53
36
null
null
athanclark/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reflectBinderQuote q ty unq (NLet x y) = reflCall "NLet" [Var ty, q unq x, q unq y]
86
reflectBinderQuote q ty unq (NLet x y) = reflCall "NLet" [Var ty, q unq x, q unq y]
86
reflectBinderQuote q ty unq (NLet x y) = reflCall "NLet" [Var ty, q unq x, q unq y]
86
false
false
0
7
20
50
24
26
null
null
mhwombat/numeral-wains
src/ALife/Creatur/Wain/ImageID/Universe.hs
bsd-3-clause
cPopControl :: Setting Bool cPopControl = requiredSetting "popControl"
70
cPopControl :: Setting Bool cPopControl = requiredSetting "popControl"
70
cPopControl = requiredSetting "popControl"
42
false
true
0
5
7
17
8
9
null
null
mbakke/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
-- * Xen cpu load collector xentopCommand :: String xentopCommand = "xentop"
77
xentopCommand :: String xentopCommand = "xentop"
48
xentopCommand = "xentop"
24
true
true
0
4
12
12
7
5
null
null
AntoineSavage/haskell
turninH/dist/build/autogen/Paths_turnin.hs
gpl-2.0
getLibexecDir = catchIO (getEnv "turnin_libexecdir") (\_ -> return libexecdir)
78
getLibexecDir = catchIO (getEnv "turnin_libexecdir") (\_ -> return libexecdir)
78
getLibexecDir = catchIO (getEnv "turnin_libexecdir") (\_ -> return libexecdir)
78
false
false
0
8
8
28
14
14
null
null
asr/apia
test/Succeed/NonConjectures/Test.hs
mit
------------------------------------------------------------------------------ -- Auxiliary functions nonConjecturesPath ∷ String nonConjecturesPath = "test/Succeed/NonConjectures/"
182
nonConjecturesPath ∷ String nonConjecturesPath = "test/Succeed/NonConjectures/"
79
nonConjecturesPath = "test/Succeed/NonConjectures/"
51
true
true
0
4
10
13
8
5
null
null
remusao/Hodor
src/Language/Brainfuck/Internals/Optim/Contract.hs
bsd-3-clause
optim (MoveLeft n1:MoveLeft n2:t) = optim $ MoveLeft (n1 + n2):t
64
optim (MoveLeft n1:MoveLeft n2:t) = optim $ MoveLeft (n1 + n2):t
64
optim (MoveLeft n1:MoveLeft n2:t) = optim $ MoveLeft (n1 + n2):t
64
false
false
0
9
10
45
21
24
null
null
mgsloan/ghcjs-typescript
ghcjs-typescript-convert/GHCJS/TypeScript/Convert/Render.hs
mit
vert :: Int -> String -> String -> String -> [[String]] -> [String] vert n leading between end ls = case ls of [] -> [indent ++ leading ++ end] ((x0 : xs0) : xss) -> (indent ++ leading ++ x0) : bodyLines xs0 ++ concatMap (\(x : xs) -> (indent ++ between ++ x) : bodyLines xs) xss ...
457
vert :: Int -> String -> String -> String -> [[String]] -> [String] vert n leading between end ls = case ls of [] -> [indent ++ leading ++ end] ((x0 : xs0) : xss) -> (indent ++ leading ++ x0) : bodyLines xs0 ++ concatMap (\(x : xs) -> (indent ++ between ++ x) : bodyLines xs) xss ...
457
vert n leading between end ls = case ls of [] -> [indent ++ leading ++ end] ((x0 : xs0) : xss) -> (indent ++ leading ++ x0) : bodyLines xs0 ++ concatMap (\(x : xs) -> (indent ++ between ++ x) : bodyLines xs) xss ++ [indent ++ end] where indent = replicate n ' ' ...
389
false
true
2
16
141
226
112
114
null
null
robdockins/edison
test/src/Data/Edison/Test/FM.hs
mit
prop_SortedStructure :: FMTest k Int fm => fm Int -> [(k,Int)] -> Property prop_SortedStructure fm xs = L.null xs `trivial` si (fromSeq (L.sort xs) `asTypeOf` fm)
172
prop_SortedStructure :: FMTest k Int fm => fm Int -> [(k,Int)] -> Property prop_SortedStructure fm xs = L.null xs `trivial` si (fromSeq (L.sort xs) `asTypeOf` fm)
172
prop_SortedStructure fm xs = L.null xs `trivial` si (fromSeq (L.sort xs) `asTypeOf` fm)
97
false
true
0
11
35
90
44
46
null
null