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
emhoracek/smooch
app/src/ParseCNF.hs
gpl-3.0
parseNoPos :: Parser SetPos parseNoPos = do char '*' return NoPosition
78
parseNoPos :: Parser SetPos parseNoPos = do char '*' return NoPosition
78
parseNoPos = do char '*' return NoPosition
50
false
true
0
7
18
26
11
15
null
null
goldfirere/glambda
src/Language/Glambda/Eval.hs
bsd-3-clause
-- | Given a lambda and an expression, beta-reduce. apply :: Val (arg -> res) -> Exp '[] arg -> Exp '[] res apply (LamVal body) arg = subst arg body
148
apply :: Val (arg -> res) -> Exp '[] arg -> Exp '[] res apply (LamVal body) arg = subst arg body
96
apply (LamVal body) arg = subst arg body
40
true
true
0
9
30
64
31
33
null
null
alldne/scheme
src/Language/Scheme/Primitives.hs
bsd-3-clause
charIsWhitespace :: [LispVal] -> ThrowsError LispVal charIsWhitespace = \case [Char c] -> pure . Bool $ isSpace c [badArg] -> throwError $ TypeMismatch "char" badArg badArgList -> throwError $ NumArgs 1 badArgList
226
charIsWhitespace :: [LispVal] -> ThrowsError LispVal charIsWhitespace = \case [Char c] -> pure . Bool $ isSpace c [badArg] -> throwError $ TypeMismatch "char" badArg badArgList -> throwError $ NumArgs 1 badArgList
226
charIsWhitespace = \case [Char c] -> pure . Bool $ isSpace c [badArg] -> throwError $ TypeMismatch "char" badArg badArgList -> throwError $ NumArgs 1 badArgList
173
false
true
3
6
44
82
39
43
null
null
stnma7e/scim_serv
portal/Main.hs
mit
main = serve "13573" scimPortalHandler
38
main = serve "13573" scimPortalHandler
38
main = serve "13573" scimPortalHandler
38
false
false
1
5
4
16
5
11
null
null
dkandalov/katas
haskell/p99/src/p9x/p50/P50.hs
unlicense
fromString' xs@(')':_) = (xs, End)
34
fromString' xs@(')':_) = (xs, End)
34
fromString' xs@(')':_) = (xs, End)
34
false
false
0
8
4
25
14
11
null
null
CulpaBS/wbBach
src/futhark.hs
bsd-3-clause
newConfig :: Config newConfig = Config newFutharkConfig [] $ PolyAction printAction printAction printAction
107
newConfig :: Config newConfig = Config newFutharkConfig [] $ PolyAction printAction printAction printAction
107
newConfig = Config newFutharkConfig [] $ PolyAction printAction printAction printAction
87
false
true
0
7
12
29
14
15
null
null
MichaelXavier/RememberTheMilk
Web/RememberTheMilk/Types.hs
bsd-2-clause
quoteFilter :: Show a => String -> a -> String quoteFilter flt v = flt ++ ":" ++ vstr where vstr = case show v of "True" -> "true" "False" -> "false" str -> str
218
quoteFilter :: Show a => String -> a -> String quoteFilter flt v = flt ++ ":" ++ vstr where vstr = case show v of "True" -> "true" "False" -> "false" str -> str
218
quoteFilter flt v = flt ++ ":" ++ vstr where vstr = case show v of "True" -> "true" "False" -> "false" str -> str
171
false
true
3
9
92
82
36
46
null
null
ComputationWithBoundedResources/jat
src/Jinja/Program/Parser.hs
bsd-3-clause
parseClass :: Parser (ClassId, Class) parseClass = do symbol "Class:" symbol "Name:" cname <- identifier symbol "Classbody:" symbol "Superclass:" super' <- identifier <|> symbol "<None>" let super = if super' /= "<None>" then Just super' else Nothing fpool <- parseFieldPool mpool <- parseMethodPool ...
479
parseClass :: Parser (ClassId, Class) parseClass = do symbol "Class:" symbol "Name:" cname <- identifier symbol "Classbody:" symbol "Superclass:" super' <- identifier <|> symbol "<None>" let super = if super' /= "<None>" then Just super' else Nothing fpool <- parseFieldPool mpool <- parseMethodPool ...
479
parseClass = do symbol "Class:" symbol "Name:" cname <- identifier symbol "Classbody:" symbol "Superclass:" super' <- identifier <|> symbol "<None>" let super = if super' /= "<None>" then Just super' else Nothing fpool <- parseFieldPool mpool <- parseMethodPool return (ClassId cname, Class (ClassId ...
441
false
true
2
11
89
164
76
88
null
null
blitzcode/rust-exp
hs-src/App.hs
mit
onRenderSettingsChage :: MonadState AppState m => m () onRenderSettingsChage = do -- Reset frame time measurements and frame index when the rendering settings have changed asFrameTimes %= BS.clear asFrameIdx .= 0
226
onRenderSettingsChage :: MonadState AppState m => m () onRenderSettingsChage = do -- Reset frame time measurements and frame index when the rendering settings have changed asFrameTimes %= BS.clear asFrameIdx .= 0
226
onRenderSettingsChage = do -- Reset frame time measurements and frame index when the rendering settings have changed asFrameTimes %= BS.clear asFrameIdx .= 0
171
false
true
0
8
44
42
20
22
null
null
hemio-ev/libghc-acme
src/Network/ACME/Object.hs
lgpl-3.0
urlToString :: URL -> String urlToString (URL u) = show u
57
urlToString :: URL -> String urlToString (URL u) = show u
57
urlToString (URL u) = show u
28
false
true
0
9
10
33
14
19
null
null
ktvoelker/auth-proxy
src/Authenticate.hs
bsd-3-clause
routes :: Config.T -> [Route] routes conf = [ simpleGet "/auth/check" $ makeApp conf check , simpleGet "/auth/login" $ makeApp conf loginPage , simplePost "/auth/login" $ makeApp conf login , simpleGet "/auth/logout" $ makeApp conf logout , simpleGet "/auth/verify" $ makeApp conf verify ]
308
routes :: Config.T -> [Route] routes conf = [ simpleGet "/auth/check" $ makeApp conf check , simpleGet "/auth/login" $ makeApp conf loginPage , simplePost "/auth/login" $ makeApp conf login , simpleGet "/auth/logout" $ makeApp conf logout , simpleGet "/auth/verify" $ makeApp conf verify ]
308
routes conf = [ simpleGet "/auth/check" $ makeApp conf check , simpleGet "/auth/login" $ makeApp conf loginPage , simplePost "/auth/login" $ makeApp conf login , simpleGet "/auth/logout" $ makeApp conf logout , simpleGet "/auth/verify" $ makeApp conf verify ]
278
false
true
0
8
62
104
48
56
null
null
markflorisson/hpack
testrepo/bytestring-0.10.2.0/bench/BoundsCheckFusion.hs
bsd-3-clause
benchBInts :: String -> ([Int] -> Builder) -> Benchmark benchBInts name = benchB name intData
93
benchBInts :: String -> ([Int] -> Builder) -> Benchmark benchBInts name = benchB name intData
93
benchBInts name = benchB name intData
37
false
true
0
10
14
42
20
22
null
null
Arguggi/irc-log
backend/app/bot/Main.hs
gpl-3.0
write :: T.Text -> T.Text -> Net PG.Connection () write s t = do h <- asks socket time <- io getCurrentTime io $ TIO.hPutStr h (s <-> t <> "\r\n") io $ TIO.putStrLn (showTime time <-> "~" <-> s <-> t) -- Append with extra space
244
write :: T.Text -> T.Text -> Net PG.Connection () write s t = do h <- asks socket time <- io getCurrentTime io $ TIO.hPutStr h (s <-> t <> "\r\n") io $ TIO.putStrLn (showTime time <-> "~" <-> s <-> t) -- Append with extra space
244
write s t = do h <- asks socket time <- io getCurrentTime io $ TIO.hPutStr h (s <-> t <> "\r\n") io $ TIO.putStrLn (showTime time <-> "~" <-> s <-> t) -- Append with extra space
194
false
true
0
13
63
113
53
60
null
null
mlitchard/primenator
src/Output.hs
isc
formatColumnRow :: Int -> FormattedRows -> Row -> FormattedRows formatColumnRow cellsize ftable (prime,products) = ftable |> paired where paired = (,) centerLabel ( centerProduct' <$> products) centerProduct' product = centerProduct product cellsize centerLabel = forma...
421
formatColumnRow :: Int -> FormattedRows -> Row -> FormattedRows formatColumnRow cellsize ftable (prime,products) = ftable |> paired where paired = (,) centerLabel ( centerProduct' <$> products) centerProduct' product = centerProduct product cellsize centerLabel = forma...
421
formatColumnRow cellsize ftable (prime,products) = ftable |> paired where paired = (,) centerLabel ( centerProduct' <$> products) centerProduct' product = centerProduct product cellsize centerLabel = formatted primeString cellsize primeString = (T.pac...
357
false
true
0
8
119
105
55
50
null
null
dillonhuff/Folly
src/Folly/Formula.hs
bsd-3-clause
simplifyFormula (N T) = F
25
simplifyFormula (N T) = F
25
simplifyFormula (N T) = F
25
false
false
0
7
4
15
7
8
null
null
rueshyna/gogol
gogol-android-enterprise/gen/Network/Google/AndroidEnterprise/Types/Product.hs
mpl-2.0
-- | The integer value - this will only be present if type of the property is -- integer. mpValueInteger :: Lens' ManagedProperty (Maybe Int32) mpValueInteger = lens _mpValueInteger (\ s a -> s{_mpValueInteger = a}) . mapping _Coerce
247
mpValueInteger :: Lens' ManagedProperty (Maybe Int32) mpValueInteger = lens _mpValueInteger (\ s a -> s{_mpValueInteger = a}) . mapping _Coerce
157
mpValueInteger = lens _mpValueInteger (\ s a -> s{_mpValueInteger = a}) . mapping _Coerce
103
true
true
2
8
52
59
29
30
null
null
mfpi/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/ARB/UniformBufferObject.hs
bsd-3-clause
EXTENSION_ENTRY(dyn_glGetUniformIndices,ptr_glGetUniformIndices,"glGetUniformIndices",glGetUniformIndices,GLuint -> GLsizei -> Ptr (Ptr GLchar) -> Ptr GLuint -> IO ()) EXTENSION_ENTRY(dyn_glGetActiveUniformsiv,ptr_glGetActiveUniformsiv,"glGetActiveUniformsiv",glGetActiveUniformsiv,GLuint -> GLsizei -> Ptr GLuint -> GLe...
1,698
EXTENSION_ENTRY(dyn_glGetUniformIndices,ptr_glGetUniformIndices,"glGetUniformIndices",glGetUniformIndices,GLuint -> GLsizei -> Ptr (Ptr GLchar) -> Ptr GLuint -> IO ()) EXTENSION_ENTRY(dyn_glGetActiveUniformsiv,ptr_glGetActiveUniformsiv,"glGetActiveUniformsiv",glGetActiveUniformsiv,GLuint -> GLsizei -> Ptr GLuint -> GLe...
1,698
EXTENSION_ENTRY(dyn_glGetUniformIndices,ptr_glGetUniformIndices,"glGetUniformIndices",glGetUniformIndices,GLuint -> GLsizei -> Ptr (Ptr GLchar) -> Ptr GLuint -> IO ()) EXTENSION_ENTRY(dyn_glGetActiveUniformsiv,ptr_glGetActiveUniformsiv,"glGetActiveUniformsiv",glGetActiveUniformsiv,GLuint -> GLsizei -> Ptr GLuint -> GLe...
1,698
false
false
0
14
116
448
237
211
null
null
brendanhay/gogol
gogol-gmail/gen/Network/Google/Resource/Gmail/Users/Settings/Filters/Delete.hs
mpl-2.0
-- | The ID of the filter to be deleted. usfdId :: Lens' UsersSettingsFiltersDelete Text usfdId = lens _usfdId (\ s a -> s{_usfdId = a})
136
usfdId :: Lens' UsersSettingsFiltersDelete Text usfdId = lens _usfdId (\ s a -> s{_usfdId = a})
95
usfdId = lens _usfdId (\ s a -> s{_usfdId = a})
47
true
true
0
9
25
40
22
18
null
null
crockeo/whatisthisgame
src/WhatIsThisGame/Data.hs
mit
-- | An instance of the @'TextureCoord'@. textureCoord :: SField TextureCoord textureCoord = SField
99
textureCoord :: SField TextureCoord textureCoord = SField
57
textureCoord = SField
21
true
true
0
5
13
15
8
7
null
null
olorin/amazonka
amazonka-route53/gen/Network/AWS/Route53/Types/Product.hs
mpl-2.0
-- | /Health Check resource record sets only, not required for alias resource -- record sets:/ An identifier that is used to identify health check -- associated with the resource record set. rrsHealthCheckId :: Lens' ResourceRecordSet (Maybe Text) rrsHealthCheckId = lens _rrsHealthCheckId (\ s a -> s{_rrsHealthCheckId ...
325
rrsHealthCheckId :: Lens' ResourceRecordSet (Maybe Text) rrsHealthCheckId = lens _rrsHealthCheckId (\ s a -> s{_rrsHealthCheckId = a})
134
rrsHealthCheckId = lens _rrsHealthCheckId (\ s a -> s{_rrsHealthCheckId = a})
77
true
true
0
9
48
48
27
21
null
null
trbauer/clr
src/CLParser.hs
bsd-2-clause
pKernelBody :: Pos -> P String pKernelBody p = body <?> "kernel body" where body = do -- pTraceLAK 16 $ "pKernelBody" P.char '{' str <- go [] 0 pWhiteSpace return $ "{" ++ str ++ "}" go :: [String] -> Int -> P String go rstrs n = goKb where goKb ...
2,872
pKernelBody :: Pos -> P String pKernelBody p = body <?> "kernel body" where body = do -- pTraceLAK 16 $ "pKernelBody" P.char '{' str <- go [] 0 pWhiteSpace return $ "{" ++ str ++ "}" go :: [String] -> Int -> P String go rstrs n = goKb where goKb ...
2,872
pKernelBody p = body <?> "kernel body" where body = do -- pTraceLAK 16 $ "pKernelBody" P.char '{' str <- go [] 0 pWhiteSpace return $ "{" ++ str ++ "}" go :: [String] -> Int -> P String go rstrs n = goKb where goKb = do -- pTrac...
2,841
false
true
82
20
1,519
766
399
367
null
null
tangboyun/diagrams-heatmap
src/Diagrams/HeatMap/Impl.hs
bsd-3-clause
atUV = (UV.!)
13
atUV = (UV.!)
13
atUV = (UV.!)
13
false
false
0
5
2
10
6
4
null
null
fpco/cabal
cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
buildCommand :: CommandUI (BuildFlags, BuildExFlags) buildCommand = parent { commandDefaultFlags = (commandDefaultFlags parent, mempty), commandOptions = \showOrParseArgs -> liftOptions fst setFst (commandOptions parent showOrParseArgs) ++ ...
519
buildCommand :: CommandUI (BuildFlags, BuildExFlags) buildCommand = parent { commandDefaultFlags = (commandDefaultFlags parent, mempty), commandOptions = \showOrParseArgs -> liftOptions fst setFst (commandOptions parent showOrParseArgs) ++ ...
519
buildCommand = parent { commandDefaultFlags = (commandDefaultFlags parent, mempty), commandOptions = \showOrParseArgs -> liftOptions fst setFst (commandOptions parent showOrParseArgs) ++ liftOptions snd setSnd (buildExOptio...
466
false
true
0
11
159
137
75
62
null
null
markflorisson/hpack
testrepo/bytestring-0.9.1.9/Data/ByteString/Lazy/Internal.hs
bsd-3-clause
------------------------------------------------------------------------ -- The representation uses lists of packed chunks. When we have to convert from -- a lazy list to the chunked representation, then by default we use this -- chunk size. Some functions give you more control over the chunk size. -- -- Measurements ...
792
defaultChunkSize :: Int defaultChunkSize = 32 * k - chunkOverhead where k = 1024 -- | Currently set to 4k, less the memory management overhead
146
defaultChunkSize = 32 * k - chunkOverhead where k = 1024 -- | Currently set to 4k, less the memory management overhead
122
true
true
2
6
127
52
28
24
null
null
pparkkin/eta
compiler/ETA/Prelude/PrelNames.hs
bsd-3-clause
range_RDR = varQual_RDR gHC_ARR (fsLit "range")
61
range_RDR = varQual_RDR gHC_ARR (fsLit "range")
61
range_RDR = varQual_RDR gHC_ARR (fsLit "range")
61
false
false
0
7
19
17
8
9
null
null
esmolanka/haddock
haddock-api/src/Haddock/Backends/LaTeX.hs
bsd-2-clause
emph :: LaTeX -> LaTeX emph ltx = text "\\emph" <> braces ltx
61
emph :: LaTeX -> LaTeX emph ltx = text "\\emph" <> braces ltx
61
emph ltx = text "\\emph" <> braces ltx
38
false
true
0
6
12
28
13
15
null
null
adarqui/ghcjs-jquery
JavaScript/JQuery.hs
mit
filterJQuery :: JQuery -> JQuery -> IO JQuery filterJQuery j = jq_filter (castRef j)
84
filterJQuery :: JQuery -> JQuery -> IO JQuery filterJQuery j = jq_filter (castRef j)
84
filterJQuery j = jq_filter (castRef j)
38
false
true
0
7
13
34
16
18
null
null
aaronc/Idris-dev
src/Idris/Reflection.hs
bsd-3-clause
reflectErr (CantResolveAlts ss) = raw_apply (Var $ reflErrName "CantResolveAlts") [rawList (Var $ reflm "TTName") (map reflectName ss)]
149
reflectErr (CantResolveAlts ss) = raw_apply (Var $ reflErrName "CantResolveAlts") [rawList (Var $ reflm "TTName") (map reflectName ss)]
149
reflectErr (CantResolveAlts ss) = raw_apply (Var $ reflErrName "CantResolveAlts") [rawList (Var $ reflm "TTName") (map reflectName ss)]
149
false
false
0
9
30
58
27
31
null
null
dduong42/json-haskell
parser.hs
mit
item :: Parser Char item = Parser (\x -> case x of "" -> [] (x:xs) -> [(x, xs)])
111
item :: Parser Char item = Parser (\x -> case x of "" -> [] (x:xs) -> [(x, xs)])
111
item = Parser (\x -> case x of "" -> [] (x:xs) -> [(x, xs)])
91
false
true
0
12
49
65
33
32
null
null
coolhacks/scripts-hacks
examples/shellcheck-master/ShellCheck/Analytics.hs
mit
groupWith f = groupBy ((==) `on` f)
35
groupWith f = groupBy ((==) `on` f)
35
groupWith f = groupBy ((==) `on` f)
35
false
false
1
7
6
26
13
13
null
null
urbanslug/ghc
testsuite/tests/programs/jules_xref2/Main.hs
bsd-3-clause
display_a :: Table -> String -> String display_a ALeaf acc = acc
64
display_a :: Table -> String -> String display_a ALeaf acc = acc
64
display_a ALeaf acc = acc
25
false
true
0
6
11
24
12
12
null
null
ciderpunx/57-exercises-for-programmers
src/P26PayOff.hs
gpl-3.0
monthsToPayOff :: Double -> Double -> Double -> Int monthsToPayOff apr b p = if p < m then error $ "Your payment of " ++ show p ++ " is less than the minimum payment of " ++ show m ++ " (if you are ever going to be able pay it off!)" else ceiling n wh...
458
monthsToPayOff :: Double -> Double -> Double -> Int monthsToPayOff apr b p = if p < m then error $ "Your payment of " ++ show p ++ " is less than the minimum payment of " ++ show m ++ " (if you are ever going to be able pay it off!)" else ceiling n wh...
458
monthsToPayOff apr b p = if p < m then error $ "Your payment of " ++ show p ++ " is less than the minimum payment of " ++ show m ++ " (if you are ever going to be able pay it off!)" else ceiling n where n = (-1/30) * log ( 1 + (b / p) * (1 - (1 + ...
406
false
true
0
14
191
170
88
82
null
null
twittner/redis-resp
src/Data/Redis/Command.hs
mpl-2.0
anyStr :: String -> Resp -> Result () anyStr _ (Str _) = Right ()
65
anyStr :: String -> Resp -> Result () anyStr _ (Str _) = Right ()
65
anyStr _ (Str _) = Right ()
27
false
true
0
10
14
44
20
24
null
null
google/cabal2bazel
bzl/tests/ffi/HeadersTest.hs
apache-2.0
foo = FOO
9
foo = FOO
9
foo = FOO
9
false
false
0
4
2
6
3
3
null
null
input-output-hk/pos-haskell-prototype
faucet/src/Cardano/Faucet/Types/Config.hs
mit
cfgToPaymentSource :: SourceWalletConfig -> PaymentSource cfgToPaymentSource (SourceWalletConfig wId aIdx _) = PaymentSource wId aIdx
133
cfgToPaymentSource :: SourceWalletConfig -> PaymentSource cfgToPaymentSource (SourceWalletConfig wId aIdx _) = PaymentSource wId aIdx
133
cfgToPaymentSource (SourceWalletConfig wId aIdx _) = PaymentSource wId aIdx
75
false
true
0
7
13
33
16
17
null
null
kmate/HaRe
old/testing/introCase/MultiParamIn2_TokOut.hs
bsd-3-clause
f :: Maybe Int -> [Int] -> Int f Nothing y = case y of y@[] -> (hd y) + (hd (tl y)) y@(b_1 : b_2) -> (hd y) + (hd (tl y))
151
f :: Maybe Int -> [Int] -> Int f Nothing y = case y of y@[] -> (hd y) + (hd (tl y)) y@(b_1 : b_2) -> (hd y) + (hd (tl y))
151
f Nothing y = case y of y@[] -> (hd y) + (hd (tl y)) y@(b_1 : b_2) -> (hd y) + (hd (tl y))
120
false
true
0
13
62
111
55
56
null
null
brendanhay/gogol
gogol-appengine/gen/Network/Google/Resource/AppEngine/Apps/Repair.hs
mpl-2.0
-- | Legacy upload protocol for media (e.g. \"media\", \"multipart\"). arUploadType :: Lens' AppsRepair (Maybe Text) arUploadType = lens _arUploadType (\ s a -> s{_arUploadType = a})
184
arUploadType :: Lens' AppsRepair (Maybe Text) arUploadType = lens _arUploadType (\ s a -> s{_arUploadType = a})
113
arUploadType = lens _arUploadType (\ s a -> s{_arUploadType = a})
67
true
true
0
9
28
48
25
23
null
null
brendanhay/gogol
gogol-fitness/gen/Network/Google/Resource/Fitness/Users/Sessions/Delete.hs
mpl-2.0
-- | JSONP usdCallback :: Lens' UsersSessionsDelete (Maybe Text) usdCallback = lens _usdCallback (\ s a -> s{_usdCallback = a})
129
usdCallback :: Lens' UsersSessionsDelete (Maybe Text) usdCallback = lens _usdCallback (\ s a -> s{_usdCallback = a})
118
usdCallback = lens _usdCallback (\ s a -> s{_usdCallback = a})
64
true
true
0
9
21
48
25
23
null
null
rahulmutt/ghcvm
compiler/Eta/DeSugar/DsArrows.hs
bsd-3-clause
-- A worry: what about coercion variable binders?? collectLStmtsBinders :: [LStmt Id body] -> [Id] collectLStmtsBinders = concatMap collectLStmtBinders
152
collectLStmtsBinders :: [LStmt Id body] -> [Id] collectLStmtsBinders = concatMap collectLStmtBinders
100
collectLStmtsBinders = concatMap collectLStmtBinders
52
true
true
0
7
19
30
16
14
null
null
masatoko/masonry
src/Masonry.hs
bsd-3-clause
exportRooms :: FilePath -> V2 Double -> [Rect Double] -> IO () exportRooms path (V2 w h) rs = SVG.export path stg rs' where stg = SVG.Settings w h fill = SVG.Fill "#0000ff" 0.4 stroke = SVG.Stroke "#ffffff" 0.2 0.6 -- bg = SVG.Object (SVG.SRect (Rect (P $ V2 (w/2) (h/2)) (V2 w h)))...
482
exportRooms :: FilePath -> V2 Double -> [Rect Double] -> IO () exportRooms path (V2 w h) rs = SVG.export path stg rs' where stg = SVG.Settings w h fill = SVG.Fill "#0000ff" 0.4 stroke = SVG.Stroke "#ffffff" 0.2 0.6 -- bg = SVG.Object (SVG.SRect (Rect (P $ V2 (w/2) (h/2)) (V2 w h))) ...
481
exportRooms path (V2 w h) rs = SVG.export path stg rs' where stg = SVG.Settings w h fill = SVG.Fill "#0000ff" 0.4 stroke = SVG.Stroke "#ffffff" 0.2 0.6 -- bg = SVG.Object (SVG.SRect (Rect (P $ V2 (w/2) (h/2)) (V2 w h))) (SVG.Fill "#000000" 1) ...
418
false
true
0
14
160
228
114
114
null
null
siddhanathan/yi
yi-keymap-vim/src/Yi/Keymap/Vim/Ex/Eval.hs
gpl-2.0
evalHelper :: MonadEditor m => (EditorM () -> m ()) -> (YiM () -> m ()) -> [EventString -> Maybe ExCommand] -> EventString -> m () evalHelper pureHandler impureHandler cmds cmdString = case evStringToExCommand cmds cmdString of Just cmd -> case cmdAction cmd of BufferA actionB -> pureHan...
496
evalHelper :: MonadEditor m => (EditorM () -> m ()) -> (YiM () -> m ()) -> [EventString -> Maybe ExCommand] -> EventString -> m () evalHelper pureHandler impureHandler cmds cmdString = case evStringToExCommand cmds cmdString of Just cmd -> case cmdAction cmd of BufferA actionB -> pureHan...
496
evalHelper pureHandler impureHandler cmds cmdString = case evStringToExCommand cmds cmdString of Just cmd -> case cmdAction cmd of BufferA actionB -> pureHandler $ withCurrentBuffer (void actionB) EditorA actionE -> pureHandler (void actionE) YiA actionY -> impureHandler ...
357
false
true
0
14
131
190
87
103
null
null
geophf/1HaskellADay
exercises/HAD/Y2021/M03/D18/Exercise.hs
mit
lookup :: String -> LookupTable -> (Integer, LookupTable) lookup key table = undefined
86
lookup :: String -> LookupTable -> (Integer, LookupTable) lookup key table = undefined
86
lookup key table = undefined
28
false
true
0
9
12
36
17
19
null
null
forsyde/forsyde-atom
src/ForSyDe/Atom/MoC/SDF/SDF.hs
bsd-3-clause
stated24 ns i = MoC.stated24 (scen64 ns) (signal4 i)
52
stated24 ns i = MoC.stated24 (scen64 ns) (signal4 i)
52
stated24 ns i = MoC.stated24 (scen64 ns) (signal4 i)
52
false
false
1
7
8
34
14
20
null
null
vedgar/mlr
Haskell/L1r.hs
unlicense
c1 = Application (FuncS 'c' (Just 1)) []
40
c1 = Application (FuncS 'c' (Just 1)) []
40
c1 = Application (FuncS 'c' (Just 1)) []
40
false
false
1
9
7
30
13
17
null
null
narrative/hardwood
src/Hardwood.hs
bsd-3-clause
oveANSI :: Monad m => Conduit ByteString m ByteString removeANSI = mapC (go "") where go acc remaining | BS.null remaining = acc | otherwise = go (acc <> nonANSI) unprocessed where (nonANSI, _, unprocessed) = readNextANSICode remaining h
270
removeANSI :: Monad m => Conduit ByteString m ByteString removeANSI = mapC (go "") where go acc remaining | BS.null remaining = acc | otherwise = go (acc <> nonANSI) unprocessed where (nonANSI, _, unprocessed) = readNextANSICode remaining
270
removeANSI = mapC (go "") where go acc remaining | BS.null remaining = acc | otherwise = go (acc <> nonANSI) unprocessed where (nonANSI, _, unprocessed) = readNextANSICode remaining
213
false
true
0
9
71
101
48
53
null
null
h3nnn4n/rubiks-cube-haskell
Rubik.hs
gpl-3.0
---------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------...
674
move_I (Cube (Edges a b c d e f g h i j k l) (Corners m n o p q r s t)) = (Cube (Edges a b c d e f g h i j k l) (Corners m n o p q r s t))
173
move_I (Cube (Edges a b c d e f g h i j k l) (Corners m n o p q r s t)) = (Cube (Edges a b c d e f g h i j k l) (Corners m n o p q r s t))
173
true
false
0
9
89
125
64
61
null
null
mbakke/ganeti
src/Ganeti/HTools/CLI.hs
bsd-2-clause
oFullEvacuation :: OptType oFullEvacuation = (Option "" ["full-evacuation"] (NoArg (\ opts -> Ok opts { optFullEvacuation = True})) "fully evacuate the nodes to be rebooted", OptComplNone)
199
oFullEvacuation :: OptType oFullEvacuation = (Option "" ["full-evacuation"] (NoArg (\ opts -> Ok opts { optFullEvacuation = True})) "fully evacuate the nodes to be rebooted", OptComplNone)
199
oFullEvacuation = (Option "" ["full-evacuation"] (NoArg (\ opts -> Ok opts { optFullEvacuation = True})) "fully evacuate the nodes to be rebooted", OptComplNone)
172
false
true
0
13
36
54
30
24
null
null
ntc2/cryptol
src/Cryptol/ModuleSystem/Base.hs
bsd-3-clause
fullyQualified :: P.Import -> P.Import fullyQualified i = i { iAs = Just (iModule i) }
86
fullyQualified :: P.Import -> P.Import fullyQualified i = i { iAs = Just (iModule i) }
86
fullyQualified i = i { iAs = Just (iModule i) }
47
false
true
0
10
15
45
21
24
null
null
rolph-recto/liquid-fixpoint
src/Language/Fixpoint/Solver.hs
bsd-3-clause
saveSolution :: Config -> Result a -> IO () saveSolution cfg res = when (save cfg) $ do let f = queryFile Out cfg putStrLn $ "Saving Solution: " ++ f ++ "\n" ensurePath f writeFile f $ "\nSolution:\n" ++ showpp (resSolution res) --------------------------------------------------------------------------------
319
saveSolution :: Config -> Result a -> IO () saveSolution cfg res = when (save cfg) $ do let f = queryFile Out cfg putStrLn $ "Saving Solution: " ++ f ++ "\n" ensurePath f writeFile f $ "\nSolution:\n" ++ showpp (resSolution res) --------------------------------------------------------------------------------
319
saveSolution cfg res = when (save cfg) $ do let f = queryFile Out cfg putStrLn $ "Saving Solution: " ++ f ++ "\n" ensurePath f writeFile f $ "\nSolution:\n" ++ showpp (resSolution res) --------------------------------------------------------------------------------
275
false
true
0
12
53
109
48
61
null
null
KevinCotrone/Testing-STMTree
test/Testing/STMTreeSpec.hs
bsd-3-clause
spec :: Spec spec = do describe "someFunction" $ do it "should work fine" $ do True `shouldBe` False
112
spec :: Spec spec = do describe "someFunction" $ do it "should work fine" $ do True `shouldBe` False
112
spec = do describe "someFunction" $ do it "should work fine" $ do True `shouldBe` False
99
false
true
0
13
30
40
19
21
null
null
seL4/capDL-tool
CapDL/PrintC.hs
bsd-2-clause
printInit :: [Word] -> String printInit argv = "{" ++ Data.List.Utils.join ", " (Data.List.map show argv) ++ "}"
116
printInit :: [Word] -> String printInit argv = "{" ++ Data.List.Utils.join ", " (Data.List.map show argv) ++ "}"
116
printInit argv = "{" ++ Data.List.Utils.join ", " (Data.List.map show argv) ++ "}"
86
false
true
0
10
21
49
26
23
null
null
itkovian/number-six
src/NumberSix/Handlers/Op.hs
bsd-3-clause
deopHook :: Irc () deopHook = onBangCommand "!deop" $ onGod $ do nick <- getBangCommandText mode "-o" nick
114
deopHook :: Irc () deopHook = onBangCommand "!deop" $ onGod $ do nick <- getBangCommandText mode "-o" nick
114
deopHook = onBangCommand "!deop" $ onGod $ do nick <- getBangCommandText mode "-o" nick
95
false
true
0
8
25
42
19
23
null
null
yav/language-lua
src/Text/PrettyPrint/Leijen.hs
bsd-3-clause
-- | The document @(semiBraces xs)@ separates the documents @xs@ with -- semi colons and encloses them in braces. The documents are rendered -- horizontally if that fits the page. Otherwise they are aligned -- vertically. All semi colons are put in front of the elements. semiBraces :: [Doc] -> Doc semiBraces = enc...
349
semiBraces :: [Doc] -> Doc semiBraces = encloseSep lbrace rbrace semi
77
semiBraces = encloseSep lbrace rbrace semi
50
true
true
0
6
64
29
17
12
null
null
karamellpelle/grid
source/OpenGL/ES2/Values.hs
gpl-3.0
gl_NONE :: GLenum gl_NONE = 0
71
gl_NONE :: GLenum gl_NONE = 0
71
gl_NONE = 0
53
false
true
0
4
47
11
6
5
null
null
rahulmutt/ghcvm
compiler/Eta/Utils/FastBool.hs
bsd-3-clause
fastAnd 1# x = x
16
fastAnd 1# x = x
16
fastAnd 1# x = x
16
false
false
0
5
4
11
5
6
null
null
NorfairKing/the-notes
src/Cryptography/SystemAlgebra/AbstractSystems/Macro.hs
gpl-2.0
-- | Application of concrete Label assignment function la :: Note -> Note la = fn laf_
86
la :: Note -> Note la = fn laf_
31
la = fn laf_
12
true
true
0
7
16
25
11
14
null
null
nazrhom/vcs-clojure
src/VCS/Disjoint.hs
bsd-3-clause
disjAtAl disjointAt (a `Ac` as) (Ains at al) = disjAtAl disjointAt (a `Ac` as) al
83
disjAtAl disjointAt (a `Ac` as) (Ains at al) = disjAtAl disjointAt (a `Ac` as) al
83
disjAtAl disjointAt (a `Ac` as) (Ains at al) = disjAtAl disjointAt (a `Ac` as) al
83
false
false
0
7
16
46
25
21
null
null
deech/fltkhs-demos
src/Examples/table-sort.hs
mit
main :: IO () main = do window <- doubleWindowNew (Size (Width 900) (Height 500)) Nothing (Just "Table Sorting") (Width windowW) <- getW window (Height windowH) <- getH window rows <- uncurry readProcess dirCommand "" >>= return . map T.words . T.lines . T.pack rowDat...
1,430
main :: IO () main = do window <- doubleWindowNew (Size (Width 900) (Height 500)) Nothing (Just "Table Sorting") (Width windowW) <- getW window (Height windowH) <- getH window rows <- uncurry readProcess dirCommand "" >>= return . map T.words . T.lines . T.pack rowDat...
1,430
main = do window <- doubleWindowNew (Size (Width 900) (Height 500)) Nothing (Just "Table Sorting") (Width windowW) <- getW window (Height windowH) <- getH window rows <- uncurry readProcess dirCommand "" >>= return . map T.words . T.lines . T.pack rowData' <- newIORef...
1,416
false
true
1
17
396
472
207
265
null
null
shlevy/ghc
libraries/base/GHC/Show.hs
bsd-3-clause
showLitString :: String -> ShowS -- | Same as 'showLitChar', but for strings -- It converts the string to a string using Haskell escape conventions -- for non-printable characters. Does not add double-quotes around the -- whole thing; the caller should do that. -- The main difference from showLitChar (apart from the fa...
435
showLitString :: String -> ShowS showLitString [] s = s
63
showLitString [] s = s
30
true
true
0
6
81
28
17
11
null
null
urbanslug/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
enumFromToName = varQual gHC_ENUM (fsLit "enumFromTo") enumFromToClassOpKey
83
enumFromToName = varQual gHC_ENUM (fsLit "enumFromTo") enumFromToClassOpKey
83
enumFromToName = varQual gHC_ENUM (fsLit "enumFromTo") enumFromToClassOpKey
83
false
false
0
7
14
19
9
10
null
null
Michaelt293/Lipid-Haskell
test/Lipid/Parsers/UnknownSn/GlycerophospholipidSpec.hs
gpl-3.0
spec :: Spec spec = do describe "Test for quasiquoters and Shorthand instances" $ do it "QuasiQuoter for PA 14:0_16:0" $ shorthand @ (PA (Maybe DeltaPosition)) [paMaybeDelta|PA 14:0_16:0|] `shouldBe` "PA 14:0_16:0" it "QuasiQuoter for PA 14:0_16:0" $ shorthand @ (PA DeltaPosition) [paDelta|PA 14:0...
8,862
spec :: Spec spec = do describe "Test for quasiquoters and Shorthand instances" $ do it "QuasiQuoter for PA 14:0_16:0" $ shorthand @ (PA (Maybe DeltaPosition)) [paMaybeDelta|PA 14:0_16:0|] `shouldBe` "PA 14:0_16:0" it "QuasiQuoter for PA 14:0_16:0" $ shorthand @ (PA DeltaPosition) [paDelta|PA 14:0...
8,862
spec = do describe "Test for quasiquoters and Shorthand instances" $ do it "QuasiQuoter for PA 14:0_16:0" $ shorthand @ (PA (Maybe DeltaPosition)) [paMaybeDelta|PA 14:0_16:0|] `shouldBe` "PA 14:0_16:0" it "QuasiQuoter for PA 14:0_16:0" $ shorthand @ (PA DeltaPosition) [paDelta|PA 14:0_16:0|] `shou...
8,849
false
true
0
17
1,589
1,915
1,055
860
null
null
krapsh/kraps-haskell
src/Spark/Core/Internal/FunctionsInternals.hs
apache-2.0
-- | Packs a single column into a dataframe. pack1 :: Column ref a -> Dataset a pack1 = _pack1
94
pack1 :: Column ref a -> Dataset a pack1 = _pack1
49
pack1 = _pack1
14
true
true
0
6
19
24
12
12
null
null
jdubrule/bond
compiler/src/Language/Bond/Lexer.hs
mit
semi :: Parser String semi = symbol ";"
39
semi :: Parser String semi = symbol ";"
39
semi = symbol ";"
17
false
true
0
5
7
17
8
9
null
null
nushio3/Paraiso
Language/Paraiso/Generator/ClarisTrans.hs
bsd-3-clause
paren :: Parenthesis -> Text -> Text paren p str = prefix ++ str ++ suffix where (prefix,suffix) = case p of Paren -> ("(",")") Bracket -> ("[","]") Brace -> ("{","}") Chevron -> ("<",">") Chevron2 -> ("<<",">>") Chevron3 -> ("<<<",">>>") Quotation ->...
402
paren :: Parenthesis -> Text -> Text paren p str = prefix ++ str ++ suffix where (prefix,suffix) = case p of Paren -> ("(",")") Bracket -> ("[","]") Brace -> ("{","}") Chevron -> ("<",">") Chevron2 -> ("<<",">>") Chevron3 -> ("<<<",">>>") Quotation ->...
402
paren p str = prefix ++ str ++ suffix where (prefix,suffix) = case p of Paren -> ("(",")") Bracket -> ("[","]") Brace -> ("{","}") Chevron -> ("<",">") Chevron2 -> ("<<",">>") Chevron3 -> ("<<<",">>>") Quotation -> ("\'","\'") Quotation2 -> ("\"...
365
false
true
0
8
136
159
89
70
null
null
felipeZ/Dynamics
src/Dynamics.hs
bsd-3-clause
calcEk :: Array U DIM1 Double -> Array U DIM1 Double -> Double calcEk vs ms = R.sumAllS . computeUnboxedS . fromFunction (extent vs) $ (\sh@(Z:.i) -> let m = ms ! (Z :. i`div` 3) v = vs ! sh in 0.5*m*v^2)
251
calcEk :: Array U DIM1 Double -> Array U DIM1 Double -> Double calcEk vs ms = R.sumAllS . computeUnboxedS . fromFunction (extent vs) $ (\sh@(Z:.i) -> let m = ms ! (Z :. i`div` 3) v = vs ! sh in 0.5*m*v^2)
251
calcEk vs ms = R.sumAllS . computeUnboxedS . fromFunction (extent vs) $ (\sh@(Z:.i) -> let m = ms ! (Z :. i`div` 3) v = vs ! sh in 0.5*m*v^2)
188
false
true
0
15
89
128
66
62
null
null
elliottt/hsopenid
src/Network/OpenID/Authentication.hs
bsd-3-clause
verifyDirect :: Monad m => Params -> Provider -> Resolver m -> ExceptionT Error m () verifyDirect ps prov resolve = do let body = formatParams $ ("openid.mode","check_authentication") : filter (\p -> fst p /= "openid.mode") ps ersp <- lift $ resolve Request { rqURI = provi...
776
verifyDirect :: Monad m => Params -> Provider -> Resolver m -> ExceptionT Error m () verifyDirect ps prov resolve = do let body = formatParams $ ("openid.mode","check_authentication") : filter (\p -> fst p /= "openid.mode") ps ersp <- lift $ resolve Request { rqURI = provi...
776
verifyDirect ps prov resolve = do let body = formatParams $ ("openid.mode","check_authentication") : filter (\p -> fst p /= "openid.mode") ps ersp <- lift $ resolve Request { rqURI = providerURI prov , rqMethod = POST , rqHeaders = [ Header HdrContentLength $ show $ leng...
678
false
true
0
16
226
235
115
120
null
null
frenetic-lang/netcore-1.0
src/Frenetic/NetCore/Reduce.hs
bsd-3-clause
atomKV (Not (DlVlanPcp x)) = (FDlVlanPcp, CFS.excludes (fromIntegral x))
72
atomKV (Not (DlVlanPcp x)) = (FDlVlanPcp, CFS.excludes (fromIntegral x))
72
atomKV (Not (DlVlanPcp x)) = (FDlVlanPcp, CFS.excludes (fromIntegral x))
72
false
false
0
9
8
38
19
19
null
null
mstksg/cm-dip
src/Experiments/Filters.hs
mit
gauss :: (RealFloat a, RelIndex (V2 Int) t, Comonad t) => a -> t a -> a gauss r t = (*c) . sum $ [ f i j | i <- [-r'..r'] , j <- [-r'..r'] ] where f i j = relWithW t (V2 i j) * exp (ec * d i j) d x y = fromIntegral (x * x + y * y) σ = r...
415
gauss :: (RealFloat a, RelIndex (V2 Int) t, Comonad t) => a -> t a -> a gauss r t = (*c) . sum $ [ f i j | i <- [-r'..r'] , j <- [-r'..r'] ] where f i j = relWithW t (V2 i j) * exp (ec * d i j) d x y = fromIntegral (x * x + y * y) σ = r...
415
gauss r t = (*c) . sum $ [ f i j | i <- [-r'..r'] , j <- [-r'..r'] ] where f i j = relWithW t (V2 i j) * exp (ec * d i j) d x y = fromIntegral (x * x + y * y) σ = r / 2 ec = -1 / (2 * σ * σ) c = 1 / (2 * pi * σ * σ) r...
343
false
true
0
10
203
245
126
119
null
null
ndmitchell/tagsoup
test/TagSoup/Generate/Convert.hs
bsd-3-clause
inExpr names (Var (UnQual (Symbol x))) = eVar $ "(" ++ x ++ ")"
63
inExpr names (Var (UnQual (Symbol x))) = eVar $ "(" ++ x ++ ")"
63
inExpr names (Var (UnQual (Symbol x))) = eVar $ "(" ++ x ++ ")"
63
false
false
0
11
13
42
20
22
null
null
ak3n/lambda-zoo
src/STLCHKT.hs
bsd-3-clause
star :: Monad m => (a -> StepT m a) -> (a -> m a) star f a = runMaybeT (runStepT $ f a) >>= return a `maybe` star f
127
star :: Monad m => (a -> StepT m a) -> (a -> m a) star f a = runMaybeT (runStepT $ f a) >>= return a `maybe` star f
127
star f a = runMaybeT (runStepT $ f a) >>= return a `maybe` star f
71
false
true
0
11
41
86
40
46
null
null
Teaspot-Studio/gore-and-ash-lambdacube
examples/05/Example05.hs
bsd-3-clause
simulateWall :: forall t m . (MonadLambdaCube t m) => Dynamic t Float -> GLStorage -> GPUMesh -> m () simulateWall tD storage gpuMesh = do -- upload geometry to GPU and add to pipeline input obj <- liftIO $ LC.addMeshToObjectArray storage "objects" [ "modelMat" , "diffuseTexture" , "depthMVP"] gpuMe...
737
simulateWall :: forall t m . (MonadLambdaCube t m) => Dynamic t Float -> GLStorage -> GPUMesh -> m () simulateWall tD storage gpuMesh = do -- upload geometry to GPU and add to pipeline input obj <- liftIO $ LC.addMeshToObjectArray storage "objects" [ "modelMat" , "diffuseTexture" , "depthMVP"] gpuMe...
737
simulateWall tD storage gpuMesh = do -- upload geometry to GPU and add to pipeline input obj <- liftIO $ LC.addMeshToObjectArray storage "objects" [ "modelMat" , "diffuseTexture" , "depthMVP"] gpuMesh -- load image and upload texture textureData <- liftIO $ do Right img <- Juicy.readImage ".....
633
false
true
0
14
147
196
92
104
null
null
well-typed/ixset-typed
src/Data/IxSet/Typed/Ix.hs
bsd-3-clause
-- | Helper function to create a new index from a list. fromList :: (Ord a, Ord k) => [(k, a)] -> Map k (Set a) fromList xs = Map.fromListWith Set.union (List.map (\ (k, v) -> (k, Set.singleton v)) xs)
203
fromList :: (Ord a, Ord k) => [(k, a)] -> Map k (Set a) fromList xs = Map.fromListWith Set.union (List.map (\ (k, v) -> (k, Set.singleton v)) xs)
147
fromList xs = Map.fromListWith Set.union (List.map (\ (k, v) -> (k, Set.singleton v)) xs)
91
true
true
0
12
41
98
53
45
null
null
poxu/pandoc
src/Text/Pandoc/Writers/ConTeXt.hs
gpl-2.0
-- | escape things as needed for ConTeXt escapeCharForConTeXt :: WriterOptions -> Char -> String escapeCharForConTeXt opts ch = let ligatures = writerTeXLigatures opts in case ch of '{' -> "\\{" '}' -> "\\}" '\\' -> "\\letterbackslash{}" '$' -> "\\$" '|' -> "\\letterbar{}" '%' ...
630
escapeCharForConTeXt :: WriterOptions -> Char -> String escapeCharForConTeXt opts ch = let ligatures = writerTeXLigatures opts in case ch of '{' -> "\\{" '}' -> "\\}" '\\' -> "\\letterbackslash{}" '$' -> "\\$" '|' -> "\\letterbar{}" '%' -> "\\letterpercent{}" '~' -> "\\...
589
escapeCharForConTeXt opts ch = let ligatures = writerTeXLigatures opts in case ch of '{' -> "\\{" '}' -> "\\}" '\\' -> "\\letterbackslash{}" '$' -> "\\$" '|' -> "\\letterbar{}" '%' -> "\\letterpercent{}" '~' -> "\\lettertilde{}" '#' -> "\\#" '[' -> "{[}" ...
533
true
true
0
12
188
161
78
83
null
null
mainland/nikola
src/Data/Vector/CUDA/UnboxedForeign/Base.hs
bsd-3-clause
primVector(Word16, V_Word16, MV_Word16) newtype instance MVector s Word32 = MV_Word32 (P.MVector s Word32)
107
primVector(Word16, V_Word16, MV_Word16) newtype instance MVector s Word32 = MV_Word32 (P.MVector s Word32)
107
primVector(Word16, V_Word16, MV_Word16) newtype instance MVector s Word32 = MV_Word32 (P.MVector s Word32)
107
false
false
0
8
13
41
21
20
null
null
alpicola/mel
src/Frontend/Elaborate.hs
mit
tcExpr (MLValue val) = return (typeOfValue val, AValue val)
61
tcExpr (MLValue val) = return (typeOfValue val, AValue val)
61
tcExpr (MLValue val) = return (typeOfValue val, AValue val)
61
false
false
0
7
10
30
14
16
null
null
roelvandijk/aeson
Data/Aeson/Encode/Builder.hs
bsd-3-clause
utcTime :: UTCTime -> B.Builder utcTime (UTCTime d s) = dayTime d (diffTimeOfDay64 s) <> B.char7 'Z'
100
utcTime :: UTCTime -> B.Builder utcTime (UTCTime d s) = dayTime d (diffTimeOfDay64 s) <> B.char7 'Z'
100
utcTime (UTCTime d s) = dayTime d (diffTimeOfDay64 s) <> B.char7 'Z'
68
false
true
0
8
16
48
23
25
null
null
sdiehl/ghc
testsuite/tests/pmcheck/should_compile/T17357.hs
bsd-3-clause
f3 !_ = ()
10
f3 !_ = ()
10
f3 !_ = ()
10
false
false
0
6
3
12
5
7
null
null
Copilot-Language/sbv-for-copilot
Data/SBV/Examples/Crypto/RC4.hs
bsd-3-clause
prga :: RC4 -> (SWord8, RC4) prga (st', i', j') = (readSTree st kInd, (st, i, j)) where i = i' + 1 j = j' + readSTree st' i st = swap i j st' kInd = readSTree st i + readSTree st j ----------------------------------------------------------------------------- -- * Key schedule --------...
460
prga :: RC4 -> (SWord8, RC4) prga (st', i', j') = (readSTree st kInd, (st, i, j)) where i = i' + 1 j = j' + readSTree st' i st = swap i j st' kInd = readSTree st i + readSTree st j ----------------------------------------------------------------------------- -- * Key schedule --------...
460
prga (st', i', j') = (readSTree st kInd, (st, i, j)) where i = i' + 1 j = j' + readSTree st' i st = swap i j st' kInd = readSTree st i + readSTree st j ----------------------------------------------------------------------------- -- * Key schedule -------------------------------------...
431
false
true
7
8
101
131
64
67
null
null
tomgr/webcspm
src/Text/XML/Plist/PlObject.hs
bsd-3-clause
fromPlDict :: Monad m => PlObject -> m [(String, PlObject)] fromPlDict (PlDict d) = return d
92
fromPlDict :: Monad m => PlObject -> m [(String, PlObject)] fromPlDict (PlDict d) = return d
92
fromPlDict (PlDict d) = return d
32
false
true
0
9
15
46
23
23
null
null
isomorphism/csound-expression
src/Csound/Air/Misc.hs
bsd-3-clause
-- | Random panning rndPan :: Sig -> SE Sig2 rndPan a = do fmap (pan2 a . sig) (rnd (1 :: D)) -- | Random volume (with gauss distribution) -- -- > gaussVol radiusOfDistribution
185
rndPan :: Sig -> SE Sig2 rndPan a = do fmap (pan2 a . sig) (rnd (1 :: D)) -- | Random volume (with gauss distribution) -- -- > gaussVol radiusOfDistribution
165
rndPan a = do fmap (pan2 a . sig) (rnd (1 :: D)) -- | Random volume (with gauss distribution) -- -- > gaussVol radiusOfDistribution
140
true
true
0
10
43
55
29
26
null
null
wilbowma/accelerate
Data/Array/Accelerate/Pretty/Print.hs
bsd-3-clause
{- -- Pretty print type -- prettyAnyType :: ScalarType a -> Doc prettyAnyType ty = text $ show ty -} prettyArray :: forall dim e. Array dim e -> Doc prettyArray arr@(Array sh _) = parens $ hang (text "Array") 2 $ sep [showDoc (toElt sh :: dim), dataDoc] where showDoc :: forall a. Show a => a -> D...
590
prettyArray :: forall dim e. Array dim e -> Doc prettyArray arr@(Array sh _) = parens $ hang (text "Array") 2 $ sep [showDoc (toElt sh :: dim), dataDoc] where showDoc :: forall a. Show a => a -> Doc showDoc = text . show l = toList arr dataDoc | length l <= 1000 = showDoc l ...
488
prettyArray arr@(Array sh _) = parens $ hang (text "Array") 2 $ sep [showDoc (toElt sh :: dim), dataDoc] where showDoc :: forall a. Show a => a -> Doc showDoc = text . show l = toList arr dataDoc | length l <= 1000 = showDoc l | otherwise = showDoc (take 1000 l...
440
true
true
0
10
191
172
86
86
null
null
jimenezrick/cook.hs
src/Cook/Recipe/Util.hs
mit
mapFileContent :: FilePath -> (Text -> Text) -> Recipe f () mapFileContent path f = withRecipeName "Util.MapFileContent" $ do content <- recipeIO $ T.readFile path recipeIO . T.writeFile path $ f content
211
mapFileContent :: FilePath -> (Text -> Text) -> Recipe f () mapFileContent path f = withRecipeName "Util.MapFileContent" $ do content <- recipeIO $ T.readFile path recipeIO . T.writeFile path $ f content
211
mapFileContent path f = withRecipeName "Util.MapFileContent" $ do content <- recipeIO $ T.readFile path recipeIO . T.writeFile path $ f content
151
false
true
0
12
39
85
38
47
null
null
mgold/Elm
src/Parse/Expression.hs
bsd-3-clause
listTerm :: IParser Source.Expr' listTerm = shader' <|> braces (try range <|> E.ExplicitList <$> commaSep expr) where range = do lo <- expr padded (string "..") E.Range lo <$> expr shader' = do pos <- getPosition let uid = show (sourceLine pos) ++ ":" ++ show (...
441
listTerm :: IParser Source.Expr' listTerm = shader' <|> braces (try range <|> E.ExplicitList <$> commaSep expr) where range = do lo <- expr padded (string "..") E.Range lo <$> expr shader' = do pos <- getPosition let uid = show (sourceLine pos) ++ ":" ++ show (...
441
listTerm = shader' <|> braces (try range <|> E.ExplicitList <$> commaSep expr) where range = do lo <- expr padded (string "..") E.Range lo <$> expr shader' = do pos <- getPosition let uid = show (sourceLine pos) ++ ":" ++ show (sourceColumn pos) (rawS...
408
false
true
0
14
138
171
81
90
null
null
jyp/MarXup
MarXup/Latex.hs
gpl-2.0
makecell :: String -> Tex b -> Tex b makecell opts body = do usepkg "makecell" 100 [] cmd' "makecell" [opts] body
117
makecell :: String -> Tex b -> Tex b makecell opts body = do usepkg "makecell" 100 [] cmd' "makecell" [opts] body
117
makecell opts body = do usepkg "makecell" 100 [] cmd' "makecell" [opts] body
80
false
true
0
8
25
55
25
30
null
null
ivendrov/frabjous2
src/Frabjous/Compiler/Transform.hs
mit
getNum :: ReactiveMonad Int getNum = gets fst
45
getNum :: ReactiveMonad Int getNum = gets fst
45
getNum = gets fst
17
false
true
1
5
7
21
8
13
null
null
urbanslug/ghc
testsuite/tests/ghci.debugger/scripts/dynbrk007.hs
bsd-3-clause
f :: Maybe Int f = do i <- return 1 j <- return 2 k <- return 3 return i
84
f :: Maybe Int f = do i <- return 1 j <- return 2 k <- return 3 return i
84
f = do i <- return 1 j <- return 2 k <- return 3 return i
69
false
true
1
9
32
54
21
33
null
null
wmoss/multileveldb
src/Network/Server/MultiLevelDB/Util.hs
bsd-2-clause
sTol = B.fromChunks . (:[])
27
sTol = B.fromChunks . (:[])
27
sTol = B.fromChunks . (:[])
27
false
false
1
8
4
22
10
12
null
null
Alexander-Ignatyev/astro
src/Data/Astro/Star.hs
bsd-3-clause
-- | Returns Equatorial Coordinates for the given star starCoordinates :: Star -> EquatorialCoordinates1 starCoordinates Polaris = EC1 (fromDMS 89 15 51) (fromHMS 2 31 48.7)
173
starCoordinates :: Star -> EquatorialCoordinates1 starCoordinates Polaris = EC1 (fromDMS 89 15 51) (fromHMS 2 31 48.7)
118
starCoordinates Polaris = EC1 (fromDMS 89 15 51) (fromHMS 2 31 48.7)
68
true
true
0
7
25
44
22
22
null
null
hesiod/OpenGL
src/Graphics/Rendering/OpenGL/GL/Texturing/Specification.hs
bsd-3-clause
-------------------------------------------------------------------------------- getTexImage :: GettableTextureTarget t => t -> Level -> PixelData a -> IO () getTexImage target level pd = withPixelData pd $ glGetTexImage (marshalGettableTextureTarget target) level
274
getTexImage :: GettableTextureTarget t => t -> Level -> PixelData a -> IO () getTexImage target level pd = withPixelData pd $ glGetTexImage (marshalGettableTextureTarget target) level
192
getTexImage target level pd = withPixelData pd $ glGetTexImage (marshalGettableTextureTarget target) level
115
true
true
0
10
36
64
30
34
null
null
snoyberg/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
-- Primitive types and values gHC_TYPES = mkPrimModule (fsLit "GHC.Types")
80
gHC_TYPES = mkPrimModule (fsLit "GHC.Types")
50
gHC_TYPES = mkPrimModule (fsLit "GHC.Types")
50
true
false
0
7
15
16
8
8
null
null
sdiehl/llvm-tutorial-standalone
src/Codegen.hs
mit
-- Effects call :: Operand -> [Operand] -> Codegen Operand call fn args = instr float $ Call Nothing CC.C [] (Right fn) (toArgs args) [] []
139
call :: Operand -> [Operand] -> Codegen Operand call fn args = instr float $ Call Nothing CC.C [] (Right fn) (toArgs args) [] []
128
call fn args = instr float $ Call Nothing CC.C [] (Right fn) (toArgs args) [] []
80
true
true
0
8
26
77
37
40
null
null
aBhallo/AoC2016
Day 13/day13part2.hs
mit
main = print compute
20
main = print compute
20
main = print compute
20
false
false
1
5
3
13
4
9
null
null
spechub/Hets
QBF/Sublogic.hs
gpl-2.0
{- Functions to compute minimal sublogic for a given element, these work by recursing into all subelements -} -- | determines the sublogic for symbol map items slSymmap :: QBFSL -> AS_BASIC.SYMBMAPITEMS -> QBFSL slSymmap ps _ = ps
231
slSymmap :: QBFSL -> AS_BASIC.SYMBMAPITEMS -> QBFSL slSymmap ps _ = ps
70
slSymmap ps _ = ps
18
true
true
0
7
39
28
15
13
null
null
nejla/auth-service
auth-service-core/src/SignedAuth/Sign.hs
bsd-3-clause
readPublicKeyPem :: ByteString -> Either String PublicKey readPublicKeyPem pem = do der <- decodePublicKeyPem pem readPublicKeyDer der
138
readPublicKeyPem :: ByteString -> Either String PublicKey readPublicKeyPem pem = do der <- decodePublicKeyPem pem readPublicKeyDer der
138
readPublicKeyPem pem = do der <- decodePublicKeyPem pem readPublicKeyDer der
80
false
true
0
8
20
39
17
22
null
null
arianvp/binary-serialise-cbor
tests/Tests/Regress/FlatTerm.hs
bsd-3-clause
-- | Test an edge case in the FlatTerm implementation: when encoding an -- Int64 that is less than @'minBound' :: 'Int'@, make sure we use an -- @'Integer'@ to store the result, because sticking it into an @'Int'@ -- will result in overflow otherwise. smallInt64Test :: Either String Int64 smallInt64Test = fromFlatTerm ...
369
smallInt64Test :: Either String Int64 smallInt64Test = fromFlatTerm decodeInt64 $ toFlatTerm (encodeInt64 smallInt64)
117
smallInt64Test = fromFlatTerm decodeInt64 $ toFlatTerm (encodeInt64 smallInt64)
79
true
true
0
8
57
36
19
17
null
null
diku-dk/futhark
src/Futhark/Analysis/HORep/SOAC.hs
isc
typeOf (Scatter _w lam _ivs dests) = zipWith arrayOfShape val_ts ws where indexes = sum $ zipWith (*) ns $ map length ws val_ts = drop indexes $ lambdaReturnType lam (ws, ns, _) = unzip3 dests
208
typeOf (Scatter _w lam _ivs dests) = zipWith arrayOfShape val_ts ws where indexes = sum $ zipWith (*) ns $ map length ws val_ts = drop indexes $ lambdaReturnType lam (ws, ns, _) = unzip3 dests
208
typeOf (Scatter _w lam _ivs dests) = zipWith arrayOfShape val_ts ws where indexes = sum $ zipWith (*) ns $ map length ws val_ts = drop indexes $ lambdaReturnType lam (ws, ns, _) = unzip3 dests
208
false
false
2
8
51
88
44
44
null
null
netogallo/polyvariant
src/Analysis/Types/Common.hs
bsd-3-clause
baseUnionRepAlg base' offset e = groupUnionAlgebra (baseRepAlg base' offset e) unionF emptyF where base = M.map (\e -> (e,True)) base' unionF i ma mb = return $ M.insert i base $ M.union ma mb emptyF i = return $ M.fromList [(i,base)]
248
baseUnionRepAlg base' offset e = groupUnionAlgebra (baseRepAlg base' offset e) unionF emptyF where base = M.map (\e -> (e,True)) base' unionF i ma mb = return $ M.insert i base $ M.union ma mb emptyF i = return $ M.fromList [(i,base)]
248
baseUnionRepAlg base' offset e = groupUnionAlgebra (baseRepAlg base' offset e) unionF emptyF where base = M.map (\e -> (e,True)) base' unionF i ma mb = return $ M.insert i base $ M.union ma mb emptyF i = return $ M.fromList [(i,base)]
248
false
false
2
11
54
119
60
59
null
null
bos/text-format
Data/Text/Format.hs
bsd-2-clause
zipParams :: [Builder] -> [Builder] -> Builder zipParams fragments params = go fragments params where go (f:fs) (y:ys) = f <> y <> go fs ys go [f] [] = f go _ _ = error . LT.unpack $ format "Data.Text.Format.build: {} sites, but {} parameters" (length fragments...
340
zipParams :: [Builder] -> [Builder] -> Builder zipParams fragments params = go fragments params where go (f:fs) (y:ys) = f <> y <> go fs ys go [f] [] = f go _ _ = error . LT.unpack $ format "Data.Text.Format.build: {} sites, but {} parameters" (length fragments...
340
zipParams fragments params = go fragments params where go (f:fs) (y:ys) = f <> y <> go fs ys go [f] [] = f go _ _ = error . LT.unpack $ format "Data.Text.Format.build: {} sites, but {} parameters" (length fragments - 1, length params)
293
false
true
9
8
110
150
67
83
null
null
bvdelft/parac2
src/Language/Java/Paragon/Compile.hs
bsd-3-clause
compileBinOp :: Op () -> Exp T -> Exp T -> Exp () compileBinOp op e1 e2 | Just (t1, _) <- ann e1, t1 == policyT, Just (t2, _) <- ann e2, t2 == policyT, op `elem` [Mult (), Add ()] = mkParagonPolicyOp op (compileExp e1) (compileExp e2)
297
compileBinOp :: Op () -> Exp T -> Exp T -> Exp () compileBinOp op e1 e2 | Just (t1, _) <- ann e1, t1 == policyT, Just (t2, _) <- ann e2, t2 == policyT, op `elem` [Mult (), Add ()] = mkParagonPolicyOp op (compileExp e1) (compileExp e2)
297
compileBinOp op e1 e2 | Just (t1, _) <- ann e1, t1 == policyT, Just (t2, _) <- ann e2, t2 == policyT, op `elem` [Mult (), Add ()] = mkParagonPolicyOp op (compileExp e1) (compileExp e2)
247
false
true
0
11
111
149
72
77
null
null
frosch03/frogblog
Snippets/DateNavigation.hs
bsd-3-clause
dynNav :: Date -> Html dynNav (D (year, month, day)) = s " Blog Navigation" +++ br +++ s "-------------------" +++ br +++ (foldl1 (+++) lnk) where s = stringToHtml lnk = map (\(u, n) -> (s " * ") +++ (anchor ! [href u] $ (s n)) +++ br) $ [ (blogPath ++ ("/page/0"), ...
724
dynNav :: Date -> Html dynNav (D (year, month, day)) = s " Blog Navigation" +++ br +++ s "-------------------" +++ br +++ (foldl1 (+++) lnk) where s = stringToHtml lnk = map (\(u, n) -> (s " * ") +++ (anchor ! [href u] $ (s n)) +++ br) $ [ (blogPath ++ ("/page/0"), ...
724
dynNav (D (year, month, day)) = s " Blog Navigation" +++ br +++ s "-------------------" +++ br +++ (foldl1 (+++) lnk) where s = stringToHtml lnk = map (\(u, n) -> (s " * ") +++ (anchor ! [href u] $ (s n)) +++ br) $ [ (blogPath ++ ("/page/0"), ...
701
false
true
0
17
302
270
148
122
null
null