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
newmana/lets-lens
src/Lets/Lens.hs
bsd-3-clause
-- | Here is @fmapT@ again, passing @traverse@ to @over@. fmapTAgain :: Traversable t => (a -> b) -> t a -> t b fmapTAgain = error "todo: fmapTAgain"
159
fmapTAgain :: Traversable t => (a -> b) -> t a -> t b fmapTAgain = error "todo: fmapTAgain"
101
fmapTAgain = error "todo: fmapTAgain"
39
true
true
0
9
38
45
21
24
null
null
irrwitz/learnyouahaskell
chapter1/list.hs
gpl-3.0
-- maximum of a list max' = maximum [1,2,3,4,5] == 5
52
max' = maximum [1,2,3,4,5] == 5
31
max' = maximum [1,2,3,4,5] == 5
31
true
false
0
7
10
29
17
12
null
null
tel/closure
src/Algebra/Closure/Set/BreadthFirst.hs
mit
opred (A a) = A (pred a)
24
opred (A a) = A (pred a)
24
opred (A a) = A (pred a)
24
false
false
0
6
6
25
11
14
null
null
enolan/Idris-dev
src/Idris/Core/TT.hs
bsd-3-clause
vinstances i (App _ f a) = vinstances i f + vinstances i a
58
vinstances i (App _ f a) = vinstances i f + vinstances i a
58
vinstances i (App _ f a) = vinstances i f + vinstances i a
58
false
false
0
7
13
35
16
19
null
null
TomMD/ghc
compiler/types/TyCon.hs
bsd-3-clause
isVoidRep :: PrimRep -> Bool isVoidRep VoidRep = True
53
isVoidRep :: PrimRep -> Bool isVoidRep VoidRep = True
53
isVoidRep VoidRep = True
24
false
true
0
7
8
24
10
14
null
null
aniketd/learn.haskell
yesodbook/singles/links.hs
unlicense
getHomeR = defaultLayout [whamlet|<a href=@{Page1R}>Go to page 1|]
67
getHomeR = defaultLayout [whamlet|<a href=@{Page1R}>Go to page 1|]
67
getHomeR = defaultLayout [whamlet|<a href=@{Page1R}>Go to page 1|]
67
false
false
0
5
8
13
8
5
null
null
meiersi/blaze-builder
Criterion/ScalingBenchmark.hs
bsd-3-clause
renderScalingComparison :: (PlotValue b, RealFloat b) => PlotConfig -> (a -> b) -> ScalingComparison a -> Renderable () renderScalingComparison config f sc = toRenderable $ layout1_plots ^= plots $ layout1_title ^= scName sc $ layout1_bottom_axis ^= mkAxis pcLogXAxis (scTes...
787
renderScalingComparison :: (PlotValue b, RealFloat b) => PlotConfig -> (a -> b) -> ScalingComparison a -> Renderable () renderScalingComparison config f sc = toRenderable $ layout1_plots ^= plots $ layout1_title ^= scName sc $ layout1_bottom_axis ^= mkAxis pcLogXAxis (scTes...
787
renderScalingComparison config f sc = toRenderable $ layout1_plots ^= plots $ layout1_title ^= scName sc $ layout1_bottom_axis ^= mkAxis pcLogXAxis (scTestUnit sc) $ layout1_right_axis ^= mkAxis pcLogYAxis "seconds" $ defaultLayout1 where mkAxis proj | proj config = mkLogAxis ...
643
false
true
0
13
221
203
97
106
null
null
SwiftsNamesake/Socratease
src/Socratease/Serialise.hs
mit
-- | queryAuthors :: (Convertible SqlValue string, IsString string) => Connection -> String -> IO (Either ConvertError [Author string]) queryAuthors conn = selectQuery conn "authors" authorParameters
199
queryAuthors :: (Convertible SqlValue string, IsString string) => Connection -> String -> IO (Either ConvertError [Author string]) queryAuthors conn = selectQuery conn "authors" authorParameters
194
queryAuthors conn = selectQuery conn "authors" authorParameters
63
true
true
0
12
25
64
32
32
null
null
astro/haskell-torrent
src/Data/ByteString/Builder.hs
bsd-2-clause
putInt16be :: Int16 -> Builder putInt16be = putWord16be . fromIntegral
70
putInt16be :: Int16 -> Builder putInt16be = putWord16be . fromIntegral
70
putInt16be = putWord16be . fromIntegral
39
false
true
0
5
9
19
10
9
null
null
mettekou/ghc
compiler/iface/IfaceType.hs
bsd-3-clause
-- All promoted constructors have kind arguments pprTuple sort IsPromoted args = let tys = tcArgsIfaceTypes args args' = drop (length tys `div` 2) tys in pprPromotionQuoteI IsPromoted <> tupleParens sort (pprWithCommas pprIfaceType args')
259
pprTuple sort IsPromoted args = let tys = tcArgsIfaceTypes args args' = drop (length tys `div` 2) tys in pprPromotionQuoteI IsPromoted <> tupleParens sort (pprWithCommas pprIfaceType args')
210
pprTuple sort IsPromoted args = let tys = tcArgsIfaceTypes args args' = drop (length tys `div` 2) tys in pprPromotionQuoteI IsPromoted <> tupleParens sort (pprWithCommas pprIfaceType args')
210
true
false
0
12
54
70
34
36
null
null
romanb/amazonka
amazonka-swf/gen/Network/AWS/SWF/Types.hs
mpl-2.0
-- | The cause of the failure. This information is generated by the system and can -- be useful for diagnostic purposes. -- -- If cause is set to OPERATION_NOT_PERMITTED, the decision failed because it -- lacked sufficient permissions. For details and example IAM policies, see <http://docs.aws.amazon.com/amazonswf/late...
585
scwefeaCause :: Lens' StartChildWorkflowExecutionFailedEventAttributes StartChildWorkflowExecutionFailedCause scwefeaCause = lens _scwefeaCause (\s a -> s { _scwefeaCause = a })
177
scwefeaCause = lens _scwefeaCause (\s a -> s { _scwefeaCause = a })
67
true
true
0
9
73
44
26
18
null
null
robdockins/edison
edison-core/src/Data/Edison/Coll/SkewHeap.hs
mit
maxView (T x a E) = return (y, T x a' E) where Just (y, a') = maxView a
73
maxView (T x a E) = return (y, T x a' E) where Just (y, a') = maxView a
73
maxView (T x a E) = return (y, T x a' E) where Just (y, a') = maxView a
73
false
false
0
7
20
57
27
30
null
null
synsem/texhs
src/Text/TeX/Lexer/TokenParser/Execution.hs
gpl-3.0
---------- Builtin macros: LaTeX3 (xparse) macro definitions -- Parse and register an xparse macro definition. declareDocumentCommand :: HandleTeXIO m => MacroDefinitionMode -> LexerT m [Token] declareDocumentCommand defMode = do (CtrlSeq name active) <- optGrouped ctrlseqNoExpand <?> "macro name" context <- argsp...
553
declareDocumentCommand :: HandleTeXIO m => MacroDefinitionMode -> LexerT m [Token] declareDocumentCommand defMode = do (CtrlSeq name active) <- optGrouped ctrlseqNoExpand <?> "macro name" context <- argspec <?> "macro argspec" body <- grouped tokensNoExpand let key = (name, active) modifyState $ registerMacro...
441
declareDocumentCommand defMode = do (CtrlSeq name active) <- optGrouped ctrlseqNoExpand <?> "macro name" context <- argspec <?> "macro argspec" body <- grouped tokensNoExpand let key = (name, active) modifyState $ registerMacroCmd defMode (key, MacroCmdUser key context body) return [] -- Parse and regi...
358
true
true
0
10
89
127
61
66
null
null
csrhodes/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
hacek 'O' = "Ǒ"
15
hacek 'O' = "Ǒ"
15
hacek 'O' = "Ǒ"
15
false
false
1
5
3
13
4
9
null
null
typedvar/hLand
hcore/GMachine.hs
mit
getArg :: Node -> Addr getArg (NAp a1 a2) = a2
46
getArg :: Node -> Addr getArg (NAp a1 a2) = a2
46
getArg (NAp a1 a2) = a2
23
false
true
0
7
10
26
13
13
null
null
urbanslug/ghc
testsuite/tests/rename/should_compile/timing003.hs
bsd-3-clause
a185 = []
9
a185 = []
9
a185 = []
9
false
false
1
6
2
12
4
8
null
null
zelinskiy/ImRec
src/Lines.hs
bsd-3-clause
flipType Begin = End
20
flipType Begin = End
20
flipType Begin = End
20
false
false
1
5
3
13
4
9
null
null
sonyandy/unify
src/Control/Monad/Trans/Ref/Integer.hs
bsd-3-clause
initS :: S initS = S { refCount = 0, refMap = Map.empty }
57
initS :: S initS = S { refCount = 0, refMap = Map.empty }
57
initS = S { refCount = 0, refMap = Map.empty }
46
false
true
0
8
13
37
18
19
null
null
goldfirere/singletons
singletons-th/src/Data/Singletons/TH/Util.hs
bsd-3-clause
extractTvbKind :: DTyVarBndr flag -> Maybe DKind extractTvbKind (DPlainTV _ _) = Nothing
91
extractTvbKind :: DTyVarBndr flag -> Maybe DKind extractTvbKind (DPlainTV _ _) = Nothing
91
extractTvbKind (DPlainTV _ _) = Nothing
42
false
true
0
7
15
32
15
17
null
null
brendanhay/gogol
gogol-pubsub/gen/Network/Google/Resource/PubSub/Projects/Topics/Get.hs
mpl-2.0
-- | Required. The name of the topic to get. Format is -- \`projects\/{project}\/topics\/{topic}\`. ptgTopic :: Lens' ProjectsTopicsGet Text ptgTopic = lens _ptgTopic (\ s a -> s{_ptgTopic = a})
194
ptgTopic :: Lens' ProjectsTopicsGet Text ptgTopic = lens _ptgTopic (\ s a -> s{_ptgTopic = a})
94
ptgTopic = lens _ptgTopic (\ s a -> s{_ptgTopic = a})
53
true
true
1
9
29
46
23
23
null
null
rrnewton/accelerate
Data/Array/Accelerate/Trafo/Algebra.hs
bsd-3-clause
evalTan :: Elt a => FloatingType a -> a :-> a evalTan ty | FloatingDict <- floatingDict ty = eval1 tan
102
evalTan :: Elt a => FloatingType a -> a :-> a evalTan ty | FloatingDict <- floatingDict ty = eval1 tan
102
evalTan ty | FloatingDict <- floatingDict ty = eval1 tan
56
false
true
0
9
20
53
22
31
null
null
fumieval/LazyZ
Language/LazyZ/Syntax.hs
bsd-3-clause
parseOpTable :: Parser OpTable parseOpTable = map (map snd) <$> groupBy ((==) `on` fst) <$> sortBy (compare `on` (negate.fst)) <$> concat <$> many (spaces *> def <* char ';') where def = pure <$> (try (infixp "--#infixl" AssocLeft) <|> try (infixp "--#infixr" AssocRight) <|> ...
614
parseOpTable :: Parser OpTable parseOpTable = map (map snd) <$> groupBy ((==) `on` fst) <$> sortBy (compare `on` (negate.fst)) <$> concat <$> many (spaces *> def <* char ';') where def = pure <$> (try (infixp "--#infixl" AssocLeft) <|> try (infixp "--#infixr" AssocRight) <|> ...
614
parseOpTable = map (map snd) <$> groupBy ((==) `on` fst) <$> sortBy (compare `on` (negate.fst)) <$> concat <$> many (spaces *> def <* char ';') where def = pure <$> (try (infixp "--#infixl" AssocLeft) <|> try (infixp "--#infixr" AssocRight) <|> try (infixp "--#infix" AssocNon...
583
false
true
16
18
191
283
135
148
null
null
ducis/RicherListOp
RicherListOp.hs
mit
filterWithTails pred l = f l where f [] = [] f (m:r) = if pred m r then m:f r else f r
90
filterWithTails pred l = f l where f [] = [] f (m:r) = if pred m r then m:f r else f r
90
filterWithTails pred l = f l where f [] = [] f (m:r) = if pred m r then m:f r else f r
90
false
false
2
7
27
75
32
43
null
null
DanielSchuessler/hstri
TriangulationCxtObject.hs
gpl-3.0
degreeOfVertex :: TVertex -> Int degreeOfVertex y = ecSize (eqvClassOf (vertexEqv (getTriangulation y)) (unT y))
112
degreeOfVertex :: TVertex -> Int degreeOfVertex y = ecSize (eqvClassOf (vertexEqv (getTriangulation y)) (unT y))
112
degreeOfVertex y = ecSize (eqvClassOf (vertexEqv (getTriangulation y)) (unT y))
79
false
true
0
11
14
53
24
29
null
null
NightRa/Idris-dev
src/IRTS/CodegenJavaScript.hs
bsd-3-clause
jsNULL :: CompileInfo -> Reg -> JS jsNULL _ r = JSDelete (translateReg r)
73
jsNULL :: CompileInfo -> Reg -> JS jsNULL _ r = JSDelete (translateReg r)
73
jsNULL _ r = JSDelete (translateReg r)
38
false
true
0
7
13
33
16
17
null
null
bitc/hs-watchman
src/System/Directory/Watchman/Expression.hs
mit
dirname :: WFilePath -> Expression dirname path = EDirName path defaultDirNameParams
84
dirname :: WFilePath -> Expression dirname path = EDirName path defaultDirNameParams
84
dirname path = EDirName path defaultDirNameParams
49
false
true
0
5
10
23
11
12
null
null
ekarayel/HTF
tests/TestHTFHunitBackwardsCompatible.hs
lgpl-2.1
test_1_FAIL = do assertEqual "1 == 2" 1 2 assertEqualHTF 1 1
77
test_1_FAIL = do assertEqual "1 == 2" 1 2 assertEqualHTF 1 1
77
test_1_FAIL = do assertEqual "1 == 2" 1 2 assertEqualHTF 1 1
77
false
false
0
7
28
24
10
14
null
null
liamoc/sprig-hs
Graphics/UI/SDL/Sprig/Control.hs
bsd-3-clause
-- |Determine if radians are being used as the angle measure getRadians :: IO Bool getRadians = fmap word8ToBool spgGetRadians
126
getRadians :: IO Bool getRadians = fmap word8ToBool spgGetRadians
65
getRadians = fmap word8ToBool spgGetRadians
43
true
true
0
5
19
20
10
10
null
null
exergasia/fenceposted
Data/TaggedTree.hs
bsd-3-clause
-- | @_TaggedTree :: Iso (Fenceposted a (tag, TaggedTree tag a)) (Fenceposted a' (tag', TaggedTree tag' a')) (TaggedTree tag a) (TaggedTree tag' a') _TaggedTree :: (Profunctor p, Functor f) => p (TaggedTree tag a) (f (TaggedTree tag' a')) -> p (Fenceposted a (tag, TaggedTree tag a)) (f (Fenceposted a' (tag', TaggedTree...
382
_TaggedTree :: (Profunctor p, Functor f) => p (TaggedTree tag a) (f (TaggedTree tag' a')) -> p (Fenceposted a (tag, TaggedTree tag a)) (f (Fenceposted a' (tag', TaggedTree tag' a'))) _TaggedTree = dimap TaggedTree (fmap unTaggedTree)
233
_TaggedTree = dimap TaggedTree (fmap unTaggedTree)
50
true
true
0
13
58
118
60
58
null
null
NorfairKing/the-notes
src/NumberTheory/Macro.hs
gpl-2.0
-- * Whole numbers int :: Note -> Note int n = n ∈ ints
56
int :: Note -> Note int n = n ∈ ints
36
int n = n ∈ ints
16
true
true
0
6
15
27
13
14
null
null
luisgepeto/HaskellLearning
09 Input and Output/06_exceptions.hs
mit
--this handler catches certain exceptiions and rethrows! handler' :: IOError -> IO() handler' e --we can get error information with ioe Functions | isDoesNotExistError e = case ioeGetFileName e of Just path -> putStrLn $ "Whoops! File does not exist at: " ++ path Nothing -> putStrLn "Whoops! F...
416
handler' :: IOError -> IO() handler' e --we can get error information with ioe Functions | isDoesNotExistError e = case ioeGetFileName e of Just path -> putStrLn $ "Whoops! File does not exist at: " ++ path Nothing -> putStrLn "Whoops! File does not exist at unknown location!" --rethrowin...
359
handler' e --we can get error information with ioe Functions | isDoesNotExistError e = case ioeGetFileName e of Just path -> putStrLn $ "Whoops! File does not exist at: " ++ path Nothing -> putStrLn "Whoops! File does not exist at unknown location!" --rethrowing the error | otherwise ...
331
true
true
1
10
97
82
38
44
null
null
ganeti-github-testing/ganeti-test-1
test/hs/Test/Ganeti/Query/Query.hs
bsd-2-clause
prop_getRequestedNames :: Property prop_getRequestedNames = forAll genName $ \node1 -> let chk = getRequestedNames . Query (ItemTypeOpCode QRNode) [] q_node1 = QuotedString node1 eq_name = EQFilter "name" eq_node1 = eq_name q_node1 in conjoin [ printTestCase "empty filter" $ chk EmptyFilter ==? ...
713
prop_getRequestedNames :: Property prop_getRequestedNames = forAll genName $ \node1 -> let chk = getRequestedNames . Query (ItemTypeOpCode QRNode) [] q_node1 = QuotedString node1 eq_name = EQFilter "name" eq_node1 = eq_name q_node1 in conjoin [ printTestCase "empty filter" $ chk EmptyFilter ==? ...
713
prop_getRequestedNames = forAll genName $ \node1 -> let chk = getRequestedNames . Query (ItemTypeOpCode QRNode) [] q_node1 = QuotedString node1 eq_name = EQFilter "name" eq_node1 = eq_name q_node1 in conjoin [ printTestCase "empty filter" $ chk EmptyFilter ==? [] , printTestCase "an...
678
false
true
2
13
206
216
103
113
null
null
keithodulaigh/Hets
Syntax/Parse_AS_Library.hs
gpl-2.0
equivType :: LogicGraph -> AParser st EQUIV_TYPE equivType l = do sp1 <- omsOrNetwork l r <- equiT sp2 <- omsOrNetwork l return $ Equiv_type sp1 sp2 $ tokPos r
175
equivType :: LogicGraph -> AParser st EQUIV_TYPE equivType l = do sp1 <- omsOrNetwork l r <- equiT sp2 <- omsOrNetwork l return $ Equiv_type sp1 sp2 $ tokPos r
175
equivType l = do sp1 <- omsOrNetwork l r <- equiT sp2 <- omsOrNetwork l return $ Equiv_type sp1 sp2 $ tokPos r
126
false
true
0
9
45
69
30
39
null
null
parvmor/codeworld
codeworld-server/src/Collaboration.hs
apache-2.0
collabRoutes :: ClientId -> [(B.ByteString, Snap ())] collabRoutes clientId = [ ("addToCollaborate", addToCollaborateHandler clientId) , ("collabShare", collabShareHandler clientId) , ("listCurrentOwners", listCurrentOwnersHandler clientId) ]
265
collabRoutes :: ClientId -> [(B.ByteString, Snap ())] collabRoutes clientId = [ ("addToCollaborate", addToCollaborateHandler clientId) , ("collabShare", collabShareHandler clientId) , ("listCurrentOwners", listCurrentOwnersHandler clientId) ]
265
collabRoutes clientId = [ ("addToCollaborate", addToCollaborateHandler clientId) , ("collabShare", collabShareHandler clientId) , ("listCurrentOwners", listCurrentOwnersHandler clientId) ]
211
false
true
0
9
45
70
39
31
null
null
amccausl/Swish
Swish/HaskellRDF/GraphTest.hs
lgpl-2.1
g1 = GraphMem { arcs = [t01] }
30
g1 = GraphMem { arcs = [t01] }
30
g1 = GraphMem { arcs = [t01] }
30
false
false
1
7
7
20
10
10
null
null
sergei-romanenko/sc-mini
src/Interpreter.hs
unlicense
intC :: Program -> Expr -> (Expr, Integer) intC p e = until t f (e, 0) where t (e, n) = isValue e f (e, n) = (intStep p e, n + 1)
137
intC :: Program -> Expr -> (Expr, Integer) intC p e = until t f (e, 0) where t (e, n) = isValue e f (e, n) = (intStep p e, n + 1)
137
intC p e = until t f (e, 0) where t (e, n) = isValue e f (e, n) = (intStep p e, n + 1)
94
false
true
0
7
41
90
49
41
null
null
ehlemur/HLearn
src/HLearn/Data/SpaceTree/CoverTree.hs
bsd-3-clause
addChild_ancestor :: ( ValidCT exprat childC leafC dp ) => AddChildMethod exprat childC leafC dp addChild_ancestor dp ct = {-# SCC addChild_ancestor #-} -- FIXME: it would be more efficient to use a proper monoid instance -- toList $ children $ foldl' (+) ct' dps toList $ children $ foldr' (insertC...
586
addChild_ancestor :: ( ValidCT exprat childC leafC dp ) => AddChildMethod exprat childC leafC dp addChild_ancestor dp ct = {-# SCC addChild_ancestor #-} -- FIXME: it would be more efficient to use a proper monoid instance -- toList $ children $ foldl' (+) ct' dps toList $ children $ foldr' (insertC...
586
addChild_ancestor dp ct = {-# SCC addChild_ancestor #-} -- FIXME: it would be more efficient to use a proper monoid instance -- toList $ children $ foldl' (+) ct' dps toList $ children $ foldr' (insertCT addChild_ancestor) ct' $ concat $ map stToList dps where (acc',dps) = rmCloseChildren addC...
481
false
true
0
12
156
152
79
73
null
null
Reyu/CanidComics
Application.hs
apache-2.0
makeLogWare :: App -> IO Middleware makeLogWare foundation = mkRequestLogger def { outputFormat = if appDetailedRequestLogging $ appSettings foundation then Detailed True else Apache (if appIpFromHeader $ appSettings foundation ...
474
makeLogWare :: App -> IO Middleware makeLogWare foundation = mkRequestLogger def { outputFormat = if appDetailedRequestLogging $ appSettings foundation then Detailed True else Apache (if appIpFromHeader $ appSettings foundation ...
474
makeLogWare foundation = mkRequestLogger def { outputFormat = if appDetailedRequestLogging $ appSettings foundation then Detailed True else Apache (if appIpFromHeader $ appSettings foundation then FromFallback ...
438
false
true
0
13
194
88
45
43
null
null
vigoos/Farrago-OS
aura-master/aura-master/src/Aura/Commands/C.hs
gpl-2.0
reportBadDowngradePkgs :: [String] -> Aura () reportBadDowngradePkgs = badReport reportBadDowngradePkgs_1
105
reportBadDowngradePkgs :: [String] -> Aura () reportBadDowngradePkgs = badReport reportBadDowngradePkgs_1
105
reportBadDowngradePkgs = badReport reportBadDowngradePkgs_1
59
false
true
0
7
9
26
13
13
null
null
athanclark/clark-mining-tech
src/Pages/About/Management.hs
bsd-3-clause
homeContent :: ( Monad m , MonadReader Env m ) => HtmlT (AbsoluteUrlT T.Text m) () homeContent = do leader profile mountain services
170
homeContent :: ( Monad m , MonadReader Env m ) => HtmlT (AbsoluteUrlT T.Text m) () homeContent = do leader profile mountain services
170
homeContent = do leader profile mountain services
57
false
true
0
9
60
57
27
30
null
null
CindyLinz/Haskell.js
trans/src/Desugar/List.hs
mit
deListWarningText :: WarningText l -> WarningText l deListWarningText (DeprText l string) = DeprText (id l) (id string)
119
deListWarningText :: WarningText l -> WarningText l deListWarningText (DeprText l string) = DeprText (id l) (id string)
119
deListWarningText (DeprText l string) = DeprText (id l) (id string)
67
false
true
0
7
16
49
23
26
null
null
janschulz/pandoc
src/Text/Pandoc/Readers/TWiki.hs
gpl-2.0
macroWithParameters :: TWParser B.Inlines macroWithParameters = try $ do char '%' name <- macroName (content, kvs) <- attributes char '%' return $ buildSpan name kvs $ B.str content
191
macroWithParameters :: TWParser B.Inlines macroWithParameters = try $ do char '%' name <- macroName (content, kvs) <- attributes char '%' return $ buildSpan name kvs $ B.str content
191
macroWithParameters = try $ do char '%' name <- macroName (content, kvs) <- attributes char '%' return $ buildSpan name kvs $ B.str content
149
false
true
2
10
37
80
34
46
null
null
hvr/vector
Data/Vector.hs
bsd-3-clause
ifoldM_ = G.ifoldM_
19
ifoldM_ = G.ifoldM_
19
ifoldM_ = G.ifoldM_
19
false
false
1
6
2
12
4
8
null
null
TomMD/ghc
compiler/main/DynFlags.hs
bsd-3-clause
rawSettings :: DynFlags -> [(String, String)] rawSettings dflags = sRawSettings (settings dflags)
107
rawSettings :: DynFlags -> [(String, String)] rawSettings dflags = sRawSettings (settings dflags)
107
rawSettings dflags = sRawSettings (settings dflags)
51
false
true
0
9
21
42
20
22
null
null
cdxr/haskell-interface
src/LoadPackageInterface.hs
bsd-3-clause
makeModuleName :: Cabal.ModuleName -> Interface.ModuleName makeModuleName = intercalate "." . components
104
makeModuleName :: Cabal.ModuleName -> Interface.ModuleName makeModuleName = intercalate "." . components
104
makeModuleName = intercalate "." . components
45
false
true
0
6
10
26
13
13
null
null
dylex/hsaml2
SAML2/XML/Signature.hs
apache-2.0
applyCanonicalization m _ _ = fail $ "applyCanonicalization: unsupported " ++ show m
84
applyCanonicalization m _ _ = fail $ "applyCanonicalization: unsupported " ++ show m
84
applyCanonicalization m _ _ = fail $ "applyCanonicalization: unsupported " ++ show m
84
false
false
0
6
12
24
11
13
null
null
mcschroeder/ghc
compiler/types/OptCoercion.hs
bsd-3-clause
etaAppCo_maybe :: Coercion -> Maybe (Coercion,Coercion) -- If possible, split a coercion -- g :: t1a t1b ~ t2a t2b -- into a pair of coercions (left g, right g) etaAppCo_maybe co | Just (co1,co2) <- splitAppCo_maybe co = Just (co1,co2) | (Pair ty1 ty2, Nominal) <- coercionKindRole co , Just (_,t1) <- splitApp...
522
etaAppCo_maybe :: Coercion -> Maybe (Coercion,Coercion) etaAppCo_maybe co | Just (co1,co2) <- splitAppCo_maybe co = Just (co1,co2) | (Pair ty1 ty2, Nominal) <- coercionKindRole co , Just (_,t1) <- splitAppTy_maybe ty1 , Just (_,t2) <- splitAppTy_maybe ty2 , let isco1 = isCoercionTy t1 , let isco2 = isCoer...
415
etaAppCo_maybe co | Just (co1,co2) <- splitAppCo_maybe co = Just (co1,co2) | (Pair ty1 ty2, Nominal) <- coercionKindRole co , Just (_,t1) <- splitAppTy_maybe ty1 , Just (_,t2) <- splitAppTy_maybe ty2 , let isco1 = isCoercionTy t1 , let isco2 = isCoercionTy t2 , isco1 == isco2 = Just (LRCo CLeft co, LR...
359
true
true
0
11
112
195
96
99
null
null
lorcanmcdonald/mars
src/Mars/Command/Ls.hs
bsd-3-clause
spreadMaybe :: (a, Maybe b) -> Maybe (a, b) spreadMaybe = extractSpread
71
spreadMaybe :: (a, Maybe b) -> Maybe (a, b) spreadMaybe = extractSpread
71
spreadMaybe = extractSpread
27
false
true
0
7
11
33
18
15
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/enumFromThenTo_3.hs
mit
primMinusNat Zero (Succ y) = Neg (Succ y)
41
primMinusNat Zero (Succ y) = Neg (Succ y)
41
primMinusNat Zero (Succ y) = Neg (Succ y)
41
false
false
0
7
7
26
12
14
null
null
skejserjensen/Hangman
haskell/src/Hangman.hs
gpl-3.0
updateGuess guess (cg:cGuess) (rw:rWord) -- Both upper and lower case are checked as the word could be written with a combination | (rw == (toUpper guess)) = [rw] ++ (updateGuess guess cGuess rWord) | (rw == (toLower guess)) = [rw] ++ (updateGuess guess cGuess rWord) | otherwise = [cg] ++ (updateGuess g...
338
updateGuess guess (cg:cGuess) (rw:rWord) -- Both upper and lower case are checked as the word could be written with a combination | (rw == (toUpper guess)) = [rw] ++ (updateGuess guess cGuess rWord) | (rw == (toLower guess)) = [rw] ++ (updateGuess guess cGuess rWord) | otherwise = [cg] ++ (updateGuess g...
338
updateGuess guess (cg:cGuess) (rw:rWord) -- Both upper and lower case are checked as the word could be written with a combination | (rw == (toUpper guess)) = [rw] ++ (updateGuess guess cGuess rWord) | (rw == (toLower guess)) = [rw] ++ (updateGuess guess cGuess rWord) | otherwise = [cg] ++ (updateGuess g...
338
false
false
1
11
69
130
67
63
null
null
christetreault/graph-solver
src/first_attempt_Main.hs
gpl-3.0
sFn_goodFibs :: Int -> [Int] -> IO Int sFn_goodFibs n s = return $ foldl' goFibs n s where goFibs lhs rhs = goodFibs $ (lhs + rhs) `mod` 35 -- | Bad fibs implementation badFibs :: Int -> Int badFibs 0 = 0 badFibs 1 = 1 badFibs n = badFibs (n - 1) + badFibs (n - 2) -- | Good fibs implementation goodFibs :: In...
537
sFn_goodFibs :: Int -> [Int] -> IO Int sFn_goodFibs n s = return $ foldl' goFibs n s where goFibs lhs rhs = goodFibs $ (lhs + rhs) `mod` 35 -- | Bad fibs implementation badFibs :: Int -> Int badFibs 0 = 0 badFibs 1 = 1 badFibs n = badFibs (n - 1) + badFibs (n - 2) -- | Good fibs implementation goodFibs :: In...
537
sFn_goodFibs n s = return $ foldl' goFibs n s where goFibs lhs rhs = goodFibs $ (lhs + rhs) `mod` 35 -- | Bad fibs implementation badFibs :: Int -> Int badFibs 0 = 0 badFibs 1 = 1 badFibs n = badFibs (n - 1) + badFibs (n - 2) -- | Good fibs implementation goodFibs :: Int -> Int goodFibs 0 = 0 goodFibs 1 = 1 ...
498
false
true
0
9
149
251
133
118
null
null
unknownloner/calccomp
FORTH/Stdlib.hs
mit
wasm "MIN" = rtn [asm| pop de ;Return addr pop bc pop hl or a sbc hl,bc add hl,bc ;hl >= bc, push bc. Else push hl jr nc,$+5 push hl ex de,hl jp (hl) ;Jump end push bc ex de,hl jp (hl) |]
247
wasm "MIN" = rtn [asm| pop de ;Return addr pop bc pop hl or a sbc hl,bc add hl,bc ;hl >= bc, push bc. Else push hl jr nc,$+5 push hl ex de,hl jp (hl) ;Jump end push bc ex de,hl jp (hl) |]
247
wasm "MIN" = rtn [asm| pop de ;Return addr pop bc pop hl or a sbc hl,bc add hl,bc ;hl >= bc, push bc. Else push hl jr nc,$+5 push hl ex de,hl jp (hl) ;Jump end push bc ex de,hl jp (hl) |]
247
false
false
0
5
103
17
9
8
null
null
michaeljklein/HCy2C
Cycles/Maxcy.hs
mit
makeAsmCounter4 :: Int -> String makeAsmCounter4 j = unlines [" __asm__(", " \"popcnt %4, %4 \\n\\t\"", " \"add %4, %0 \\n\\t\"", " \"popcnt %5, %5 \\n\\t\"", "...
1,130
makeAsmCounter4 :: Int -> String makeAsmCounter4 j = unlines [" __asm__(", " \"popcnt %4, %4 \\n\\t\"", " \"add %4, %0 \\n\\t\"", " \"popcnt %5, %5 \\n\\t\"", "...
1,130
makeAsmCounter4 j = unlines [" __asm__(", " \"popcnt %4, %4 \\n\\t\"", " \"add %4, %0 \\n\\t\"", " \"popcnt %5, %5 \\n\\t\"", " \"add %5, %1 \\n\\...
1,097
false
true
3
14
579
182
98
84
null
null
Noeda/Megaman
src/NetHack/Data/NetHackState.hs
mit
resetLevelTransition :: NetHackState -> NetHackState resetLevelTransition ns = ns { levelTransition = Nothing }
111
resetLevelTransition :: NetHackState -> NetHackState resetLevelTransition ns = ns { levelTransition = Nothing }
111
resetLevelTransition ns = ns { levelTransition = Nothing }
58
false
true
0
6
13
26
14
12
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_CULL_FRAGMENT_NV :: GLenum gl_CULL_FRAGMENT_NV = 0x86E7
58
gl_CULL_FRAGMENT_NV :: GLenum gl_CULL_FRAGMENT_NV = 0x86E7
58
gl_CULL_FRAGMENT_NV = 0x86E7
28
false
true
0
4
5
11
6
5
null
null
plow-technologies/acid-cell
src/Data/Acid/Cell/TH/StateMakers.hs
bsd-3-clause
buildCheckPointAndCloseName :: StateName -> Name buildCheckPointAndCloseName stN = mkName.concat $ ["createCheckpointAndClose", (nameBase stN), "AC"]
149
buildCheckPointAndCloseName :: StateName -> Name buildCheckPointAndCloseName stN = mkName.concat $ ["createCheckpointAndClose", (nameBase stN), "AC"]
149
buildCheckPointAndCloseName stN = mkName.concat $ ["createCheckpointAndClose", (nameBase stN), "AC"]
100
false
true
0
8
13
39
21
18
null
null
ak3n/hseiffel
src/Codegen.hs
mit
load :: Operand -> Codegen Operand load ptr = instr $ Load False ptr Nothing 0 []
81
load :: Operand -> Codegen Operand load ptr = instr $ Load False ptr Nothing 0 []
81
load ptr = instr $ Load False ptr Nothing 0 []
46
false
true
0
7
16
38
18
20
null
null
silverweed/ketchup
example.hs
mit
post hnd req = do print $ parseBody $ body req sendWithMime hnd "text/html" "OK!"
91
post hnd req = do print $ parseBody $ body req sendWithMime hnd "text/html" "OK!"
91
post hnd req = do print $ parseBody $ body req sendWithMime hnd "text/html" "OK!"
91
false
false
0
8
24
35
15
20
null
null
jozefg/cooked-pi
src/LambdaPi/HOAS.hs
mit
eqTerm :: NF -> NF -> Bool eqTerm l r = runGenWith (successor s) (IGen 0) $ go l r where s (IGen i) = IGen (i + 1) s _ = error "Impossible!" go Star Star = return True go Bool Bool = return True go ETrue ETrue = return True go EFalse EFalse = return True go (Annot l r) ...
599
eqTerm :: NF -> NF -> Bool eqTerm l r = runGenWith (successor s) (IGen 0) $ go l r where s (IGen i) = IGen (i + 1) s _ = error "Impossible!" go Star Star = return True go Bool Bool = return True go ETrue ETrue = return True go EFalse EFalse = return True go (Annot l r) ...
599
eqTerm l r = runGenWith (successor s) (IGen 0) $ go l r where s (IGen i) = IGen (i + 1) s _ = error "Impossible!" go Star Star = return True go Bool Bool = return True go ETrue ETrue = return True go EFalse EFalse = return True go (Annot l r) (Annot l' r') = (&&) <$> go...
572
false
true
5
11
222
374
171
203
null
null
pascal-knodel/haskell-craft
_/links/E'4'16.hs
mit
isSummer _ = False
24
isSummer _ = False
24
isSummer _ = False
24
false
false
0
5
9
9
4
5
null
null
Icelandjack/lens
src/Language/Haskell/TH/Lens.hs
bsd-3-clause
matchDeclarations :: Lens' Match [Dec] matchDeclarations = lens g s where g (Match _ _ ds) = ds s (Match x y _ ) = Match x y
130
matchDeclarations :: Lens' Match [Dec] matchDeclarations = lens g s where g (Match _ _ ds) = ds s (Match x y _ ) = Match x y
130
matchDeclarations = lens g s where g (Match _ _ ds) = ds s (Match x y _ ) = Match x y
91
false
true
0
9
33
67
33
34
null
null
rueshyna/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
mpl-2.0
-- | This property has been deprecated. Use the -- contentDetails.contentRating.cncRating instead. crFmocRating :: Lens' ContentRating (Maybe ContentRatingFmocRating) crFmocRating = lens _crFmocRating (\ s a -> s{_crFmocRating = a})
234
crFmocRating :: Lens' ContentRating (Maybe ContentRatingFmocRating) crFmocRating = lens _crFmocRating (\ s a -> s{_crFmocRating = a})
135
crFmocRating = lens _crFmocRating (\ s a -> s{_crFmocRating = a})
67
true
true
0
9
30
49
26
23
null
null
Eugleo/Code-Wars
src/HaskellKata.hs
bsd-3-clause
testKata :: IO () testKata = print "Hey! Another super-useless function!"
73
testKata :: IO () testKata = print "Hey! Another super-useless function!"
73
testKata = print "Hey! Another super-useless function!"
55
false
true
0
6
10
19
9
10
null
null
ku-fpg/kansas-amber
System/Hardware/Haskino/Data.hs
bsd-3-clause
firmwareCmdVal BC_CMD_ITERATE = 0x14
46
firmwareCmdVal BC_CMD_ITERATE = 0x14
46
firmwareCmdVal BC_CMD_ITERATE = 0x14
46
false
false
0
5
13
9
4
5
null
null
sdiehl/ghc
compiler/utils/Pretty.hs
bsd-3-clause
-- | List version of '<>'. hcat :: [Doc] -> Doc hcat = reduceAB . foldr (beside_' False) empty
94
hcat :: [Doc] -> Doc hcat = reduceAB . foldr (beside_' False) empty
67
hcat = reduceAB . foldr (beside_' False) empty
46
true
true
0
8
18
34
18
16
null
null
kmate/HaRe
old/tools/pfe/Pfe1Cmds.hs
bsd-3-clause
lex2pragmas = mapMaybe pragma where pragma (NestedComment,(p,'{':'-':'#':s)) | last3 s=="#-}" = Just (p,droplast3 s) pragma _ = Nothing last3 = reverse . take 3 . reverse droplast3 = reverse . drop 3 . reverse
234
lex2pragmas = mapMaybe pragma where pragma (NestedComment,(p,'{':'-':'#':s)) | last3 s=="#-}" = Just (p,droplast3 s) pragma _ = Nothing last3 = reverse . take 3 . reverse droplast3 = reverse . drop 3 . reverse
234
lex2pragmas = mapMaybe pragma where pragma (NestedComment,(p,'{':'-':'#':s)) | last3 s=="#-}" = Just (p,droplast3 s) pragma _ = Nothing last3 = reverse . take 3 . reverse droplast3 = reverse . drop 3 . reverse
234
false
false
3
12
58
112
54
58
null
null
pgj/bead
src/Bead/View/Content/SubmissionList/Page.hs
bsd-3-clause
submissionList = ViewHandler submissionListPage
47
submissionList = ViewHandler submissionListPage
47
submissionList = ViewHandler submissionListPage
47
false
false
0
5
3
9
4
5
null
null
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/RDSOptionGroupOptionSetting.hs
mit
rdsOptionGroupOptionSetting :: RDSOptionGroupOptionSetting rdsOptionGroupOptionSetting = RDSOptionGroupOptionSetting { _rDSOptionGroupOptionSettingName = Nothing , _rDSOptionGroupOptionSettingValue = Nothing }
220
rdsOptionGroupOptionSetting :: RDSOptionGroupOptionSetting rdsOptionGroupOptionSetting = RDSOptionGroupOptionSetting { _rDSOptionGroupOptionSettingName = Nothing , _rDSOptionGroupOptionSettingValue = Nothing }
220
rdsOptionGroupOptionSetting = RDSOptionGroupOptionSetting { _rDSOptionGroupOptionSettingName = Nothing , _rDSOptionGroupOptionSettingValue = Nothing }
159
false
true
0
7
25
35
17
18
null
null
rhuancaetano/University-Works
Prog-I/program/road_module.hs
unlicense
-- deleta o custo retirado de uma string dropCostString :: [Char] -> [Char] dropCostString [] = []
98
dropCostString :: [Char] -> [Char] dropCostString [] = []
57
dropCostString [] = []
22
true
true
0
6
16
29
16
13
null
null
johnyhlee/media-tracker
src/Main.hs
gpl-2.0
getDateString :: String -> IO String getDateString "p" = return ""
66
getDateString :: String -> IO String getDateString "p" = return ""
66
getDateString "p" = return ""
29
false
true
0
6
10
24
11
13
null
null
raichoo/Idris-dev
src/Idris/Core/CaseTree.hs
bsd-3-clause
groupCons :: [Clause] -> CaseBuilder [Group] groupCons cs = gc [] cs where gc acc [] = return acc gc acc ((p : ps, res) : cs) = do acc' <- addGroup p ps res acc gc acc' cs addGroup p ps res acc = case p of PCon uniq con i args -> return $ addg uniq (CName con i) args (ps, res) a...
1,160
groupCons :: [Clause] -> CaseBuilder [Group] groupCons cs = gc [] cs where gc acc [] = return acc gc acc ((p : ps, res) : cs) = do acc' <- addGroup p ps res acc gc acc' cs addGroup p ps res acc = case p of PCon uniq con i args -> return $ addg uniq (CName con i) args (ps, res) a...
1,160
groupCons cs = gc [] cs where gc acc [] = return acc gc acc ((p : ps, res) : cs) = do acc' <- addGroup p ps res acc gc acc' cs addGroup p ps res acc = case p of PCon uniq con i args -> return $ addg uniq (CName con i) args (ps, res) acc PConst cval -> return $ addConG cv...
1,115
false
true
1
12
359
599
290
309
null
null
eijian/mkcpu
src/Logic/Register.hs
bsd-3-clause
{- | 1bit register IN : [!CLR,!LD,A,B] OUT: [Q] when CLO = LO -> Q = LO when LD = HI -> Q = A when LD = LO -> Q = B >>> lc_register1 [sLO, sLO, sHI, sHI] == [sLO] -- clear True >>> lc_register1 [sHI, sHI, sHI, sLO] == [sHI] -- select A True >>> lc_register1 [sHI, sHI, sLO, sHI] == [sLO] -- select A Tr...
1,070
lc_register1 :: LogicCircuit lc_register1 (c:l:a:b:_) = take 1 $ lc_dff_cp [c, sHI, d] where [d] = lc_multiplexer2ch [l, b, a] {- | 4bit register IN : [!CLR,!LD,A0,A1,A2,A3,B0,B1,B2,B3] OUT: [Q0,Q1,Q2,Q3] >>> let d0 = toBits "0000" >>> let d1 = toBits "1111" >>> let d2 = toBits "0101" >>> let d3 = toBits "...
612
lc_register1 (c:l:a:b:_) = take 1 $ lc_dff_cp [c, sHI, d] where [d] = lc_multiplexer2ch [l, b, a] {- | 4bit register IN : [!CLR,!LD,A0,A1,A2,A3,B0,B1,B2,B3] OUT: [Q0,Q1,Q2,Q3] >>> let d0 = toBits "0000" >>> let d1 = toBits "1111" >>> let d2 = toBits "0101" >>> let d3 = toBits "0011" >>> lc_register4 ([sLO,...
583
true
true
0
10
250
77
42
35
null
null
tjakway/ghcjvm
compiler/basicTypes/Name.hs
bsd-3-clause
-- | Make a name for a foreign call mkFCallName :: Unique -> String -> Name mkFCallName uniq str = mkInternalName uniq (mkVarOcc str) noSrcSpan
143
mkFCallName :: Unique -> String -> Name mkFCallName uniq str = mkInternalName uniq (mkVarOcc str) noSrcSpan
107
mkFCallName uniq str = mkInternalName uniq (mkVarOcc str) noSrcSpan
67
true
true
0
7
24
42
20
22
null
null
mhwombat/numeral-wains
src/ALife/Creatur/Wain/ImageID/Action.hs
bsd-3-clause
numeralFor Identify_7 = '7'
27
numeralFor Identify_7 = '7'
27
numeralFor Identify_7 = '7'
27
false
false
1
5
3
13
4
9
null
null
harrisi/on-being-better
list-expansion/Haskell/cis194/02/02-lists.hs
cc0-1.0
negateNumEvens'' :: [Int] -> Int negateNumEvens'' x = negate $ length $ filter even x
85
negateNumEvens'' :: [Int] -> Int negateNumEvens'' x = negate $ length $ filter even x
85
negateNumEvens'' x = negate $ length $ filter even x
52
false
true
0
6
14
34
17
17
null
null
fmapfmapfmap/amazonka
amazonka-kms/test/Test/AWS/Gen/KMS.hs
mpl-2.0
testGetKeyPolicyResponse :: GetKeyPolicyResponse -> TestTree testGetKeyPolicyResponse = res "GetKeyPolicyResponse" "fixture/GetKeyPolicyResponse.proto" kMS (Proxy :: Proxy GetKeyPolicy)
201
testGetKeyPolicyResponse :: GetKeyPolicyResponse -> TestTree testGetKeyPolicyResponse = res "GetKeyPolicyResponse" "fixture/GetKeyPolicyResponse.proto" kMS (Proxy :: Proxy GetKeyPolicy)
201
testGetKeyPolicyResponse = res "GetKeyPolicyResponse" "fixture/GetKeyPolicyResponse.proto" kMS (Proxy :: Proxy GetKeyPolicy)
140
false
true
0
6
30
36
17
19
null
null
sgillespie/ghc
compiler/utils/Outputable.hs
bsd-3-clause
isEmpty :: DynFlags -> SDoc -> Bool isEmpty dflags sdoc = Pretty.isEmpty $ runSDoc sdoc dummySDocContext where dummySDocContext = initSDocContext dflags PprDebug
164
isEmpty :: DynFlags -> SDoc -> Bool isEmpty dflags sdoc = Pretty.isEmpty $ runSDoc sdoc dummySDocContext where dummySDocContext = initSDocContext dflags PprDebug
164
isEmpty dflags sdoc = Pretty.isEmpty $ runSDoc sdoc dummySDocContext where dummySDocContext = initSDocContext dflags PprDebug
128
false
true
0
6
24
48
23
25
null
null
pparkkin/eta
libraries/base/System/IO.hs
bsd-3-clause
-- | @'withFile' name mode act@ opens a file using 'openFile' and passes -- the resulting handle to the computation @act@. The handle will be -- closed on exit from 'withFile', whether by normal termination or by -- raising an exception. If closing the handle raises an exception, then -- this exception will be raised...
496
withFile :: FilePath -> IOMode -> (Handle -> IO r) -> IO r withFile name mode = bracket (openFile name mode) hClose
115
withFile name mode = bracket (openFile name mode) hClose
56
true
true
0
11
88
64
33
31
null
null
peterokagey/haskellOEIS
test/External/A007318Spec.hs
apache-2.0
main :: IO () main = hspec spec
31
main :: IO () main = hspec spec
31
main = hspec spec
17
false
true
0
7
7
25
10
15
null
null
ekmett/bitwise
extra/benchmark.hs
bsd-3-clause
aFold :: A -> Bool aFold !a = {-# SCC "aFold" #-} foldl1' (/=) (A.elems a)
74
aFold :: A -> Bool aFold !a = {-# SCC "aFold" #-} foldl1' (/=) (A.elems a)
74
aFold !a = {-# SCC "aFold" #-} foldl1' (/=) (A.elems a)
55
false
true
0
8
15
35
18
17
null
null
Zigazou/containers
Data/Set/Base.hs
bsd-3-clause
isSubsetOfX :: Ord a => Set a -> Set a -> Bool isSubsetOfX Tip _ = True
71
isSubsetOfX :: Ord a => Set a -> Set a -> Bool isSubsetOfX Tip _ = True
71
isSubsetOfX Tip _ = True
24
false
true
0
8
16
37
17
20
null
null
safarijv/ncsa-logparse
src/Main.hs
bsd-3-clause
main :: IO () main = do args <- execParser opts logData <- getLog args let csv = toCSV logData BL.hPut stdout csv hPutStrLn stderr "Conversion to CSV completed." return ()
177
main :: IO () main = do args <- execParser opts logData <- getLog args let csv = toCSV logData BL.hPut stdout csv hPutStrLn stderr "Conversion to CSV completed." return ()
177
main = do args <- execParser opts logData <- getLog args let csv = toCSV logData BL.hPut stdout csv hPutStrLn stderr "Conversion to CSV completed." return ()
163
false
true
1
11
36
78
31
47
null
null
haskellweekly/haskellweekly.github.io
executables/haskell-weekly.hs
mit
sortIssues :: [Issue] -> [Issue] sortIssues = List.sortBy (Ord.comparing (Ord.Down . issueDay))
95
sortIssues :: [Issue] -> [Issue] sortIssues = List.sortBy (Ord.comparing (Ord.Down . issueDay))
95
sortIssues = List.sortBy (Ord.comparing (Ord.Down . issueDay))
62
false
true
0
10
11
43
23
20
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/playpen/misc/src/Phantom_GADT.hs
unlicense
p1g1 :: P1 G1 -> String p1g1 _ = "P1 G1"
41
p1g1 :: P1 G1 -> String p1g1 _ = "P1 G1"
41
p1g1 _ = "P1 G1"
16
false
true
0
7
11
27
11
16
null
null
DaMSL/K3
src/Language/K3/Core/Metaprogram.hs
apache-2.0
removeSCtxtFirst :: Identifier -> SpliceContext -> SpliceContext removeSCtxtFirst n ctxt = snd $ foldl removeOnFirst (False, []) ctxt where removeOnFirst (done, acc) senv = if done then (done, acc++[senv]) else removeIfPresent acc senv removeIfPresent acc senv = if Map.member n senv then (True, acc++[Map.dele...
357
removeSCtxtFirst :: Identifier -> SpliceContext -> SpliceContext removeSCtxtFirst n ctxt = snd $ foldl removeOnFirst (False, []) ctxt where removeOnFirst (done, acc) senv = if done then (done, acc++[senv]) else removeIfPresent acc senv removeIfPresent acc senv = if Map.member n senv then (True, acc++[Map.dele...
357
removeSCtxtFirst n ctxt = snd $ foldl removeOnFirst (False, []) ctxt where removeOnFirst (done, acc) senv = if done then (done, acc++[senv]) else removeIfPresent acc senv removeIfPresent acc senv = if Map.member n senv then (True, acc++[Map.delete n senv]) else (False, acc++[senv])
292
false
true
1
12
58
145
79
66
null
null
mrBliss/haddock
haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
bsd-2-clause
ppr_mono_ty ctxt_prec (HsFunTy ty1 ty2) u q = ppr_fun_ty ctxt_prec ty1 ty2 u q
80
ppr_mono_ty ctxt_prec (HsFunTy ty1 ty2) u q = ppr_fun_ty ctxt_prec ty1 ty2 u q
80
ppr_mono_ty ctxt_prec (HsFunTy ty1 ty2) u q = ppr_fun_ty ctxt_prec ty1 ty2 u q
80
false
false
0
7
15
34
16
18
null
null
HMPerson1/soi
src/Language/Soi/Internal/Codegen.hs
gpl-3.0
frem op1 op2 = instr F64 (FRem NoFastMathFlags op1 op2 [])
58
frem op1 op2 = instr F64 (FRem NoFastMathFlags op1 op2 [])
58
frem op1 op2 = instr F64 (FRem NoFastMathFlags op1 op2 [])
58
false
false
0
8
10
30
14
16
null
null
ghcjs/ghcjs
test/ghc/generics/gshow/Main.hs
mit
d1 = D1 (Just 'p') D0
21
d1 = D1 (Just 'p') D0
21
d1 = D1 (Just 'p') D0
21
false
false
1
6
5
22
8
14
null
null
SamirTalwar/advent-of-code
2015/AOC_05_2.hs
mit
main = do input <- lines <$> getContents let nice = filter isNice input print $ length nice
97
main = do input <- lines <$> getContents let nice = filter isNice input print $ length nice
97
main = do input <- lines <$> getContents let nice = filter isNice input print $ length nice
97
false
false
1
11
23
45
18
27
null
null
dan-t/Gamgine
Gamgine/Math/Vect.hs
bsd-3-clause
absVec v = V.map abs v
22
absVec v = V.map abs v
22
absVec v = V.map abs v
22
false
false
0
6
5
16
7
9
null
null
z0isch/advent-of-code
src/Day7.hs
bsd-3-clause
parseAnd = And <$> parseAtom <* string " AND " <*> parseAtom
60
parseAnd = And <$> parseAtom <* string " AND " <*> parseAtom
60
parseAnd = And <$> parseAtom <* string " AND " <*> parseAtom
60
false
false
5
6
11
28
11
17
null
null
kajigor/uKanren_transformations
test/auto/Test/Embed.hs
bsd-3-clause
v12' = V 12
11
v12' = V 12
11
v12' = V 12
11
false
false
0
5
3
9
4
5
null
null
fmapfmapfmap/amazonka
amazonka-elb/gen/Network/AWS/ELB/AddTags.hs
mpl-2.0
-- | Creates a value of 'AddTags' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'atLoadBalancerNames' -- -- * 'atTags' addTags :: NonEmpty Tag -- ^ 'atTags' -> AddTags addTags pTags_ = AddTags' { _atLoadBalancerNames ...
366
addTags :: NonEmpty Tag -- ^ 'atTags' -> AddTags addTags pTags_ = AddTags' { _atLoadBalancerNames = mempty , _atTags = _List1 # pTags_ }
160
addTags pTags_ = AddTags' { _atLoadBalancerNames = mempty , _atTags = _List1 # pTags_ }
103
true
true
0
8
85
56
31
25
null
null
nomeata/codeworld
codeworld-prediction/src/CodeWorld/Prediction/Trivial.hs
apache-2.0
handleNextEvent :: StepFun s -> AnimationRate -> TEvent s -> TState s -> TState s handleNextEvent step rate (target, event) = second event . timePasses step rate target
172
handleNextEvent :: StepFun s -> AnimationRate -> TEvent s -> TState s -> TState s handleNextEvent step rate (target, event) = second event . timePasses step rate target
172
handleNextEvent step rate (target, event) = second event . timePasses step rate target
90
false
true
0
9
31
66
31
35
null
null
kim/amazonka
amazonka-route53/gen/Network/AWS/Route53/Types.hs
mpl-2.0
-- | The observed health check status. srStatus :: Lens' StatusReport (Maybe Text) srStatus = lens _srStatus (\s a -> s { _srStatus = a })
138
srStatus :: Lens' StatusReport (Maybe Text) srStatus = lens _srStatus (\s a -> s { _srStatus = a })
99
srStatus = lens _srStatus (\s a -> s { _srStatus = a })
55
true
true
0
9
25
46
25
21
null
null
sgillespie/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
-- Monad comprehensions guardMName, liftMName, mzipName :: Name guardMName = varQual mONAD (fsLit "guard") guardMIdKey
129
guardMName, liftMName, mzipName :: Name guardMName = varQual mONAD (fsLit "guard") guardMIdKey
105
guardMName = varQual mONAD (fsLit "guard") guardMIdKey
65
true
true
0
7
25
29
17
12
null
null
Laar/CodeGenerating
src/Code/Generating/Utils/Exports.hs
bsd-3-clause
------------------------------------------------------------------------ -- | Tries to merge two `ExportSpec`s, when they can be merged return -- `Just` the result else `Nothing`. Two `ExportSpec`s can be merged -- when there is an `ExportSpec` that exports exactly as much as the two -- different `ExportSpec`s would e...
1,744
mergeExportSpec :: ExportSpec -> ExportSpec -> Maybe ExportSpec mergeExportSpec e1 e2 = case (e1,e2) of -- Easy cases -- EVar (EVar n1 q1, EVar n2 q2) -> onEq (n1, q1) (n2, q2) e1 -- +EAbs (EVar _ _, EAbs _) -> Nothing (EAbs q1 , EAbs q2) -> onEq q1 q2 e1 (EAbs _ , EVar _ _) -> ...
1,408
mergeExportSpec e1 e2 = case (e1,e2) of -- Easy cases -- EVar (EVar n1 q1, EVar n2 q2) -> onEq (n1, q1) (n2, q2) e1 -- +EAbs (EVar _ _, EAbs _) -> Nothing (EAbs q1 , EAbs q2) -> onEq q1 q2 e1 (EAbs _ , EVar _ _) -> Nothing -- +EThingAll (EThingAll q1, EThingAll q2) -> on...
1,344
true
true
27
7
498
452
251
201
null
null
23Skidoo/erp
ERP.hs
gpl-3.0
query _ _ [] = error "The RETURN list is not allowed to be empty!"
66
query _ _ [] = error "The RETURN list is not allowed to be empty!"
66
query _ _ [] = error "The RETURN list is not allowed to be empty!"
66
false
false
2
5
14
21
7
14
null
null
mcapodici/haskelllearn
tapl/src/Lib.hs
mit
smallStep (TPred TZero) = return TZero
38
smallStep (TPred TZero) = return TZero
38
smallStep (TPred TZero) = return TZero
38
false
false
0
7
5
18
8
10
null
null
frsoares/hsimplesearch
src/Search/Query.hs
gpl-2.0
-- | Helper function for queryExcludeWords. This is the function which does the actual exclusion of results. queryExcludeWord :: String -> [(String, [(String, [Integer])])] -> [(String, Int)] -> [(String, Int)] queryExcludeWord wordToExclude matches previousResult = let exclusionResults = queryWord wordToE...
411
queryExcludeWord :: String -> [(String, [(String, [Integer])])] -> [(String, Int)] -> [(String, Int)] queryExcludeWord wordToExclude matches previousResult = let exclusionResults = queryWord wordToExclude matches in deleteFirstsBy eqFst previousResult exclusionResults
302
queryExcludeWord wordToExclude matches previousResult = let exclusionResults = queryWord wordToExclude matches in deleteFirstsBy eqFst previousResult exclusionResults
200
true
true
0
11
79
93
52
41
null
null