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
shouya/poi
src/Webhook.hs
gpl-3.0
handlePath _ = return $ respondWithStatus NotFound
50
handlePath _ = return $ respondWithStatus NotFound
50
handlePath _ = return $ respondWithStatus NotFound
50
false
false
0
6
6
16
7
9
null
null
joe9/barrelfish
hake/ArchDefaults.hs
mit
cFlags = [ Str s | s <- [ "-Wno-packed-bitfield-compat" ] ] ++ commonCFlags
82
cFlags = [ Str s | s <- [ "-Wno-packed-bitfield-compat" ] ] ++ commonCFlags
82
cFlags = [ Str s | s <- [ "-Wno-packed-bitfield-compat" ] ] ++ commonCFlags
82
false
false
0
9
20
27
14
13
null
null
ksaveljev/hake-2
src/Game/Monsters/MGunner.hs
bsd-3-clause
frameDuck01 :: Int frameDuck01 = 201
36
frameDuck01 :: Int frameDuck01 = 201
36
frameDuck01 = 201
17
false
true
0
6
5
18
7
11
null
null
mcschroeder/ghc
compiler/stgSyn/StgLint.hs
bsd-3-clause
addInScopeVars :: [Id] -> LintM a -> LintM a addInScopeVars ids m = LintM $ \loc scope errs -> -- We check if these "new" ids are already -- in scope, i.e., we have *shadowing* going on. -- For now, it's just a "trace"; we may make -- a real error out of it... let new_set = mkVarSet ids in ...
580
addInScopeVars :: [Id] -> LintM a -> LintM a addInScopeVars ids m = LintM $ \loc scope errs -> -- We check if these "new" ids are already -- in scope, i.e., we have *shadowing* going on. -- For now, it's just a "trace"; we may make -- a real error out of it... let new_set = mkVarSet ids in ...
580
addInScopeVars ids m = LintM $ \loc scope errs -> -- We check if these "new" ids are already -- in scope, i.e., we have *shadowing* going on. -- For now, it's just a "trace"; we may make -- a real error out of it... let new_set = mkVarSet ids in -- After adding -fliberate-case, Simon decid...
535
false
true
0
11
136
94
49
45
null
null
AndrasKovacs/trie-vector
Data/TrieVector/ArrayPrimWrap.hs
mit
write = writeSmallArray#
24
write = writeSmallArray#
24
write = writeSmallArray#
24
false
false
0
4
2
6
3
3
null
null
mgrebenets/hackerrank
alg/strings/gem-stones.hs
mit
allAscii = ['a'..'z']
21
allAscii = ['a'..'z']
21
allAscii = ['a'..'z']
21
false
false
0
5
2
11
6
5
null
null
urbanslug/ghc
testsuite/tests/rename/should_compile/timing003.hs
bsd-3-clause
a081 = []
9
a081 = []
9
a081 = []
9
false
false
1
6
2
12
4
8
null
null
hbrouwer/pdrt-sandbox
src/Data/DRS/Input/String.hs
apache-2.0
parseCons s@(b:_) | b == '{' = parse $ dropOuterBrackets $ takeUpToMatchingBracket Curly s | otherwise = error "infelicitous input string" where parse :: String -> [DRSCon] parse [] = [] parse (',':s') = parse s' parse s' | pfx `elem` opNegString = Neg (parseDRS d1)...
1,740
parseCons s@(b:_) | b == '{' = parse $ dropOuterBrackets $ takeUpToMatchingBracket Curly s | otherwise = error "infelicitous input string" where parse :: String -> [DRSCon] parse [] = [] parse (',':s') = parse s' parse s' | pfx `elem` opNegString = Neg (parseDRS d1)...
1,740
parseCons s@(b:_) | b == '{' = parse $ dropOuterBrackets $ takeUpToMatchingBracket Curly s | otherwise = error "infelicitous input string" where parse :: String -> [DRSCon] parse [] = [] parse (',':s') = parse s' parse s' | pfx `elem` opNegString = Neg (parseDRS d1)...
1,740
false
false
18
22
593
699
351
348
null
null
shlevy/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
ppr_expr (HsProc pat (L _ (HsCmdTop cmd _ _ _))) = hsep [text "proc", ppr pat, ptext (sLit "->"), ppr cmd]
108
ppr_expr (HsProc pat (L _ (HsCmdTop cmd _ _ _))) = hsep [text "proc", ppr pat, ptext (sLit "->"), ppr cmd]
108
ppr_expr (HsProc pat (L _ (HsCmdTop cmd _ _ _))) = hsep [text "proc", ppr pat, ptext (sLit "->"), ppr cmd]
108
false
false
0
11
22
70
34
36
null
null
jean-edouard/manager
xec/Cmd.hs
gpl-2.0
boolM False _ = Nothing
23
boolM False _ = Nothing
23
boolM False _ = Nothing
23
false
false
0
5
4
11
5
6
null
null
sgraf812/feed-gipeda
tests/Acceptance.hs
bsd-3-clause
withAssertNoOutput :: Source IO ByteString -> String -> Managed () withAssertNoOutput content name = do asy <- managed $ withAsync $ catchAsyncException $ content $= CB.lines $$ do line <- await case mfilter (not . BS.null) line of Nothing -> return () Just sth -> liftIO $ assert...
453
withAssertNoOutput :: Source IO ByteString -> String -> Managed () withAssertNoOutput content name = do asy <- managed $ withAsync $ catchAsyncException $ content $= CB.lines $$ do line <- await case mfilter (not . BS.null) line of Nothing -> return () Just sth -> liftIO $ assert...
453
withAssertNoOutput content name = do asy <- managed $ withAsync $ catchAsyncException $ content $= CB.lines $$ do line <- await case mfilter (not . BS.null) line of Nothing -> return () Just sth -> liftIO $ assertFailure $ "should not write any output to " ++ name ++ ...
386
false
true
0
19
123
159
73
86
null
null
yyotti/euler_haskell
src/P014.hs
mit
-- 全ての数でコラッツ数列を出してその長さをとる -- コラッツ数列そのものが欲しいわけではないので、長さだけカウントする solveBasic :: Int -> Int solveBasic = snd . maximum . map (collatzChainLen A.&&& id) . enumFromTo 1
162
solveBasic :: Int -> Int solveBasic = snd . maximum . map (collatzChainLen A.&&& id) . enumFromTo 1
99
solveBasic = snd . maximum . map (collatzChainLen A.&&& id) . enumFromTo 1
74
true
true
1
9
21
51
24
27
null
null
MaartenFaddegon/libgraph
Data/Graph/Libgraph/Dot.hs
bsd-3-clause
escape' _ ('\\' : ss) = '\\' : '\\' : escape' False ss
70
escape' _ ('\\' : ss) = '\\' : '\\' : escape' False ss
70
escape' _ ('\\' : ss) = '\\' : '\\' : escape' False ss
70
false
false
0
7
28
31
15
16
null
null
MaxGabriel/yesod
yesod-form/Yesod/Form/I18n/Russian.hs
mit
russianFormMessage MsgBoolNo = "Нет"
36
russianFormMessage MsgBoolNo = "Нет"
36
russianFormMessage MsgBoolNo = "Нет"
36
false
false
0
5
3
9
4
5
null
null
sphynx/turnir
src/TurnirShell.hs
bsd-3-clause
passPlayersState :: ShellState -> IO PlayersShellState passPlayersState st = return PlayersShellState { playersList = stPlayers st , playersMaxId = stMaxPlayerId st }
199
passPlayersState :: ShellState -> IO PlayersShellState passPlayersState st = return PlayersShellState { playersList = stPlayers st , playersMaxId = stMaxPlayerId st }
199
passPlayersState st = return PlayersShellState { playersList = stPlayers st , playersMaxId = stMaxPlayerId st }
144
false
true
0
8
54
52
24
28
null
null
pniedzielski/fowlie-mga
src/Main.hs
gpl-3.0
-- | 'stabilize' returns the cycle of a transformation 't' that has a -- single value cycle when applied to 'initial'. Precondition: 't'^𝓃 -- applied to 'initial' describes an orbit over a subset of α with a -- cycle that contains a single value. stablize ∷ Eq α ⇒ (α → α) → α → α stablize f initial | initial' ≡ ini...
592
stablize ∷ Eq α ⇒ (α → α) → α → α stablize f initial | initial' ≡ initial = initial | otherwise = stablize f initial' where initial' = f initial -- | 'modifyFirst' takes in a list, a predicate, and a transformation, -- and returns a new list with the first element to match the -- predicate modified by t...
344
stablize f initial | initial' ≡ initial = initial | otherwise = stablize f initial' where initial' = f initial -- | 'modifyFirst' takes in a list, a predicate, and a transformation, -- and returns a new list with the first element to match the -- predicate modified by the given transformation.
310
true
true
1
8
124
78
41
37
null
null
rueshyna/gogol
gogol-affiliates/gen/Network/Google/Affiliates/Types/Product.hs
mpl-2.0
-- | Date that this link becomes active. lStartDate :: Lens' Link (Maybe UTCTime) lStartDate = lens _lStartDate (\ s a -> s{_lStartDate = a}) . mapping _DateTime
169
lStartDate :: Lens' Link (Maybe UTCTime) lStartDate = lens _lStartDate (\ s a -> s{_lStartDate = a}) . mapping _DateTime
128
lStartDate = lens _lStartDate (\ s a -> s{_lStartDate = a}) . mapping _DateTime
87
true
true
2
9
35
62
28
34
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Healthcare/Types/Product.hs
mpl-2.0
-- | Optional. Default value of the attribute in User data mappings. If no -- default value is specified, it defaults to an empty value. This field is -- only applicable to attributes of the category \`RESOURCE\`. adDataMAppingDefaultValue :: Lens' AttributeDefinition (Maybe Text) adDataMAppingDefaultValue = lens _ad...
394
adDataMAppingDefaultValue :: Lens' AttributeDefinition (Maybe Text) adDataMAppingDefaultValue = lens _adDataMAppingDefaultValue (\ s a -> s{_adDataMAppingDefaultValue = a})
180
adDataMAppingDefaultValue = lens _adDataMAppingDefaultValue (\ s a -> s{_adDataMAppingDefaultValue = a})
112
true
true
1
9
61
54
27
27
null
null
sopvop/cabal
Cabal/Distribution/PackageDescription/PrettyPrint.hs
bsd-3-clause
-- | Recompile with false for regression testing simplifiedPrinting :: Bool simplifiedPrinting = False
102
simplifiedPrinting :: Bool simplifiedPrinting = False
53
simplifiedPrinting = False
26
true
true
0
4
13
12
7
5
null
null
philopon/philopon.github.io
SearchIndex.hs
bsd-3-clause
reverseIndex :: [Item (S.Set T.Text)] -> H.HashMap T.Text [Int] reverseIndex items = let mrps = S.toList . S.unions $ map itemBody items is = zip [0..] items in H.fromList $ map (\m -> (m, map fst $ filter (\i -> m `S.member` (itemBody . snd) i) is)) mrps
274
reverseIndex :: [Item (S.Set T.Text)] -> H.HashMap T.Text [Int] reverseIndex items = let mrps = S.toList . S.unions $ map itemBody items is = zip [0..] items in H.fromList $ map (\m -> (m, map fst $ filter (\i -> m `S.member` (itemBody . snd) i) is)) mrps
274
reverseIndex items = let mrps = S.toList . S.unions $ map itemBody items is = zip [0..] items in H.fromList $ map (\m -> (m, map fst $ filter (\i -> m `S.member` (itemBody . snd) i) is)) mrps
210
false
true
0
19
66
150
77
73
null
null
DougBurke/swish
tests/VarBindingTest.hs
lgpl-2.1
vb14 = joinVarBindings vb1 vb4
30
vb14 = joinVarBindings vb1 vb4
30
vb14 = joinVarBindings vb1 vb4
30
false
false
0
5
4
11
5
6
null
null
mcmaniac/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
pprCLabel _ PicBaseLabel | cGhcWithNativeCodeGen == "YES" = ptext (sLit "1b")
81
pprCLabel _ PicBaseLabel | cGhcWithNativeCodeGen == "YES" = ptext (sLit "1b")
81
pprCLabel _ PicBaseLabel | cGhcWithNativeCodeGen == "YES" = ptext (sLit "1b")
81
false
false
1
8
14
32
13
19
null
null
aszlig/language-javascript
src/Language/JavaScript/Parser/Parser.hs
bsd-3-clause
parseFile :: FilePath -> IO AST.JSNode parseFile filename = do x <- readFile (filename) return $ readJs x
117
parseFile :: FilePath -> IO AST.JSNode parseFile filename = do x <- readFile (filename) return $ readJs x
117
parseFile filename = do x <- readFile (filename) return $ readJs x
78
false
true
0
10
29
51
22
29
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/NV/FloatBuffer.hs
bsd-3-clause
gl_TEXTURE_FLOAT_COMPONENTS :: GLenum gl_TEXTURE_FLOAT_COMPONENTS = 0x888C
74
gl_TEXTURE_FLOAT_COMPONENTS :: GLenum gl_TEXTURE_FLOAT_COMPONENTS = 0x888C
74
gl_TEXTURE_FLOAT_COMPONENTS = 0x888C
36
false
true
0
4
5
11
6
5
null
null
AaronFriel/eff-experiments
src/Data/Iota/Tagged/Eff1.hs
bsd-3-clause
interpose :: Member t r => (a -> Eff r w) -> (forall v. t v -> Arr r v w -> Eff r w) -> Eff r a -> Eff r w interpose ret h m = loop m where loop (Val x) = ret x loop (E u q) = case prj u of Just x -> h x k _ -> E u (tsingleton k) where k = qComp q loop -- ---------...
702
interpose :: Member t r => (a -> Eff r w) -> (forall v. t v -> Arr r v w -> Eff r w) -> Eff r a -> Eff r w interpose ret h m = loop m where loop (Val x) = ret x loop (E u q) = case prj u of Just x -> h x k _ -> E u (tsingleton k) where k = qComp q loop -- ---------...
702
interpose ret h m = loop m where loop (Val x) = ret x loop (E u q) = case prj u of Just x -> h x k _ -> E u (tsingleton k) where k = qComp q loop -- ------------------------------------------------------------------------ -- The Reader monad -- The request for a value of type e from the cu...
569
false
true
1
13
197
200
93
107
null
null
brendanhay/gogol
gogol-containeranalysis/gen/Network/Google/Resource/ContainerAnalysis/Projects/Occurrences/BatchCreate.hs
mpl-2.0
-- | Multipart request metadata. pobcPayload :: Lens' ProjectsOccurrencesBatchCreate BatchCreateOccurrencesRequest pobcPayload = lens _pobcPayload (\ s a -> s{_pobcPayload = a})
179
pobcPayload :: Lens' ProjectsOccurrencesBatchCreate BatchCreateOccurrencesRequest pobcPayload = lens _pobcPayload (\ s a -> s{_pobcPayload = a})
146
pobcPayload = lens _pobcPayload (\ s a -> s{_pobcPayload = a})
64
true
true
0
9
22
42
22
20
null
null
1HaskellADay/1HAD
exercises/HAD/Y2014/M04/D17/Solution.hs
mit
{- | countEqualAdjacentPairs Count pairs of values that are equal in a matrix. Examples: >>> countEqualAdjacentPairs [[0,1],[0,2]] 1 >>> countEqualAdjacentPairs [[0,0],[1,2]] 1 >>> countEqualAdjacentPairs [[0,1],[0,0]] 2 >>> countEqualAdjacentPairs [['a','a'],['a','a']] 4 >>> countEq...
504
countEqualAdjacentPairs :: Eq a => [[a]] -> Int countEqualAdjacentPairs = length . (tail =<<) . (group =<<) . ((++) =<< transpose)
132
countEqualAdjacentPairs = length . (tail =<<) . (group =<<) . ((++) =<< transpose)
84
true
true
0
8
96
58
34
24
null
null
kishoredbn/barrelfish
tools/mackerel/Checks.hs
mit
check_all :: String -> Dev.Rec -> Maybe [String] check_all inf dev = let errors = (check_devname inf dev) ++ (check_rous dev) ++ (check_dous dev) ++ (check_undef_consts dev) ++ (check_undef_regtypes dev) ++ (check_dup_types dev ) ...
834
check_all :: String -> Dev.Rec -> Maybe [String] check_all inf dev = let errors = (check_devname inf dev) ++ (check_rous dev) ++ (check_dous dev) ++ (check_undef_consts dev) ++ (check_undef_regtypes dev) ++ (check_dup_types dev ) ...
834
check_all inf dev = let errors = (check_devname inf dev) ++ (check_rous dev) ++ (check_dous dev) ++ (check_undef_consts dev) ++ (check_undef_regtypes dev) ++ (check_dup_types dev ) ++ (check_dup_regs dev ) ++ ...
785
false
true
0
19
377
259
133
126
null
null
oldmanmike/ghc
compiler/utils/Pretty.hs
bsd-3-clause
beside_' g p q = Beside p g q
33
beside_' g p q = Beside p g q
33
beside_' g p q = Beside p g q
33
false
false
0
5
12
20
9
11
null
null
kowey/hakyll-convert
src/Hakyll/Convert/Wordpress.hs
bsd-3-clause
-- | Find first immediate child of `root` which is named `name`. findChild :: Name -> Element -> Maybe Element findChild name element = let subelements = elementChildren element matching = filter (\child -> elementName child == name) subelements in listToMaybe matching
280
findChild :: Name -> Element -> Maybe Element findChild name element = let subelements = elementChildren element matching = filter (\child -> elementName child == name) subelements in listToMaybe matching
215
findChild name element = let subelements = elementChildren element matching = filter (\child -> elementName child == name) subelements in listToMaybe matching
169
true
true
0
13
52
70
34
36
null
null
ndmitchell/extra
src/Data/IORef/Extra.hs
bsd-3-clause
tomicWriteIORef' :: IORef a -> a -> IO () atomicWriteIORef' ref x = do evaluate x atomicWriteIORef ref x -- | Variant of 'atomicModifyIORef' which ignores the return value
182
atomicWriteIORef' :: IORef a -> a -> IO () atomicWriteIORef' ref x = do evaluate x atomicWriteIORef ref x -- | Variant of 'atomicModifyIORef' which ignores the return value
182
atomicWriteIORef' ref x = do evaluate x atomicWriteIORef ref x -- | Variant of 'atomicModifyIORef' which ignores the return value
139
false
true
0
8
39
47
21
26
null
null
atomb/dalvik
Dalvik/AccessFlags.hs
bsd-3-clause
flagString ACC_ANNOTATION = "ANNOTATION"
40
flagString ACC_ANNOTATION = "ANNOTATION"
40
flagString ACC_ANNOTATION = "ANNOTATION"
40
false
false
0
4
3
10
4
6
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/HTMLInputElement.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement.formAction Mozilla HTMLInputElement.formAction documentation> getFormAction :: (MonadDOM m, FromJSString result) => HTMLInputElement -> m result getFormAction self = liftDOM ((self ^. js "formAction") >>= fromJSValUnchecked)
313
getFormAction :: (MonadDOM m, FromJSString result) => HTMLInputElement -> m result getFormAction self = liftDOM ((self ^. js "formAction") >>= fromJSValUnchecked)
178
getFormAction self = liftDOM ((self ^. js "formAction") >>= fromJSValUnchecked)
81
true
true
0
10
43
57
29
28
null
null
gennady-em/haskel
src/E_Yi.hs
gpl-2.0
-- -- | default values to use if no ~/.yi/Config.hs is found -- dflt_config :: Editor.Config dflt_config = Editor.Config { Editor.keymap = Vim.keymap, Editor.style = Style.ui }
199
dflt_config :: Editor.Config dflt_config = Editor.Config { Editor.keymap = Vim.keymap, Editor.style = Style.ui }
135
dflt_config = Editor.Config { Editor.keymap = Vim.keymap, Editor.style = Style.ui }
106
true
true
0
8
49
50
26
24
null
null
m4dc4p/haskelldb
test/TestCases.hs
bsd-3-clause
testBracketing3 = noDBTest "Testing that properly bracketed SQL is generated (3)." $ do let qryTxt = showSql $ do s <- table int_tbl restrict ((s ! TInt.f02 .==. s ! TInt.f02) .||. (s ! TInt.f02 .==. s ! TInt.f02)) restrict ((s ! TInt.f02 .==. s ! TInt.f02) .||. (s !...
818
testBracketing3 = noDBTest "Testing that properly bracketed SQL is generated (3)." $ do let qryTxt = showSql $ do s <- table int_tbl restrict ((s ! TInt.f02 .==. s ! TInt.f02) .||. (s ! TInt.f02 .==. s ! TInt.f02)) restrict ((s ! TInt.f02 .==. s ! TInt.f02) .||. (s !...
818
testBracketing3 = noDBTest "Testing that properly bracketed SQL is generated (3)." $ do let qryTxt = showSql $ do s <- table int_tbl restrict ((s ! TInt.f02 .==. s ! TInt.f02) .||. (s ! TInt.f02 .==. s ! TInt.f02)) restrict ((s ! TInt.f02 .==. s ! TInt.f02) .||. (s !...
818
false
false
0
21
255
227
113
114
null
null
ivanmurashko/tests
hs/cabaldemo/src/Data.hs
mit
m :: Integer m=64
17
m :: Integer m=64
17
m=64
4
false
true
0
6
3
18
7
11
null
null
kmicklas/pyrec
src/Pyrec/LLVM.hs
mit
ptr t = PointerType t $ AddrSpace 0
35
ptr t = PointerType t $ AddrSpace 0
35
ptr t = PointerType t $ AddrSpace 0
35
false
false
1
6
7
22
8
14
null
null
daleooo/barrelfish
tools/flounder/CAbsSyntax.hs
mit
pp_typespec (Volatile t) n = "volatile " ++ pp_typespec t n
59
pp_typespec (Volatile t) n = "volatile " ++ pp_typespec t n
59
pp_typespec (Volatile t) n = "volatile " ++ pp_typespec t n
59
false
false
0
7
10
26
12
14
null
null
akhileshs/stack
src/Stack/Options.hs
bsd-3-clause
-- | Parser for test arguments. testOptsParser :: Parser TestOpts testOptsParser = TestOpts <$> boolFlags True "rerun-tests" "running already successful tests" idm <*> fmap (fromMaybe []) (optional (argsOption(long "test-argume...
772
testOptsParser :: Parser TestOpts testOptsParser = TestOpts <$> boolFlags True "rerun-tests" "running already successful tests" idm <*> fmap (fromMaybe []) (optional (argsOption(long "test-arguments" <> ...
740
testOptsParser = TestOpts <$> boolFlags True "rerun-tests" "running already successful tests" idm <*> fmap (fromMaybe []) (optional (argsOption(long "test-arguments" <> metavar "TEST_ARGS" ...
706
true
true
6
14
343
131
63
68
null
null
kazu-yamamoto/wai
warp/Network/Wai/Handler/Warp/Response.hs
mit
hasBody :: H.Status -> Bool hasBody s = sc /= 204 && sc /= 304 && sc >= 200 where sc = H.statusCode s ----------------------------------------------------------------
191
hasBody :: H.Status -> Bool hasBody s = sc /= 204 && sc /= 304 && sc >= 200 where sc = H.statusCode s ----------------------------------------------------------------
191
hasBody s = sc /= 204 && sc /= 304 && sc >= 200 where sc = H.statusCode s ----------------------------------------------------------------
163
false
true
11
7
49
70
31
39
null
null
nick0x01/Win32-services
src/System/Win32/SystemServices/Services/SERVICE_ACCEPT.hs
bsd-3-clause
flag :: [SERVICE_ACCEPT] -> DWORD flag fs = foldl (\flag' f -> flag' .|. toDWORD f) 0 fs
88
flag :: [SERVICE_ACCEPT] -> DWORD flag fs = foldl (\flag' f -> flag' .|. toDWORD f) 0 fs
88
flag fs = foldl (\flag' f -> flag' .|. toDWORD f) 0 fs
54
false
true
0
9
17
51
24
27
null
null
mostalive/yak-o-matic
YakGraph.hs
bsd-3-clause
parseGraph :: String -> DotGraph String parseGraph = parseIt'.pack
67
parseGraph :: String -> DotGraph String parseGraph = parseIt'.pack
67
parseGraph = parseIt'.pack
27
false
true
0
6
9
20
10
10
null
null
sajith/cis194
hw05/Calc.hs
mit
testMM = testExp :: Maybe MinMax
37
testMM = testExp :: Maybe MinMax
37
testMM = testExp :: Maybe MinMax
37
false
false
0
5
10
12
6
6
null
null
FranklinChen/Idris-dev
src/IRTS/CodegenJavaScript.hs
bsd-3-clause
translateConstant (B32 b) = JSWord (JSWord32 b)
64
translateConstant (B32 b) = JSWord (JSWord32 b)
64
translateConstant (B32 b) = JSWord (JSWord32 b)
64
false
false
0
7
23
25
11
14
null
null
kim/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types.hs
mpl-2.0
-- | The ID of the subnet associated with the network string. Applies only if -- creating a network interface when launching an instance. inisSubnetId :: Lens' InstanceNetworkInterfaceSpecification (Maybe Text) inisSubnetId = lens _inisSubnetId (\s a -> s { _inisSubnetId = a })
278
inisSubnetId :: Lens' InstanceNetworkInterfaceSpecification (Maybe Text) inisSubnetId = lens _inisSubnetId (\s a -> s { _inisSubnetId = a })
140
inisSubnetId = lens _inisSubnetId (\s a -> s { _inisSubnetId = a })
67
true
true
1
9
42
53
26
27
null
null
alphaHeavy/cabal
cabal-install/Distribution/Client/Init.hs
bsd-3-clause
chooseDep flags (m, Just []) = message flags ("\nWarning: no package found providing " ++ display m ++ ".") >> return Nothing
131
chooseDep flags (m, Just []) = message flags ("\nWarning: no package found providing " ++ display m ++ ".") >> return Nothing
131
chooseDep flags (m, Just []) = message flags ("\nWarning: no package found providing " ++ display m ++ ".") >> return Nothing
131
false
false
0
10
27
48
23
25
null
null
mainland/dph
dph-examples/examples/spectral/Pluecker/MainBatch.hs
bsd-3-clause
output :: Int -> Int -> VU.Vector Colour -> IO () output width height v = do let words = VU.concatMap mkwords v let rgba = B.pack (VU.toList words) let bmp = packRGBA32ToBMP width height rgba writeBMP "out.bmp" bmp where mkwords (r,g,b) = VU.fromList [w r, w g, w b, 0] w c = truncate...
339
output :: Int -> Int -> VU.Vector Colour -> IO () output width height v = do let words = VU.concatMap mkwords v let rgba = B.pack (VU.toList words) let bmp = packRGBA32ToBMP width height rgba writeBMP "out.bmp" bmp where mkwords (r,g,b) = VU.fromList [w r, w g, w b, 0] w c = truncate...
339
output width height v = do let words = VU.concatMap mkwords v let rgba = B.pack (VU.toList words) let bmp = packRGBA32ToBMP width height rgba writeBMP "out.bmp" bmp where mkwords (r,g,b) = VU.fromList [w r, w g, w b, 0] w c = truncate (c * 255) :: Word8
289
false
true
0
13
95
169
81
88
null
null
Lythimus/lptv
sites/all/modules/jgm-pandoc-8be6cc2/src/Text/Pandoc/Writers/RST.hs
gpl-2.0
definitionListItemToRST :: ([Inline], [[Block]]) -> State WriterState Doc definitionListItemToRST (label, defs) = do label' <- inlineListToRST label contents <- liftM vcat $ mapM blockListToRST defs tabstop <- get >>= (return . writerTabStop . stOptions) return $ label' $$ nest tabstop (contents <> cr) -- | Co...
363
definitionListItemToRST :: ([Inline], [[Block]]) -> State WriterState Doc definitionListItemToRST (label, defs) = do label' <- inlineListToRST label contents <- liftM vcat $ mapM blockListToRST defs tabstop <- get >>= (return . writerTabStop . stOptions) return $ label' $$ nest tabstop (contents <> cr) -- | Co...
363
definitionListItemToRST (label, defs) = do label' <- inlineListToRST label contents <- liftM vcat $ mapM blockListToRST defs tabstop <- get >>= (return . writerTabStop . stOptions) return $ label' $$ nest tabstop (contents <> cr) -- | Convert list of Pandoc block elements to RST.
289
false
true
0
11
61
119
60
59
null
null
paolino/dependencies-sm
Dependency/Graph.hs
bsd-3-clause
cycleDetect :: Ord a => [(a,S.Set a)] -- ^ the graph -> Bool -- ^ True if a cycle was detected cycleDetect [] = False
145
cycleDetect :: Ord a => [(a,S.Set a)] -- ^ the graph -> Bool cycleDetect [] = False
111
cycleDetect [] = False
22
true
true
0
11
52
49
24
25
null
null
acowley/ghc
compiler/coreSyn/CoreUtils.hs
bsd-3-clause
eqTickish _ l r = l == r
24
eqTickish _ l r = l == r
24
eqTickish _ l r = l == r
24
false
false
0
5
7
17
8
9
null
null
jBugman/explore
process-haskell/src/Process.hs
mit
processFile :: String -> String -> IO String processFile field filename = do contents <- B.readFile filename let json = parseJson contents let value = getFieldValue json field evaluate value
206
processFile :: String -> String -> IO String processFile field filename = do contents <- B.readFile filename let json = parseJson contents let value = getFieldValue json field evaluate value
206
processFile field filename = do contents <- B.readFile filename let json = parseJson contents let value = getFieldValue json field evaluate value
161
false
true
0
11
45
76
32
44
null
null
tjakway/ghcjvm
compiler/main/DynFlags.hs
bsd-3-clause
-- Might be worth caching these in targetPlatform? tARGET_MIN_INT, tARGET_MAX_INT, tARGET_MAX_WORD :: DynFlags -> Integer tARGET_MIN_INT dflags = case platformWordSize (targetPlatform dflags) of 4 -> toInteger (minBound :: Int32) 8 -> toInteger (minBound :: Int64) w -> panic ("tARGET_MIN_INT: Unkn...
354
tARGET_MIN_INT, tARGET_MAX_INT, tARGET_MAX_WORD :: DynFlags -> Integer tARGET_MIN_INT dflags = case platformWordSize (targetPlatform dflags) of 4 -> toInteger (minBound :: Int32) 8 -> toInteger (minBound :: Int64) w -> panic ("tARGET_MIN_INT: Unknown platformWordSize: " ++ show w)
303
tARGET_MIN_INT dflags = case platformWordSize (targetPlatform dflags) of 4 -> toInteger (minBound :: Int32) 8 -> toInteger (minBound :: Int64) w -> panic ("tARGET_MIN_INT: Unknown platformWordSize: " ++ show w)
232
true
true
4
11
66
95
45
50
null
null
olorin/amazonka
amazonka-ec2/gen/Network/AWS/EC2/Types/Product.hs
mpl-2.0
-- | The ICMP code. A value of -1 means all codes for the specified ICMP -- type. itcType :: Lens' ICMPTypeCode (Maybe Int) itcType = lens _itcType (\ s a -> s{_itcType = a})
174
itcType :: Lens' ICMPTypeCode (Maybe Int) itcType = lens _itcType (\ s a -> s{_itcType = a})
92
itcType = lens _itcType (\ s a -> s{_itcType = a})
50
true
true
0
9
34
47
26
21
null
null
ribag/ganeti-experiments
src/Ganeti/Utils.hs
gpl-2.0
setOwnerWGroupR :: FilePath -> IO () setOwnerWGroupR path = setFileMode path mode where mode = foldl unionFileModes nullFileMode [ownerReadMode, ownerWriteMode, groupReadMode] -- | Formats an integral number, appending a suffix.
252
setOwnerWGroupR :: FilePath -> IO () setOwnerWGroupR path = setFileMode path mode where mode = foldl unionFileModes nullFileMode [ownerReadMode, ownerWriteMode, groupReadMode] -- | Formats an integral number, appending a suffix.
252
setOwnerWGroupR path = setFileMode path mode where mode = foldl unionFileModes nullFileMode [ownerReadMode, ownerWriteMode, groupReadMode] -- | Formats an integral number, appending a suffix.
215
false
true
1
8
53
62
28
34
null
null
ezyang/ghc
compiler/coreSyn/MkCore.hs
bsd-3-clause
mkCoreLams :: [CoreBndr] -> CoreExpr -> CoreExpr mkCoreLams = mkLams
68
mkCoreLams :: [CoreBndr] -> CoreExpr -> CoreExpr mkCoreLams = mkLams
68
mkCoreLams = mkLams
19
false
true
0
8
9
29
13
16
null
null
stevej/stackist
src/Stackist/Parser.hs
apache-2.0
parseList :: Parser Expr parseList = fmap Quote $ sepBy parseExpr spaces
72
parseList :: Parser Expr parseList = fmap Quote $ sepBy parseExpr spaces
72
parseList = fmap Quote $ sepBy parseExpr spaces
47
false
true
0
6
11
26
12
14
null
null
dreamcodez/bonedewd
src/BoneDewd/RawPacket.hs
bsd-3-clause
recvAppPacket :: Word8 -> Handle -> IO B.ByteString -- [0x00] 104 bytes long recvAppPacket 0x00 peer = hGet peer 103
116
recvAppPacket :: Word8 -> Handle -> IO B.ByteString recvAppPacket 0x00 peer = hGet peer 103
91
recvAppPacket 0x00 peer = hGet peer 103
39
true
true
0
8
19
35
17
18
null
null
foreverbell/parakeet
src/Parakeet/Parser/Stage1.hs
mit
romaji :: [L.Romaji L.Bundle] -> Parser (L.Romaji L.Bundle) romaji rs = L.wrap <$> choice (map (try . fuzzy) rs') <?> show (length rs) ++ " romaji token(s) namely (" ++ intercalate ", " rs' ++ ")" where rs' = map L.unwrap rs fuzzy :: String -> Parser String fuzzy s = return s <* forM_ s match ...
482
romaji :: [L.Romaji L.Bundle] -> Parser (L.Romaji L.Bundle) romaji rs = L.wrap <$> choice (map (try . fuzzy) rs') <?> show (length rs) ++ " romaji token(s) namely (" ++ intercalate ", " rs' ++ ")" where rs' = map L.unwrap rs fuzzy :: String -> Parser String fuzzy s = return s <* forM_ s match ...
482
romaji rs = L.wrap <$> choice (map (try . fuzzy) rs') <?> show (length rs) ++ " romaji token(s) namely (" ++ intercalate ", " rs' ++ ")" where rs' = map L.unwrap rs fuzzy :: String -> Parser String fuzzy s = return s <* forM_ s match where match :: Char -> Parser Char match...
422
false
true
11
10
147
236
103
133
null
null
robdockins/edison
edison-core/src/Data/Edison/Assoc/AssocList.hs
mit
sameMapBy = sameMapByUsingSubmapBy
34
sameMapBy = sameMapByUsingSubmapBy
34
sameMapBy = sameMapByUsingSubmapBy
34
false
false
0
4
2
6
3
3
null
null
Mahdi89/eTeak
src/Teak.hs
bsd-3-clause
makeFork _ [signal] = return signal
35
makeFork _ [signal] = return signal
35
makeFork _ [signal] = return signal
35
false
false
0
6
5
17
8
9
null
null
tonyday567/mvc-extended
src/Data/Time/Extended.hs
mit
int2Dec :: Int -> Builder int2Dec i | i >= 0 && i < 10 = charUtf8 '0' <> intDec i | i >= 0 && i < 100 = intDec i | otherwise = error ("show2: the integer i must satisfy 0 <= i < 100: " ++ show i)
201
int2Dec :: Int -> Builder int2Dec i | i >= 0 && i < 10 = charUtf8 '0' <> intDec i | i >= 0 && i < 100 = intDec i | otherwise = error ("show2: the integer i must satisfy 0 <= i < 100: " ++ show i)
201
int2Dec i | i >= 0 && i < 10 = charUtf8 '0' <> intDec i | i >= 0 && i < 100 = intDec i | otherwise = error ("show2: the integer i must satisfy 0 <= i < 100: " ++ show i)
175
false
true
0
10
56
102
45
57
null
null
shlevy/ghc
compiler/llvmGen/Llvm/Types.hs
bsd-3-clause
isFloat _ = False
26
isFloat _ = False
26
isFloat _ = False
26
false
false
0
5
12
9
4
5
null
null
d3sformal/bacon-core
test/RecPdr.hs
mit
vD0 = intVar nD0
18
vD0 = intVar nD0
18
vD0 = intVar nD0
18
false
false
1
5
5
13
4
9
null
null
davnils/distr-btc
src/HTrade/Backend/Admin.hs
bsd-3-clause
dropSchema :: DB.Cas () dropSchema = forM_ tables $ \table -> DB.executeSchema DB.ALL (DB.query $ "drop table " <> _tableName table) ()
138
dropSchema :: DB.Cas () dropSchema = forM_ tables $ \table -> DB.executeSchema DB.ALL (DB.query $ "drop table " <> _tableName table) ()
138
dropSchema = forM_ tables $ \table -> DB.executeSchema DB.ALL (DB.query $ "drop table " <> _tableName table) ()
114
false
true
0
11
24
59
29
30
null
null
Tener/deeplearning-thesis
lib/BreakthroughGame.hs
bsd-3-clause
-- | get all possible positions allPos :: (Int,Int) -> [Position] allPos (rowLength,colLength) = [(column',row') | row' <- [0..colLength-1], column' <- [0..rowLength-1]]
169
allPos :: (Int,Int) -> [Position] allPos (rowLength,colLength) = [(column',row') | row' <- [0..colLength-1], column' <- [0..rowLength-1]]
137
allPos (rowLength,colLength) = [(column',row') | row' <- [0..colLength-1], column' <- [0..rowLength-1]]
103
true
true
0
9
21
77
44
33
null
null
beni55/ghcjs
test/ghc/integer/integerConstantFolding.hs
mit
decodeIntegerDouble :: (Integer, Int) decodeIntegerDouble = decodeFloat (100083 :: Double)
90
decodeIntegerDouble :: (Integer, Int) decodeIntegerDouble = decodeFloat (100083 :: Double)
90
decodeIntegerDouble = decodeFloat (100083 :: Double)
52
false
true
0
6
9
26
15
11
null
null
bergmark/time
lib/Data/Time/Format/Parse.hs
bsd-3-clause
-- | Parse a time value given a format string. See 'parseTimeM' for details. readSTime :: ParseTime t => Bool -- ^ Accept leading whitespace? -> TimeLocale -- ^ Time locale. -> String -- ^ Format string -> ReadS t readSTime acceptWS l f = readP_to_S (readPTime accep...
328
readSTime :: ParseTime t => Bool -- ^ Accept leading whitespace? -> TimeLocale -- ^ Time locale. -> String -- ^ Format string -> ReadS t readSTime acceptWS l f = readP_to_S (readPTime acceptWS l f)
250
readSTime acceptWS l f = readP_to_S (readPTime acceptWS l f)
60
true
true
0
9
103
57
29
28
null
null
yuto-matsum/contest-util-hs
src/Euler/040.hs
mit
-- number 5 == 5, -- number 10 == 10, number 11 == 10, number 12 == 11 number :: Integer -> Integer number n | n< 10 = n | n>=10 = (10 ^ order n) + (offset `div` len) where offset = n - baseidx n len = order n + 1 -- n=5, offset=5-0, len=1, number=10^0 + 5/1=1 -- index {0-9} == 0, -- index 10 == 1, index...
411
number :: Integer -> Integer number n | n< 10 = n | n>=10 = (10 ^ order n) + (offset `div` len) where offset = n - baseidx n len = order n + 1 -- n=5, offset=5-0, len=1, number=10^0 + 5/1=1 -- index {0-9} == 0, -- index 10 == 1, index 11 == 0, -- index 12 == 1, index 13 == 0 -- index 190 == 2, index 191 ...
340
number n | n< 10 = n | n>=10 = (10 ^ order n) + (offset `div` len) where offset = n - baseidx n len = order n + 1 -- n=5, offset=5-0, len=1, number=10^0 + 5/1=1 -- index {0-9} == 0, -- index 10 == 1, index 11 == 0, -- index 12 == 1, index 13 == 0 -- index 190 == 2, index 191 == 1, index 192 == 0
311
true
true
0
9
111
96
52
44
null
null
christiaanb/ghc
compiler/nativeGen/X86/CodeGen.hs
bsd-3-clause
getRegister' _ is32Bit (CmmMachOp (MO_SS_Conv W16 W64) [CmmLoad addr _]) | not is32Bit = do code <- intLoadCode (MOVSxL II16) addr return (Any II64 code)
158
getRegister' _ is32Bit (CmmMachOp (MO_SS_Conv W16 W64) [CmmLoad addr _]) | not is32Bit = do code <- intLoadCode (MOVSxL II16) addr return (Any II64 code)
158
getRegister' _ is32Bit (CmmMachOp (MO_SS_Conv W16 W64) [CmmLoad addr _]) | not is32Bit = do code <- intLoadCode (MOVSxL II16) addr return (Any II64 code)
158
false
false
1
12
29
82
35
47
null
null
junjihashimoto/test-sandbox-compose
Main.hs
bsd-3-clause
runCmd (Daemon conf) = runServer conf True
42
runCmd (Daemon conf) = runServer conf True
42
runCmd (Daemon conf) = runServer conf True
42
false
false
0
6
6
21
9
12
null
null
ku-fpg/better-life
Life/Display/Console.hs
bsd-2-clause
showcells :: Life board => board -> IO () showcells b = sequence_ [ writeat p "O" | p <- alive b ]
98
showcells :: Life board => board -> IO () showcells b = sequence_ [ writeat p "O" | p <- alive b ]
98
showcells b = sequence_ [ writeat p "O" | p <- alive b ]
56
false
true
0
9
22
52
24
28
null
null
dmp1ce/Haskell-Programming-Exercises
Chapter 26/Morra.hs
unlicense
morraLoop :: StateT Morra IO () morraLoop = do s <- (lift . execStateT morraTurn) =<< get if isGameOver s then do lift $ putStrLn $ "Detected a winner or tie after " ++ (show $ gameLength s) ++ " turns." lift $ putStrLn "Game Over." put s else (lift $ execStateT morraLoop s) >>= put
303
morraLoop :: StateT Morra IO () morraLoop = do s <- (lift . execStateT morraTurn) =<< get if isGameOver s then do lift $ putStrLn $ "Detected a winner or tie after " ++ (show $ gameLength s) ++ " turns." lift $ putStrLn "Game Over." put s else (lift $ execStateT morraLoop s) >>= put
303
morraLoop = do s <- (lift . execStateT morraTurn) =<< get if isGameOver s then do lift $ putStrLn $ "Detected a winner or tie after " ++ (show $ gameLength s) ++ " turns." lift $ putStrLn "Game Over." put s else (lift $ execStateT morraLoop s) >>= put
271
false
true
1
14
75
122
55
67
null
null
gibiansky/jupyter-haskell
src/Jupyter/Install/Internal.hs
mit
runJupyterCommand :: FilePath -> [String] -> IO String runJupyterCommand jupyterPath args = readProcess jupyterPath args "" `catch` handler where handler :: IOException -> IO String handler _ = installFailed $ concat [ "Could not run '" , jupyterPath , " " ...
474
runJupyterCommand :: FilePath -> [String] -> IO String runJupyterCommand jupyterPath args = readProcess jupyterPath args "" `catch` handler where handler :: IOException -> IO String handler _ = installFailed $ concat [ "Could not run '" , jupyterPath , " " ...
474
runJupyterCommand jupyterPath args = readProcess jupyterPath args "" `catch` handler where handler :: IOException -> IO String handler _ = installFailed $ concat [ "Could not run '" , jupyterPath , " " , unwords args , "'. " , "Please m...
419
false
true
2
8
158
94
50
44
null
null
ezyang/ghc
testsuite/tests/typecheck/should_run/T1735_Help/Basics.hs
bsd-3-clause
-- | Gets the public presentation of constructors constrRep :: Constr -> ConstrRep constrRep = conrep
101
constrRep :: Constr -> ConstrRep constrRep = conrep
51
constrRep = conrep
18
true
true
0
5
15
16
9
7
null
null
olorin/amazonka
amazonka-rds/gen/Network/AWS/RDS/Types.hs
mpl-2.0
-- | User attempted to create a new DB cluster and the user has already -- reached the maximum allowed DB cluster quota. _DBClusterQuotaExceededFault :: AsError a => Getting (First ServiceError) a ServiceError _DBClusterQuotaExceededFault = _ServiceError . hasStatus 403 . hasCode "DBClusterQuotaExceededFault"
314
_DBClusterQuotaExceededFault :: AsError a => Getting (First ServiceError) a ServiceError _DBClusterQuotaExceededFault = _ServiceError . hasStatus 403 . hasCode "DBClusterQuotaExceededFault"
193
_DBClusterQuotaExceededFault = _ServiceError . hasStatus 403 . hasCode "DBClusterQuotaExceededFault"
104
true
true
0
8
45
47
23
24
null
null
Peaker/git-mediate
src/Main.hs
gpl-2.0
trimDiff :: Int -> [Diff a] -> [Diff a] trimDiff contextLen = reverse . f . reverse . f where f l = drop (length (takeWhile both l) - contextLen) l both Both{} = True both _ = False
213
trimDiff :: Int -> [Diff a] -> [Diff a] trimDiff contextLen = reverse . f . reverse . f where f l = drop (length (takeWhile both l) - contextLen) l both Both{} = True both _ = False
213
trimDiff contextLen = reverse . f . reverse . f where f l = drop (length (takeWhile both l) - contextLen) l both Both{} = True both _ = False
173
false
true
2
10
70
92
48
44
null
null
nishiuramakoto/logiku
prolog/Prolog/Database.hs
gpl-3.0
abolish :: Term -> Database -> Database abolish fact (DB index') = DB $ Map.adjust deleteFact (signature fact) index' where deleteFact (Clause t []:cs) | t == fact = cs deleteFact (_ :cs) = cs deleteFact [] = []
279
abolish :: Term -> Database -> Database abolish fact (DB index') = DB $ Map.adjust deleteFact (signature fact) index' where deleteFact (Clause t []:cs) | t == fact = cs deleteFact (_ :cs) = cs deleteFact [] = []
279
abolish fact (DB index') = DB $ Map.adjust deleteFact (signature fact) index' where deleteFact (Clause t []:cs) | t == fact = cs deleteFact (_ :cs) = cs deleteFact [] = []
239
false
true
0
11
106
110
54
56
null
null
sgillespie/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
thenAClassOpKey = mkPreludeMiscIdUnique 753
47
thenAClassOpKey = mkPreludeMiscIdUnique 753
47
thenAClassOpKey = mkPreludeMiscIdUnique 753
47
false
false
0
5
7
9
4
5
null
null
ml9951/ghc
libraries/pastm/examples/damp-comparing-linked-lists/Main.hs
bsd-3-clause
join (mv:mvs) = do takeMVar mv join mvs
49
join (mv:mvs) = do takeMVar mv join mvs
49
join (mv:mvs) = do takeMVar mv join mvs
49
false
false
0
7
17
29
12
17
null
null
thalerjonathan/phd
coding/libraries/chimera/examples/ABS/SocialForce/Renderer.hs
gpl-3.0
renderLine :: Line -> GLO.Picture renderLine (from, to) = GLO.color GLO.white $ GLO.Line [(fx, fy), (tx, ty)] where fx = realToFrac $ fst from fy = realToFrac $ snd from tx = realToFrac $ fst to ty = realToFrac $ snd to
239
renderLine :: Line -> GLO.Picture renderLine (from, to) = GLO.color GLO.white $ GLO.Line [(fx, fy), (tx, ty)] where fx = realToFrac $ fst from fy = realToFrac $ snd from tx = realToFrac $ fst to ty = realToFrac $ snd to
238
renderLine (from, to) = GLO.color GLO.white $ GLO.Line [(fx, fy), (tx, ty)] where fx = realToFrac $ fst from fy = realToFrac $ snd from tx = realToFrac $ fst to ty = realToFrac $ snd to
204
false
true
3
9
61
114
58
56
null
null
simonmichael/hledger
hledger/Hledger/Cli/Commands/Print.hs
gpl-3.0
entriesReportAsCsv :: EntriesReport -> CSV entriesReportAsCsv txns = ["txnidx","date","date2","status","code","description","comment","account","amount","commodity","credit","debit","posting-status","posting-comment"] : concatMap transactionToCSV txns
255
entriesReportAsCsv :: EntriesReport -> CSV entriesReportAsCsv txns = ["txnidx","date","date2","status","code","description","comment","account","amount","commodity","credit","debit","posting-status","posting-comment"] : concatMap transactionToCSV txns
255
entriesReportAsCsv txns = ["txnidx","date","date2","status","code","description","comment","account","amount","commodity","credit","debit","posting-status","posting-comment"] : concatMap transactionToCSV txns
212
false
true
0
6
16
69
41
28
null
null
abhishekkr/tutorials_as_code
talks-articles/languages-n-runtimes/haskell/DerekBanas.Haskell.LYAH/haskell03.hs
mit
{- - tuple: store a list of multiple different datatypes -} tuple01 = (1, "Random")
86
tuple01 = (1, "Random")
23
tuple01 = (1, "Random")
23
true
false
1
5
17
16
8
8
null
null
SeanTater/hypergraph-disambiguate
src/Index/Popularity.hs
apache-2.0
foldi :: (a -> a -> a) -> a -> [a] -> a foldi f z [] = z
71
foldi :: (a -> a -> a) -> a -> [a] -> a foldi f z [] = z
71
foldi f z [] = z
20
false
true
0
8
33
46
24
22
null
null
mariefarrell/Hets
Common/MathLink.hs
gpl-2.0
closeLink :: MLState -> IO () closeLink st = do mlClose $ mlink st cMlDeinitialize $ menv st -- | Run ML-program on an opened connection to MathLink
154
closeLink :: MLState -> IO () closeLink st = do mlClose $ mlink st cMlDeinitialize $ menv st -- | Run ML-program on an opened connection to MathLink
154
closeLink st = do mlClose $ mlink st cMlDeinitialize $ menv st -- | Run ML-program on an opened connection to MathLink
124
false
true
0
8
33
44
20
24
null
null
bitemyapp/chip-8
src/CPU/Emulate.hs
bsd-3-clause
mergePixels :: Int -> Bool -> Bool -> (Int, Bool, Bool) mergePixels = (,,)
74
mergePixels :: Int -> Bool -> Bool -> (Int, Bool, Bool) mergePixels = (,,)
74
mergePixels = (,,)
18
false
true
0
8
13
36
21
15
null
null
phadej/range-set-list
src/Data/RangeSet/Map.hs
mit
-- | /O(log n)/. Find largest element smaller than the given one. lookupLT :: (Ord a, Enum a) => a -> RSet a -> Maybe a lookupLT x (RSet xm) = min (pred x) . snd <$> Map.lookupLT x xm
183
lookupLT :: (Ord a, Enum a) => a -> RSet a -> Maybe a lookupLT x (RSet xm) = min (pred x) . snd <$> Map.lookupLT x xm
117
lookupLT x (RSet xm) = min (pred x) . snd <$> Map.lookupLT x xm
63
true
true
0
9
39
76
37
39
null
null
olsner/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
pprParendType (PromotedTupleT 0) = text "'()"
46
pprParendType (PromotedTupleT 0) = text "'()"
46
pprParendType (PromotedTupleT 0) = text "'()"
46
false
false
0
7
6
18
8
10
null
null
DavidAlphaFox/bittorrent
src/Network/BitTorrent/Tracker/Message.hs
bsd-3-clause
-- | Widely used reannounce interval. Note: tracker clients should not -- use this value! defaultReannounceInterval :: Int defaultReannounceInterval = 30 * 60
158
defaultReannounceInterval :: Int defaultReannounceInterval = 30 * 60
68
defaultReannounceInterval = 30 * 60
35
true
true
0
5
22
17
10
7
null
null
janm399/equationsolver
src/EquationSolver/ManualParser.hs
apache-2.0
paren ')' = LexRParen
21
paren ')' = LexRParen
21
paren ')' = LexRParen
21
false
false
1
5
3
13
4
9
null
null
rueshyna/gogol
gogol-compute/gen/Network/Google/Resource/Compute/Zones/List.hs
mpl-2.0
-- | The maximum number of results per page that should be returned. If the -- number of available results is larger than maxResults, Compute Engine -- returns a nextPageToken that can be used to get the next page of results -- in subsequent list requests. zlMaxResults :: Lens' ZonesList Word32 zlMaxResults = lens _z...
379
zlMaxResults :: Lens' ZonesList Word32 zlMaxResults = lens _zlMaxResults (\ s a -> s{_zlMaxResults = a}) . _Coerce
122
zlMaxResults = lens _zlMaxResults (\ s a -> s{_zlMaxResults = a}) . _Coerce
83
true
true
0
10
71
49
27
22
null
null
ddssff/lens
src/GHC/Generics/Lens.hs
bsd-3-clause
_UInt :: Iso (UInt p) (UInt q) Int Int _UInt = iso remitter reviewer where remitter (UInt i) = I# i reviewer (I# i) = UInt i
131
_UInt :: Iso (UInt p) (UInt q) Int Int _UInt = iso remitter reviewer where remitter (UInt i) = I# i reviewer (I# i) = UInt i
131
_UInt = iso remitter reviewer where remitter (UInt i) = I# i reviewer (I# i) = UInt i
92
false
true
0
7
33
74
35
39
null
null
Kyly/liquidhaskell
src/Language/Haskell/Liquid/CmdLine.hs
bsd-3-clause
writeCheckVars Nothing = return ()
38
writeCheckVars Nothing = return ()
38
writeCheckVars Nothing = return ()
38
false
false
0
6
8
14
6
8
null
null
christiaanb/ghc
compiler/main/Packages.hs
bsd-3-clause
matchingId :: String -> PackageConfig -> Bool matchingId str p = str == installedPackageIdString p
99
matchingId :: String -> PackageConfig -> Bool matchingId str p = str == installedPackageIdString p
99
matchingId str p = str == installedPackageIdString p
53
false
true
1
8
15
37
16
21
null
null
peteg/ADHOC
Tests/08_Kesterel/141_nondet_bits_simplified.hs
gpl-2.0
system = unitA >>> runE top
27
system = unitA >>> runE top
27
system = unitA >>> runE top
27
false
false
1
6
5
16
6
10
null
null
unisonweb/platform
parser-typechecker/src/Unison/Codebase/Branch.hs
mit
toRaw :: Branch0 m -> Raw toRaw Branch0 {..} = Raw _terms _types (headHash <$> _children) (fst <$> _edits)
108
toRaw :: Branch0 m -> Raw toRaw Branch0 {..} = Raw _terms _types (headHash <$> _children) (fst <$> _edits)
108
toRaw Branch0 {..} = Raw _terms _types (headHash <$> _children) (fst <$> _edits)
82
false
true
0
7
20
50
25
25
null
null
laszlopandy/elm-compiler
src/Reporting/Error.hs
bsd-3-clause
toJson :: RenderType.Localizer -> FilePath -> A.Located Error -> Json.Value toJson localizer filePath (A.A region err) = let (maybeRegion, additionalFields) = case err of Syntax syntaxError -> Report.toJson [] (Syntax.toReport localizer syntaxError) Canonicalize canonica...
1,131
toJson :: RenderType.Localizer -> FilePath -> A.Located Error -> Json.Value toJson localizer filePath (A.A region err) = let (maybeRegion, additionalFields) = case err of Syntax syntaxError -> Report.toJson [] (Syntax.toReport localizer syntaxError) Canonicalize canonica...
1,131
toJson localizer filePath (A.A region err) = let (maybeRegion, additionalFields) = case err of Syntax syntaxError -> Report.toJson [] (Syntax.toReport localizer syntaxError) Canonicalize canonicalizeError -> let suggestions = ...
1,055
false
true
4
20
401
302
146
156
null
null
mpickering/core-kythe
src/KythePlugin.hs
bsd-3-clause
lenientDecodeUtf8 :: FilePath -> IO T.Text lenientDecodeUtf8 = fmap (T.decodeUtf8With T.lenientDecode) . B.readFile
115
lenientDecodeUtf8 :: FilePath -> IO T.Text lenientDecodeUtf8 = fmap (T.decodeUtf8With T.lenientDecode) . B.readFile
115
lenientDecodeUtf8 = fmap (T.decodeUtf8With T.lenientDecode) . B.readFile
72
false
true
0
9
12
39
19
20
null
null
nikki-and-the-robots/nikki
src/Sorts/Robots/PathRobots/PatrolRobot.hs
lgpl-3.0
updateLogic :: Patrol -> Patrol updateLogic patrol@Patrol{path} = patrol{path = updatePath path}
100
updateLogic :: Patrol -> Patrol updateLogic patrol@Patrol{path} = patrol{path = updatePath path}
100
updateLogic patrol@Patrol{path} = patrol{path = updatePath path}
68
false
true
0
8
15
47
22
25
null
null
keithodulaigh/Hets
LF/Sign.hs
gpl-2.0
{- ------------------------------------------------------------------ ------------------------------------------------------------------- -} -- ERROR MESSAGES conflictDefsError :: Symbol -> String conflictDefsError s = "Symbol " ++ show (pretty s) ++ " has conflicting declarations " ++ "in the signature union and ...
352
conflictDefsError :: Symbol -> String conflictDefsError s = "Symbol " ++ show (pretty s) ++ " has conflicting declarations " ++ "in the signature union and hence the union is not defined."
192
conflictDefsError s = "Symbol " ++ show (pretty s) ++ " has conflicting declarations " ++ "in the signature union and hence the union is not defined."
154
true
true
2
9
43
43
21
22
null
null
apyrgio/ganeti
src/Ganeti/Hs2Py/OpDoc.hs
bsd-2-clause
opBackupRemove :: String opBackupRemove = "Remove an instance's export."
74
opBackupRemove :: String opBackupRemove = "Remove an instance's export."
74
opBackupRemove = "Remove an instance's export."
49
false
true
0
4
10
11
6
5
null
null