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
sseefried/shady-graphics
src/Shady/Image.hs
agpl-3.0
transformG' :: (c -> Unop p) -> (p -> c) -> Unop (p -> a) transformG' f imc ima p = ima (f (imc p) p)
101
transformG' :: (c -> Unop p) -> (p -> c) -> Unop (p -> a) transformG' f imc ima p = ima (f (imc p) p)
101
transformG' f imc ima p = ima (f (imc p) p)
43
false
true
0
10
25
76
37
39
null
null
harendra-kumar/stack
src/Stack/Docker.hs
bsd-3-clause
-- | Fail with friendly error if project root not set. fromMaybeProjectRoot :: Maybe (Path Abs Dir) -> Path Abs Dir fromMaybeProjectRoot = fromMaybe (throw CannotDetermineProjectRootException)
192
fromMaybeProjectRoot :: Maybe (Path Abs Dir) -> Path Abs Dir fromMaybeProjectRoot = fromMaybe (throw CannotDetermineProjectRootException)
137
fromMaybeProjectRoot = fromMaybe (throw CannotDetermineProjectRootException)
76
true
true
0
8
25
41
20
21
null
null
vluukkal/aspreify
txtrender.hs
mit
unarith op a1 a2 = (unmyexpr a1) ++ " " ++ (unop op) ++ " " ++ (unmyexpr a2)
82
unarith op a1 a2 = (unmyexpr a1) ++ " " ++ (unop op) ++ " " ++ (unmyexpr a2)
82
unarith op a1 a2 = (unmyexpr a1) ++ " " ++ (unop op) ++ " " ++ (unmyexpr a2)
82
false
false
0
10
24
49
23
26
null
null
dysinger/amazonka
amazonka-storagegateway/gen/Network/AWS/StorageGateway/DisableGateway.hs
mpl-2.0
-- | The unique Amazon Resource Name of the disabled gateway. dgr1GatewayARN :: Lens' DisableGatewayResponse (Maybe Text) dgr1GatewayARN = lens _dgr1GatewayARN (\s a -> s { _dgr1GatewayARN = a })
195
dgr1GatewayARN :: Lens' DisableGatewayResponse (Maybe Text) dgr1GatewayARN = lens _dgr1GatewayARN (\s a -> s { _dgr1GatewayARN = a })
133
dgr1GatewayARN = lens _dgr1GatewayARN (\s a -> s { _dgr1GatewayARN = a })
73
true
true
0
9
29
46
25
21
null
null
nukisman/elm-format-short
markdown/Cheapskate/Inlines.hs
bsd-3-clause
pQuoted :: Char -> Parser Text pQuoted c = do skip (== c) contents <- takeTill (== c) skip (== c) return (T.singleton c <> contents <> T.singleton c) -- Parses an HTML comment. This isn't really correct to spec, but should -- do for now.
246
pQuoted :: Char -> Parser Text pQuoted c = do skip (== c) contents <- takeTill (== c) skip (== c) return (T.singleton c <> contents <> T.singleton c) -- Parses an HTML comment. This isn't really correct to spec, but should -- do for now.
246
pQuoted c = do skip (== c) contents <- takeTill (== c) skip (== c) return (T.singleton c <> contents <> T.singleton c) -- Parses an HTML comment. This isn't really correct to spec, but should -- do for now.
215
false
true
0
12
54
84
41
43
null
null
ozgurakgun/cmdargs
System/Console/CmdArgs/Test/Implicit/Tests.hs
bsd-3-clause
mode22 = cmdArgsMode $ Test22 { port = 8000 &= help "set the port of the server" , runtime = Nothing &= typFile &= help "Specify a custom location for Elm's runtime system." } &= help "Quickly reload Elm projects in your browser. Just refresh to recompile.\n\ \It serves static files and freshly recompiled Elm files." &= helpArg [explicit, name "help", name "h"] &= versionArg [ explicit, name "version", name "v" , summary "0.12.0.1" ] &= summary "Elm Server 0.11.0.1, (c) Evan Czaplicki 2011-2014"
580
mode22 = cmdArgsMode $ Test22 { port = 8000 &= help "set the port of the server" , runtime = Nothing &= typFile &= help "Specify a custom location for Elm's runtime system." } &= help "Quickly reload Elm projects in your browser. Just refresh to recompile.\n\ \It serves static files and freshly recompiled Elm files." &= helpArg [explicit, name "help", name "h"] &= versionArg [ explicit, name "version", name "v" , summary "0.12.0.1" ] &= summary "Elm Server 0.11.0.1, (c) Evan Czaplicki 2011-2014"
580
mode22 = cmdArgsMode $ Test22 { port = 8000 &= help "set the port of the server" , runtime = Nothing &= typFile &= help "Specify a custom location for Elm's runtime system." } &= help "Quickly reload Elm projects in your browser. Just refresh to recompile.\n\ \It serves static files and freshly recompiled Elm files." &= helpArg [explicit, name "help", name "h"] &= versionArg [ explicit, name "version", name "v" , summary "0.12.0.1" ] &= summary "Elm Server 0.11.0.1, (c) Evan Czaplicki 2011-2014"
580
false
false
0
12
163
109
54
55
null
null
OliverFlecke/Funci
src/Lexer.hs
bsd-3-clause
lexer ('=':cs) = addToken (Operator Assignment) cs
50
lexer ('=':cs) = addToken (Operator Assignment) cs
50
lexer ('=':cs) = addToken (Operator Assignment) cs
50
false
false
0
7
6
27
13
14
null
null
brendanhay/gogol
gogol-dlp/gen/Network/Google/Resource/DLP/Projects/DlpJobs/Cancel.hs
mpl-2.0
-- | Multipart request metadata. pdjcPayload :: Lens' ProjectsDlpJobsCancel GooglePrivacyDlpV2CancelDlpJobRequest pdjcPayload = lens _pdjcPayload (\ s a -> s{_pdjcPayload = a})
178
pdjcPayload :: Lens' ProjectsDlpJobsCancel GooglePrivacyDlpV2CancelDlpJobRequest pdjcPayload = lens _pdjcPayload (\ s a -> s{_pdjcPayload = a})
145
pdjcPayload = lens _pdjcPayload (\ s a -> s{_pdjcPayload = a})
64
true
true
1
9
22
46
22
24
null
null
y-usuzumi/goblin-workshop
src/Goblin/Workshop/Workshop.hs
bsd-3-clause
removeAvailableTask :: TaskId -> Workshop m -> Workshop m removeAvailableTask tid = Workshop . removeEntryPoint tid . graph
123
removeAvailableTask :: TaskId -> Workshop m -> Workshop m removeAvailableTask tid = Workshop . removeEntryPoint tid . graph
123
removeAvailableTask tid = Workshop . removeEntryPoint tid . graph
65
false
true
0
8
17
44
19
25
null
null
jdavidberger/project-euler
prob70.hs
lgpl-3.0
phi_np (n,m) = n*m - n - m + 1
32
phi_np (n,m) = n*m - n - m + 1
32
phi_np (n,m) = n*m - n - m + 1
32
false
false
3
5
11
38
16
22
null
null
spechub/Hets
Comorphisms/ExtModal2HasCASL.hs
gpl-2.0
-- | mixfix names work for tuples and are lost after currying trI :: Id -> Id trI i = if isMixfix i then Id [genToken "C"] [i] $ rangeOfId i else i
147
trI :: Id -> Id trI i = if isMixfix i then Id [genToken "C"] [i] $ rangeOfId i else i
85
trI i = if isMixfix i then Id [genToken "C"] [i] $ rangeOfId i else i
69
true
true
0
9
32
57
27
30
null
null
christiaanb/ghc
compiler/basicTypes/OccName.hs
bsd-3-clause
mkOccSet = mkUniqSet
29
mkOccSet = mkUniqSet
29
mkOccSet = mkUniqSet
29
false
false
0
4
11
6
3
3
null
null
lookunder/xlsx
src/Test.hs
mit
xEmpty :: Cell xEmpty = Cell{_cellValue=Nothing, _cellStyle=Just 0}
67
xEmpty :: Cell xEmpty = Cell{_cellValue=Nothing, _cellStyle=Just 0}
67
xEmpty = Cell{_cellValue=Nothing, _cellStyle=Just 0}
52
false
true
0
8
7
39
18
21
null
null
xcv-/LCC
lib/Language/LCC/AST/Signature.hs
gpl-3.0
partMatchParams2 :: [Maybe Type] -> [Maybe Type] -> Bool partMatchParams2 ps1 ps2 = length ps1 == length ps2 && and (zipWith match ps1 ps2) where match :: Maybe Type -> Maybe Type -> Bool match p1 p2 = isNothing p1 || isNothing p2 || p1 == p2
275
partMatchParams2 :: [Maybe Type] -> [Maybe Type] -> Bool partMatchParams2 ps1 ps2 = length ps1 == length ps2 && and (zipWith match ps1 ps2) where match :: Maybe Type -> Maybe Type -> Bool match p1 p2 = isNothing p1 || isNothing p2 || p1 == p2
275
partMatchParams2 ps1 ps2 = length ps1 == length ps2 && and (zipWith match ps1 ps2) where match :: Maybe Type -> Maybe Type -> Bool match p1 p2 = isNothing p1 || isNothing p2 || p1 == p2
218
false
true
3
8
79
111
53
58
null
null
wavewave/qft
old/exe/qft4.hs
gpl-3.0
c :: UndirEdge 4 c = mkUndirEdge 2 3
36
c :: UndirEdge 4 c = mkUndirEdge 2 3
36
c = mkUndirEdge 2 3
19
false
true
0
6
8
26
10
16
null
null
shimazing/haskell-study-fall2016
HW01/HW01.hs
bsd-3-clause
doubleEveryOther (x:[]) = [x]
29
doubleEveryOther (x:[]) = [x]
29
doubleEveryOther (x:[]) = [x]
29
false
false
0
8
3
21
11
10
null
null
snoyberg/ghc
compiler/utils/Util.hs
bsd-3-clause
nubSort :: Ord a => [a] -> [a] nubSort = Set.toAscList . Set.fromList
69
nubSort :: Ord a => [a] -> [a] nubSort = Set.toAscList . Set.fromList
69
nubSort = Set.toAscList . Set.fromList
38
false
true
0
7
12
36
19
17
null
null
beni55/fay
src/Fay/Convert.hs
bsd-3-clause
makeSimple :: Data a => GenericParser -> HashMap Text Value -> Constr -> Either String a makeSimple rec obj cons = evalStateT (fromConstrM (do i:next <- get put next value <- lift (lookupField obj (Text.pack ("slot" ++ show i))) lift (rec value)) cons) [1..]
389
makeSimple :: Data a => GenericParser -> HashMap Text Value -> Constr -> Either String a makeSimple rec obj cons = evalStateT (fromConstrM (do i:next <- get put next value <- lift (lookupField obj (Text.pack ("slot" ++ show i))) lift (rec value)) cons) [1..]
389
makeSimple rec obj cons = evalStateT (fromConstrM (do i:next <- get put next value <- lift (lookupField obj (Text.pack ("slot" ++ show i))) lift (rec value)) cons) [1..]
300
false
true
0
19
174
131
61
70
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_HA_MODULE :: Int wxSTC_HA_MODULE = 7
42
wxSTC_HA_MODULE :: Int wxSTC_HA_MODULE = 7
42
wxSTC_HA_MODULE = 7
19
false
true
0
4
5
11
6
5
null
null
nvasilakis/pandoc
src/Text/Pandoc/Writers/Docx.hs
gpl-2.0
inlineToOpenXML opts (Code attrs str) = do let unhighlighted = intercalate [br] `fmap` (mapM formattedString $ lines str) formatOpenXML _fmtOpts = intercalate [br] . map (map toHlTok) toHlTok (toktype,tok) = mknode "w:r" [] [ mknode "w:rPr" [] [ rCustomStyle (show toktype) ] , mknode "w:t" [("xml:space","preserve")] tok ] withTextProp (rCustomStyle "VerbatimChar") $ if writerHighlight opts then case highlight formatOpenXML attrs str of Nothing -> unhighlighted Just h -> return h else unhighlighted
691
inlineToOpenXML opts (Code attrs str) = do let unhighlighted = intercalate [br] `fmap` (mapM formattedString $ lines str) formatOpenXML _fmtOpts = intercalate [br] . map (map toHlTok) toHlTok (toktype,tok) = mknode "w:r" [] [ mknode "w:rPr" [] [ rCustomStyle (show toktype) ] , mknode "w:t" [("xml:space","preserve")] tok ] withTextProp (rCustomStyle "VerbatimChar") $ if writerHighlight opts then case highlight formatOpenXML attrs str of Nothing -> unhighlighted Just h -> return h else unhighlighted
691
inlineToOpenXML opts (Code attrs str) = do let unhighlighted = intercalate [br] `fmap` (mapM formattedString $ lines str) formatOpenXML _fmtOpts = intercalate [br] . map (map toHlTok) toHlTok (toktype,tok) = mknode "w:r" [] [ mknode "w:rPr" [] [ rCustomStyle (show toktype) ] , mknode "w:t" [("xml:space","preserve")] tok ] withTextProp (rCustomStyle "VerbatimChar") $ if writerHighlight opts then case highlight formatOpenXML attrs str of Nothing -> unhighlighted Just h -> return h else unhighlighted
691
false
false
0
16
260
202
100
102
null
null
foreverbell/project-euler-solutions
src/492.hs
bsd-3-clause
n p = ret where n' = fromIntegral $ powMod (2 :: Integer) (toInteger (n - 1)) (toInteger (p * p - 1)) base = (0, p - 1, 1, 11) inv = (11, 1, p - 1, 0) mat = addMat (powMat base n' p) (powMat inv n' p) p ret = ((((first mat) - 5) `mod` p) * (inverse 6 p)) `mod` p first (a, _, _, _) = a
309
n p = ret where n' = fromIntegral $ powMod (2 :: Integer) (toInteger (n - 1)) (toInteger (p * p - 1)) base = (0, p - 1, 1, 11) inv = (11, 1, p - 1, 0) mat = addMat (powMat base n' p) (powMat inv n' p) p ret = ((((first mat) - 5) `mod` p) * (inverse 6 p)) `mod` p first (a, _, _, _) = a
309
n p = ret where n' = fromIntegral $ powMod (2 :: Integer) (toInteger (n - 1)) (toInteger (p * p - 1)) base = (0, p - 1, 1, 11) inv = (11, 1, p - 1, 0) mat = addMat (powMat base n' p) (powMat inv n' p) p ret = ((((first mat) - 5) `mod` p) * (inverse 6 p)) `mod` p first (a, _, _, _) = a
309
false
false
1
13
95
210
115
95
null
null
pbl64k/HackerRank-Contests
2014-07-18-FP/KunduAndBubbleWrap/kabw.accepted.hs
bsd-2-clause
g n = (n % 1) * (gamma + (toRational $ log (fromIntegral n)))
61
g n = (n % 1) * (gamma + (toRational $ log (fromIntegral n)))
61
g n = (n % 1) * (gamma + (toRational $ log (fromIntegral n)))
61
false
false
2
12
13
48
22
26
null
null
pmiddend/jumpie
lib/Jumpie/LevelGeneration.hs
gpl-3.0
pToXInterval :: Platform -> (Int,Int) pToXInterval p = (p ^. platLeft,p ^. platRight)
85
pToXInterval :: Platform -> (Int,Int) pToXInterval p = (p ^. platLeft,p ^. platRight)
85
pToXInterval p = (p ^. platLeft,p ^. platRight)
47
false
true
0
6
12
38
21
17
null
null
tibbe/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
externallyVisibleCLabel :: CLabel -> Bool -- not C "static" externallyVisibleCLabel (CaseLabel _ _) = False
115
externallyVisibleCLabel :: CLabel -> Bool externallyVisibleCLabel (CaseLabel _ _) = False
97
externallyVisibleCLabel (CaseLabel _ _) = False
55
true
true
0
7
22
27
14
13
null
null
tgdavies/codeworld
codeworld-base/src/Internal/Color.hs
apache-2.0
toHSL :: Color -> P.Maybe (Number, Number, Number) toHSL c@(RGBA (_, _, _, 1)) = P.Just (hue c, saturation c, luminosity c)
123
toHSL :: Color -> P.Maybe (Number, Number, Number) toHSL c@(RGBA (_, _, _, 1)) = P.Just (hue c, saturation c, luminosity c)
123
toHSL c@(RGBA (_, _, _, 1)) = P.Just (hue c, saturation c, luminosity c)
72
false
true
3
8
21
79
42
37
null
null
beni55/egison
hs-src/Language/Egison/Primitives.hs
mit
flushPort :: PrimitiveFunc flushPort = oneArg $ \val -> do port <- fromEgison val return $ makeIO' $ liftIO $ hFlush port
125
flushPort :: PrimitiveFunc flushPort = oneArg $ \val -> do port <- fromEgison val return $ makeIO' $ liftIO $ hFlush port
125
flushPort = oneArg $ \val -> do port <- fromEgison val return $ makeIO' $ liftIO $ hFlush port
98
false
true
0
11
25
48
23
25
null
null
fmapfmapfmap/amazonka
amazonka-swf/gen/Network/AWS/SWF/Types/Product.hs
mpl-2.0
-- | The external workflow execution for which the cancellation was -- requested. wecreaExternalWorkflowExecution :: Lens' WorkflowExecutionCancelRequestedEventAttributes (Maybe WorkflowExecution) wecreaExternalWorkflowExecution = lens _wecreaExternalWorkflowExecution (\ s a -> s{_wecreaExternalWorkflowExecution = a})
319
wecreaExternalWorkflowExecution :: Lens' WorkflowExecutionCancelRequestedEventAttributes (Maybe WorkflowExecution) wecreaExternalWorkflowExecution = lens _wecreaExternalWorkflowExecution (\ s a -> s{_wecreaExternalWorkflowExecution = a})
237
wecreaExternalWorkflowExecution = lens _wecreaExternalWorkflowExecution (\ s a -> s{_wecreaExternalWorkflowExecution = a})
122
true
true
0
9
29
47
26
21
null
null
nerggnet/blog
_archive/Main-20170126.hs
bsd-3-clause
getBlogPosts :: SpockAction DB.Pipe session state () getBlogPosts = do allBlogPosts <- runQuery fetchAllBlogPosts lucid $ pageTemplate $ do h1_ "Blog" renderBlogPosts allBlogPosts link "/add-blog-post" "Add Your Blog Post!"
239
getBlogPosts :: SpockAction DB.Pipe session state () getBlogPosts = do allBlogPosts <- runQuery fetchAllBlogPosts lucid $ pageTemplate $ do h1_ "Blog" renderBlogPosts allBlogPosts link "/add-blog-post" "Add Your Blog Post!"
239
getBlogPosts = do allBlogPosts <- runQuery fetchAllBlogPosts lucid $ pageTemplate $ do h1_ "Blog" renderBlogPosts allBlogPosts link "/add-blog-post" "Add Your Blog Post!"
186
false
true
0
10
44
65
28
37
null
null
rodrigo-machado/verigraph
tests/Rewriting/DPO/TypedGraphRuleSpec.hs
gpl-3.0
fileName2 = "tests/grammars/secondOrderMatchTest.ggx"
53
fileName2 = "tests/grammars/secondOrderMatchTest.ggx"
53
fileName2 = "tests/grammars/secondOrderMatchTest.ggx"
53
false
false
0
4
2
6
3
3
null
null
dkensinger/haskell
haskell-primes/ReinkePrimes.hs
gpl-3.0
-- like splitAt, followed by (++), where only suffix is operated on -- infinite lists, non-negative offset applyAt 0 f xs = f xs
132
applyAt 0 f xs = f xs
25
applyAt 0 f xs = f xs
25
true
false
1
5
27
24
9
15
null
null
arybczak/happstack-server
src/Happstack/Server/Internal/MessageWrap.hs
bsd-3-clause
-- | create a 'BodyPolicy' for use with decodeBody defaultBodyPolicy :: FilePath -- ^ temporary directory for file uploads -> Int64 -- ^ maximum bytes for files uploaded in this 'Request' -> Int64 -- ^ maximum bytes for all non-file values in the 'Request' body -> Int64 -- ^ maximum bytes of overhead for headers in @multipart/form-data@ -> BodyPolicy defaultBodyPolicy tmpDir md mr mh = BodyPolicy { inputWorker = defaultInputIter defaultFileSaver tmpDir 0 0 0 , maxDisk = md , maxRAM = mr , maxHeader = mh }
651
defaultBodyPolicy :: FilePath -- ^ temporary directory for file uploads -> Int64 -- ^ maximum bytes for files uploaded in this 'Request' -> Int64 -- ^ maximum bytes for all non-file values in the 'Request' body -> Int64 -- ^ maximum bytes of overhead for headers in @multipart/form-data@ -> BodyPolicy defaultBodyPolicy tmpDir md mr mh = BodyPolicy { inputWorker = defaultInputIter defaultFileSaver tmpDir 0 0 0 , maxDisk = md , maxRAM = mr , maxHeader = mh }
600
defaultBodyPolicy tmpDir md mr mh = BodyPolicy { inputWorker = defaultInputIter defaultFileSaver tmpDir 0 0 0 , maxDisk = md , maxRAM = mr , maxHeader = mh }
226
true
true
0
10
228
87
47
40
null
null
beni55/cryptol
src/Cryptol/Eval/Value.hs
bsd-3-clause
finTValue :: TValue -> Integer finTValue tval = case numTValue tval of Nat x -> x Inf -> panic "Cryptol.Eval.Value.finTValue" [ "Unexpected `inf`" ] -- Values ---------------------------------------------------------------------- -- | width, value -- Invariant: The value must be within the range 0 .. 2^width-1
326
finTValue :: TValue -> Integer finTValue tval = case numTValue tval of Nat x -> x Inf -> panic "Cryptol.Eval.Value.finTValue" [ "Unexpected `inf`" ] -- Values ---------------------------------------------------------------------- -- | width, value -- Invariant: The value must be within the range 0 .. 2^width-1
326
finTValue tval = case numTValue tval of Nat x -> x Inf -> panic "Cryptol.Eval.Value.finTValue" [ "Unexpected `inf`" ] -- Values ---------------------------------------------------------------------- -- | width, value -- Invariant: The value must be within the range 0 .. 2^width-1
295
false
true
3
6
57
50
26
24
null
null
keithodulaigh/Hets
CommonLogic/Lexer_CLIF.hs
gpl-2.0
notKey :: CharParser st Id.Token notKey = pToken (string notS) <?> "negation"
77
notKey :: CharParser st Id.Token notKey = pToken (string notS) <?> "negation"
77
notKey = pToken (string notS) <?> "negation"
44
false
true
0
8
11
31
15
16
null
null
wxwxwwxxx/ghc
compiler/types/TypeRep.hs
bsd-3-clause
isLiftedTypeKind _ = False
41
isLiftedTypeKind _ = False
41
isLiftedTypeKind _ = False
41
false
false
0
5
18
9
4
5
null
null
urbanslug/ghc
compiler/typecheck/TcTypeNats.hs
bsd-3-clause
axExp1L = mkAxiom1 "Exp1L" $ \t -> (num 1 .^. t) === num 1
65
axExp1L = mkAxiom1 "Exp1L" $ \t -> (num 1 .^. t) === num 1
65
axExp1L = mkAxiom1 "Exp1L" $ \t -> (num 1 .^. t) === num 1
65
false
false
0
10
20
35
17
18
null
null
tsmarques/Yascc
src/Aux.hs
gpl-2.0
print_parsed_file :: [String] -> String -> IO() print_parsed_file [] _ = putStr ""
83
print_parsed_file :: [String] -> String -> IO() print_parsed_file [] _ = putStr ""
83
print_parsed_file [] _ = putStr ""
34
false
true
0
8
13
37
18
19
null
null
jrockway/c2hs
src/C2HS/CHS.hs
gpl-2.0
parsePath :: [CHSToken] -> CST s (CHSAPath, [CHSToken]) parsePath (CHSTokLParen _pos: toks) = do (inner_path, toks_rest) <- parsePath toks toks_rest' <- case toks_rest of (CHSTokRParen _pos' : ts) -> return ts _ -> syntaxError toks_rest (pathWithHole, toks') <- parsePath' toks_rest' return (pathWithHole inner_path, toks')
381
parsePath :: [CHSToken] -> CST s (CHSAPath, [CHSToken]) parsePath (CHSTokLParen _pos: toks) = do (inner_path, toks_rest) <- parsePath toks toks_rest' <- case toks_rest of (CHSTokRParen _pos' : ts) -> return ts _ -> syntaxError toks_rest (pathWithHole, toks') <- parsePath' toks_rest' return (pathWithHole inner_path, toks')
381
parsePath (CHSTokLParen _pos: toks) = do (inner_path, toks_rest) <- parsePath toks toks_rest' <- case toks_rest of (CHSTokRParen _pos' : ts) -> return ts _ -> syntaxError toks_rest (pathWithHole, toks') <- parsePath' toks_rest' return (pathWithHole inner_path, toks')
325
false
true
0
14
101
136
66
70
null
null
nomeata/codeworld
codeworld-base/src/Internal/Prelude.hs
apache-2.0
empty _ = P.False
17
empty _ = P.False
17
empty _ = P.False
17
false
false
0
5
3
12
5
7
null
null
ak3n/lambda-zoo
src/SystemF.hs
bsd-3-clause
succ :: Tm0 Lang -> Tm0 Lang succ t = SUCC $$ t :& RNil
55
succ :: Tm0 Lang -> Tm0 Lang succ t = SUCC $$ t :& RNil
55
succ t = SUCC $$ t :& RNil
26
false
true
4
7
14
39
16
23
null
null
fmapfmapfmap/amazonka
amazonka-ec2/gen/Network/AWS/EC2/DescribeInstanceAttribute.hs
mpl-2.0
-- | Indicates whether source\/destination checking is enabled. A value of -- 'true' means checking is enabled, and 'false' means checking is -- disabled. This value must be 'false' for a NAT instance to perform NAT. drsSourceDestCheck :: Lens' DescribeInstanceAttributeResponse (Maybe AttributeBooleanValue) drsSourceDestCheck = lens _drsSourceDestCheck (\ s a -> s{_drsSourceDestCheck = a})
392
drsSourceDestCheck :: Lens' DescribeInstanceAttributeResponse (Maybe AttributeBooleanValue) drsSourceDestCheck = lens _drsSourceDestCheck (\ s a -> s{_drsSourceDestCheck = a})
175
drsSourceDestCheck = lens _drsSourceDestCheck (\ s a -> s{_drsSourceDestCheck = a})
83
true
true
0
9
52
48
27
21
null
null
phunehehe/foomail
src/Helper.hs
mpl-2.0
parseContact :: Maybe Text -> Maybe Contact parseContact = maybe Nothing $ readMaybe . T.unpack
95
parseContact :: Maybe Text -> Maybe Contact parseContact = maybe Nothing $ readMaybe . T.unpack
95
parseContact = maybe Nothing $ readMaybe . T.unpack
51
false
true
0
7
14
40
17
23
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/basicTypes/OccName.hs
bsd-3-clause
pprNonVarNameSpace :: NameSpace -> SDoc pprNonVarNameSpace VarName = empty
74
pprNonVarNameSpace :: NameSpace -> SDoc pprNonVarNameSpace VarName = empty
74
pprNonVarNameSpace VarName = empty
34
false
true
0
5
8
22
10
12
null
null
gaborhermann/marvin
test-suite/Marvin/API/Table/ColumnSpec.hs
apache-2.0
gcol3 = GC { values = UVec.fromList [2, 2], exposure = odd, columnNameGen = Just "colName two"}
95
gcol3 = GC { values = UVec.fromList [2, 2], exposure = odd, columnNameGen = Just "colName two"}
95
gcol3 = GC { values = UVec.fromList [2, 2], exposure = odd, columnNameGen = Just "colName two"}
95
false
false
0
8
16
40
23
17
null
null
MaxGabriel/yesod
yesod-core/Yesod/Core/Handler.hs
mit
-- | Use a @Source@ for the response body. -- -- Note that, for ease of use, the underlying monad is a @HandlerT@. This -- implies that you can run any @HandlerT@ action. However, since a streaming -- response occurs after the response headers have already been sent, some -- actions make no sense here. For example: short-circuit responses, setting -- headers, changing status codes, etc. -- -- Since 1.2.0 respondSource :: ContentType -> Source (HandlerT site IO) (Flush Builder) -> HandlerT site IO TypedContent respondSource ctype src = HandlerT $ \hd -> -- Note that this implementation relies on the fact that the ResourceT -- environment provided by the server is the same one used in HandlerT. -- This is a safe assumption assuming the HandlerT is run correctly. return $ TypedContent ctype $ ContentSource $ transPipe (lift . flip unHandlerT hd) src
913
respondSource :: ContentType -> Source (HandlerT site IO) (Flush Builder) -> HandlerT site IO TypedContent respondSource ctype src = HandlerT $ \hd -> -- Note that this implementation relies on the fact that the ResourceT -- environment provided by the server is the same one used in HandlerT. -- This is a safe assumption assuming the HandlerT is run correctly. return $ TypedContent ctype $ ContentSource $ transPipe (lift . flip unHandlerT hd) src
505
respondSource ctype src = HandlerT $ \hd -> -- Note that this implementation relies on the fact that the ResourceT -- environment provided by the server is the same one used in HandlerT. -- This is a safe assumption assuming the HandlerT is run correctly. return $ TypedContent ctype $ ContentSource $ transPipe (lift . flip unHandlerT hd) src
370
true
true
0
11
198
103
56
47
null
null
fpco/schoolofhaskell.com
src/Handler/ConfirmEmail.hs
mit
getConfirmEmailR :: ConfirmEmailId -> Text -> Handler () getConfirmEmailR ceid key = do uid <- requireAuthId now <- liftIO getCurrentTime $runDB $ do ConfirmEmail {..} <- get404 ceid unless (confirmEmailVerkey == key) $ lift notFound unless (confirmEmailUser == uid) $ lift notFound delete ceid if (now > confirmEmailExpires) then setMessage "This confirmation code has expired, please try again" else do miid <- insertUnique Ident { identUser = uid , identIdent = unLowerCaseText confirmEmailEmail , identLident = confirmEmailEmail , identEmail = True } case miid of Nothing -> setMessage "That email address is already in use" Just _ -> setMessage "Email address confirmed" redirect ProfileR
945
getConfirmEmailR :: ConfirmEmailId -> Text -> Handler () getConfirmEmailR ceid key = do uid <- requireAuthId now <- liftIO getCurrentTime $runDB $ do ConfirmEmail {..} <- get404 ceid unless (confirmEmailVerkey == key) $ lift notFound unless (confirmEmailUser == uid) $ lift notFound delete ceid if (now > confirmEmailExpires) then setMessage "This confirmation code has expired, please try again" else do miid <- insertUnique Ident { identUser = uid , identIdent = unLowerCaseText confirmEmailEmail , identLident = confirmEmailEmail , identEmail = True } case miid of Nothing -> setMessage "That email address is already in use" Just _ -> setMessage "Email address confirmed" redirect ProfileR
945
getConfirmEmailR ceid key = do uid <- requireAuthId now <- liftIO getCurrentTime $runDB $ do ConfirmEmail {..} <- get404 ceid unless (confirmEmailVerkey == key) $ lift notFound unless (confirmEmailUser == uid) $ lift notFound delete ceid if (now > confirmEmailExpires) then setMessage "This confirmation code has expired, please try again" else do miid <- insertUnique Ident { identUser = uid , identIdent = unLowerCaseText confirmEmailEmail , identLident = confirmEmailEmail , identEmail = True } case miid of Nothing -> setMessage "That email address is already in use" Just _ -> setMessage "Email address confirmed" redirect ProfileR
888
false
true
0
17
355
210
98
112
null
null
TomHammersley/HaskellRenderer
app/src/Tests/RandomUVTest/RandomUVTest.hs
gpl-2.0
drawScene :: IO () drawScene = do -- clear the screen and the depth bufer glClear $ fromIntegral $ gl_COLOR_BUFFER_BIT .|. gl_DEPTH_BUFFER_BIT glLoadIdentity -- reset view glTranslatef (-0.5) (-0.5) (-1.5) -- Render my test data glBegin gl_LINES _ <- mapM renderCross randomUVList glEnd glFlush
344
drawScene :: IO () drawScene = do -- clear the screen and the depth bufer glClear $ fromIntegral $ gl_COLOR_BUFFER_BIT .|. gl_DEPTH_BUFFER_BIT glLoadIdentity -- reset view glTranslatef (-0.5) (-0.5) (-1.5) -- Render my test data glBegin gl_LINES _ <- mapM renderCross randomUVList glEnd glFlush
344
drawScene = do -- clear the screen and the depth bufer glClear $ fromIntegral $ gl_COLOR_BUFFER_BIT .|. gl_DEPTH_BUFFER_BIT glLoadIdentity -- reset view glTranslatef (-0.5) (-0.5) (-1.5) -- Render my test data glBegin gl_LINES _ <- mapM renderCross randomUVList glEnd glFlush
325
false
true
0
9
93
92
42
50
null
null
vadimvinnik/taskman-hs
src/Control/Concurrent/TaskMan.hs
mit
newTaskMan :: IO TaskMan newTaskMan = fmap TaskMan (newMVar $ TaskManState 0 empty empty)
89
newTaskMan :: IO TaskMan newTaskMan = fmap TaskMan (newMVar $ TaskManState 0 empty empty)
89
newTaskMan = fmap TaskMan (newMVar $ TaskManState 0 empty empty)
64
false
true
0
8
13
33
16
17
null
null
vrom911/Compiler
src/Compiler/Rum/Compiler/Emitter.hs
mit
codeGenStmt Rum.IfElse{..} = do ifTrueBlock <- addBlock "if.then" elseBlock <- addBlock "if.else" ifExitBlock <- addBlock "if.exit" -- %entry cond <- cgenExpr ifCond test <- isTrue cond cbr test ifTrueBlock elseBlock -- Branch based on the condition -- if.then setBlock ifTrueBlock codeGenProg trueAct -- Generate code for the true branch br ifExitBlock -- Branch to the merge block -- if.else setBlock elseBlock codeGenProg falseAct -- Generate code for the false branch br ifExitBlock -- Branch to the merge block -- if.exit setBlock ifExitBlock return ()
669
codeGenStmt Rum.IfElse{..} = do ifTrueBlock <- addBlock "if.then" elseBlock <- addBlock "if.else" ifExitBlock <- addBlock "if.exit" -- %entry cond <- cgenExpr ifCond test <- isTrue cond cbr test ifTrueBlock elseBlock -- Branch based on the condition -- if.then setBlock ifTrueBlock codeGenProg trueAct -- Generate code for the true branch br ifExitBlock -- Branch to the merge block -- if.else setBlock elseBlock codeGenProg falseAct -- Generate code for the false branch br ifExitBlock -- Branch to the merge block -- if.exit setBlock ifExitBlock return ()
669
codeGenStmt Rum.IfElse{..} = do ifTrueBlock <- addBlock "if.then" elseBlock <- addBlock "if.else" ifExitBlock <- addBlock "if.exit" -- %entry cond <- cgenExpr ifCond test <- isTrue cond cbr test ifTrueBlock elseBlock -- Branch based on the condition -- if.then setBlock ifTrueBlock codeGenProg trueAct -- Generate code for the true branch br ifExitBlock -- Branch to the merge block -- if.else setBlock elseBlock codeGenProg falseAct -- Generate code for the false branch br ifExitBlock -- Branch to the merge block -- if.exit setBlock ifExitBlock return ()
669
false
false
0
8
195
136
58
78
null
null
romanb/amazonka
amazonka-ses/gen/Network/AWS/SES/Types.hs
mpl-2.0
-- | Number of emails that have been enqueued for sending. sdpDeliveryAttempts :: Lens' SendDataPoint (Maybe Integer) sdpDeliveryAttempts = lens _sdpDeliveryAttempts (\s a -> s { _sdpDeliveryAttempts = a })
210
sdpDeliveryAttempts :: Lens' SendDataPoint (Maybe Integer) sdpDeliveryAttempts = lens _sdpDeliveryAttempts (\s a -> s { _sdpDeliveryAttempts = a })
151
sdpDeliveryAttempts = lens _sdpDeliveryAttempts (\s a -> s { _sdpDeliveryAttempts = a })
92
true
true
1
9
33
50
25
25
null
null
gnn/Hets
TPTP/Pretty.hs
gpl-2.0
printFOF_or_formula :: FOF_or_formula -> Doc printFOF_or_formula = sepBy vline . map pretty
91
printFOF_or_formula :: FOF_or_formula -> Doc printFOF_or_formula = sepBy vline . map pretty
91
printFOF_or_formula = sepBy vline . map pretty
46
false
true
0
6
11
25
12
13
null
null
jkozlowski/kdb-haskell
src/Database/Kdb/Internal/IPC.hs
mit
cast :: (MArray (STUArray s) a (ST s), MArray (STUArray s) b (ST s)) => a -> ST s b cast x = newArray (0 :: Int, 0) x >>= castSTUArray >>= flip readArray 0
164
cast :: (MArray (STUArray s) a (ST s), MArray (STUArray s) b (ST s)) => a -> ST s b cast x = newArray (0 :: Int, 0) x >>= castSTUArray >>= flip readArray 0
164
cast x = newArray (0 :: Int, 0) x >>= castSTUArray >>= flip readArray 0
71
false
true
0
9
43
101
50
51
null
null
oldmanmike/vulkan
generate/src/Write/BreakCycle.hs
bsd-3-clause
writeHsBootFile :: FilePath -- ^ The source root -> SpecGraph -- ^ The specification graph -> NameLocations -- ^ The map of names to modules -> ModuleName -- ^ The module name we're writing -> [String] -- ^ The symbols to export -> IO () writeHsBootFile root graph nameLocations moduleName exports = do createModuleDirectory root moduleName let moduleString = writeModule graph nameLocations moduleName exports writeFile (moduleNameToFile root moduleName) moduleString
572
writeHsBootFile :: FilePath -- ^ The source root -> SpecGraph -- ^ The specification graph -> NameLocations -- ^ The map of names to modules -> ModuleName -- ^ The module name we're writing -> [String] -- ^ The symbols to export -> IO () writeHsBootFile root graph nameLocations moduleName exports = do createModuleDirectory root moduleName let moduleString = writeModule graph nameLocations moduleName exports writeFile (moduleNameToFile root moduleName) moduleString
572
writeHsBootFile root graph nameLocations moduleName exports = do createModuleDirectory root moduleName let moduleString = writeModule graph nameLocations moduleName exports writeFile (moduleNameToFile root moduleName) moduleString
237
false
true
0
12
172
102
49
53
null
null
romanb/amazonka
amazonka-directconnect/gen/Network/AWS/DirectConnect/AllocatePrivateVirtualInterface.hs
mpl-2.0
apvirLocation :: Lens' AllocatePrivateVirtualInterfaceResponse (Maybe Text) apvirLocation = lens _apvirLocation (\s a -> s { _apvirLocation = a })
146
apvirLocation :: Lens' AllocatePrivateVirtualInterfaceResponse (Maybe Text) apvirLocation = lens _apvirLocation (\s a -> s { _apvirLocation = a })
146
apvirLocation = lens _apvirLocation (\s a -> s { _apvirLocation = a })
70
false
true
1
9
18
48
24
24
null
null
kim/amazonka
amazonka-cloudformation/gen/Network/AWS/CloudFormation/UpdateStack.hs
mpl-2.0
-- | A list of capabilities that you must specify before AWS CloudFormation can -- create or update certain stacks. Some stack templates might include resources -- that can affect permissions in your AWS account. For those stacks, you must -- explicitly acknowledge their capabilities by specifying this parameter. -- Currently, the only valid value is 'CAPABILITY_IAM', which is required for the -- following resources: <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-stack.html AWS::CloudFormation::Stack>, <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-accesskey.html AWS::IAM::AccessKey>, <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-group.html AWS::IAM::Group>, <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-instanceprofile.html AWS::IAM::InstanceProfile>, <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-policy.html AWS::IAM::Policy>, <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-iam-role.html AWS::IAM::Role>, <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-user.html AWS::IAM::User>, and <http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-iam-addusertogroup.html AWS::IAM::UserToGroupAddition>. If your -- stack template contains these resources, we recommend that you review any -- permissions associated with them. If you don't specify this parameter, this -- action returns an InsufficientCapabilities error. usCapabilities :: Lens' UpdateStack [Capability] usCapabilities = lens _usCapabilities (\s a -> s { _usCapabilities = a }) . _List
1,718
usCapabilities :: Lens' UpdateStack [Capability] usCapabilities = lens _usCapabilities (\s a -> s { _usCapabilities = a }) . _List
130
usCapabilities = lens _usCapabilities (\s a -> s { _usCapabilities = a }) . _List
81
true
true
1
10
139
59
34
25
null
null
olsner/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
pprUInfixT t = ppr t
34
pprUInfixT t = ppr t
34
pprUInfixT t = ppr t
34
false
false
0
5
18
12
5
7
null
null
nomeata/ghc
compiler/utils/Platform.hs
bsd-3-clause
sElfTarget OSKFreeBSD = True
30
osElfTarget OSKFreeBSD = True
30
osElfTarget OSKFreeBSD = True
30
false
false
0
5
5
9
4
5
null
null
xarts19/GoHaskell
Board.hs
mit
replaceElem :: Board -> Cell -> BoardCoord -> Board replaceElem board new_elem (i, j) = replace' board (replace' (board !! i) new_elem j) i where replace' line cell k = let (xs, _:ys) = splitAt k line in xs ++ (cell : ys)
225
replaceElem :: Board -> Cell -> BoardCoord -> Board replaceElem board new_elem (i, j) = replace' board (replace' (board !! i) new_elem j) i where replace' line cell k = let (xs, _:ys) = splitAt k line in xs ++ (cell : ys)
225
replaceElem board new_elem (i, j) = replace' board (replace' (board !! i) new_elem j) i where replace' line cell k = let (xs, _:ys) = splitAt k line in xs ++ (cell : ys)
173
false
true
0
12
46
112
57
55
null
null
frelindb/agsyHOL
SearchControl.hs
mit
prioIntro = 6
13
prioIntro = 6
13
prioIntro = 6
13
false
false
1
5
2
10
3
7
null
null
brendanhay/gogol
gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Files/Get.hs
mpl-2.0
-- | Upload protocol for media (e.g. \"raw\", \"multipart\"). fgUploadProtocol :: Lens' FilesGet (Maybe Text) fgUploadProtocol = lens _fgUploadProtocol (\ s a -> s{_fgUploadProtocol = a})
195
fgUploadProtocol :: Lens' FilesGet (Maybe Text) fgUploadProtocol = lens _fgUploadProtocol (\ s a -> s{_fgUploadProtocol = a})
133
fgUploadProtocol = lens _fgUploadProtocol (\ s a -> s{_fgUploadProtocol = a})
85
true
true
0
9
33
48
25
23
null
null
fpco/fay
examples/nqueens.hs
bsd-3-clause
oln :: Int -> Int nsoln nq = listLength (gen nq) 0 where safe :: Int -> Int -> [Int] -> Bool safe x d [] = True safe x d ( q : l) = (x /= q) && (x /= (q+d)) && (x /= (q-d)) && safe x (d+1) l gen :: Int -> [[Int]] gen 0 = [] : [] gen n = concat $ map (\bs -> map (\q -> q : bs) $ listFilter (\q -> safe q 1 bs) ([1..nq])) (gen (n-1))
369
nsoln :: Int -> Int nsoln nq = listLength (gen nq) 0 where safe :: Int -> Int -> [Int] -> Bool safe x d [] = True safe x d ( q : l) = (x /= q) && (x /= (q+d)) && (x /= (q-d)) && safe x (d+1) l gen :: Int -> [[Int]] gen 0 = [] : [] gen n = concat $ map (\bs -> map (\q -> q : bs) $ listFilter (\q -> safe q 1 bs) ([1..nq])) (gen (n-1))
369
nsoln nq = listLength (gen nq) 0 where safe :: Int -> Int -> [Int] -> Bool safe x d [] = True safe x d ( q : l) = (x /= q) && (x /= (q+d)) && (x /= (q-d)) && safe x (d+1) l gen :: Int -> [[Int]] gen 0 = [] : [] gen n = concat $ map (\bs -> map (\q -> q : bs) $ listFilter (\q -> safe q 1 bs) ([1..nq])) (gen (n-1))
349
false
true
0
13
124
265
139
126
null
null
wavewave/evchain
lib/HEP/Automation/EventChain/Driver.hs
gpl-3.0
genMultiProcess :: (Model model) => model -> ScriptSetup -> MultiProc -> ModelParam model -> WebDAVConfig -> (String, NumOfEv, SetNum) -> IO () genMultiProcess mdl ssetup mp param wdavcfg (pname,nev,sn) = do case M.lookup pname (mpMultiProcessParts mp) of Nothing -> return () Just sproc -> do let pdir = mpProcDir mp genPhase1 mdl ssetup pdir sproc param (nev,sn) genPhase2 mdl ssetup pdir sproc param (nev,sn) genPhase3 mdl ssetup pdir sproc param (nev,sn) wdavcfg return ()
571
genMultiProcess :: (Model model) => model -> ScriptSetup -> MultiProc -> ModelParam model -> WebDAVConfig -> (String, NumOfEv, SetNum) -> IO () genMultiProcess mdl ssetup mp param wdavcfg (pname,nev,sn) = do case M.lookup pname (mpMultiProcessParts mp) of Nothing -> return () Just sproc -> do let pdir = mpProcDir mp genPhase1 mdl ssetup pdir sproc param (nev,sn) genPhase2 mdl ssetup pdir sproc param (nev,sn) genPhase3 mdl ssetup pdir sproc param (nev,sn) wdavcfg return ()
571
genMultiProcess mdl ssetup mp param wdavcfg (pname,nev,sn) = do case M.lookup pname (mpMultiProcessParts mp) of Nothing -> return () Just sproc -> do let pdir = mpProcDir mp genPhase1 mdl ssetup pdir sproc param (nev,sn) genPhase2 mdl ssetup pdir sproc param (nev,sn) genPhase3 mdl ssetup pdir sproc param (nev,sn) wdavcfg return ()
375
false
true
0
15
168
211
104
107
null
null
fpco/wai-middleware-crowd
src/Network/Wai/Middleware/Crowd.hs
mit
saveCrowdState :: Key -> Int -> CrowdState -> IO Header saveCrowdState key age cs = saveCookieValue key csKey age cs
116
saveCrowdState :: Key -> Int -> CrowdState -> IO Header saveCrowdState key age cs = saveCookieValue key csKey age cs
116
saveCrowdState key age cs = saveCookieValue key csKey age cs
60
false
true
0
8
19
42
20
22
null
null
hiratara/doukaku-past-questions-advent-2013
src/Doukaku/LAndLs.hs
bsd-3-clause
parse :: String -> (L, L) parse (x1:y1:'-':x2:y2:'-':x3:y3:',':x1':y1':'-':x2':y2':'-':x3':y3':_) = (((digitToInt x1, digitToInt y1), (digitToInt x2, digitToInt y2), (digitToInt x3, digitToInt y3)), ((digitToInt x1', digitToInt y1'), (digitToInt x2', digitToInt y2'), (digitToInt x3', digitToInt y3')))
315
parse :: String -> (L, L) parse (x1:y1:'-':x2:y2:'-':x3:y3:',':x1':y1':'-':x2':y2':'-':x3':y3':_) = (((digitToInt x1, digitToInt y1), (digitToInt x2, digitToInt y2), (digitToInt x3, digitToInt y3)), ((digitToInt x1', digitToInt y1'), (digitToInt x2', digitToInt y2'), (digitToInt x3', digitToInt y3')))
315
parse (x1:y1:'-':x2:y2:'-':x3:y3:',':x1':y1':'-':x2':y2':'-':x3':y3':_) = (((digitToInt x1, digitToInt y1), (digitToInt x2, digitToInt y2), (digitToInt x3, digitToInt y3)), ((digitToInt x1', digitToInt y1'), (digitToInt x2', digitToInt y2'), (digitToInt x3', digitToInt y3')))
289
false
true
0
25
45
197
102
95
null
null
Pnom/haskell-ast-pretty
Test/examples/RealTagSoup.hs
mit
tagWarn :: ParseOptions -> String -> [Tag] tagWarn opts x = [TagWarning x | optTagWarning opts]
95
tagWarn :: ParseOptions -> String -> [Tag] tagWarn opts x = [TagWarning x | optTagWarning opts]
95
tagWarn opts x = [TagWarning x | optTagWarning opts]
52
false
true
0
9
15
46
21
25
null
null
ublubu/shapes
shapes-math/test/Shapes/Linear/TemplateSpec.hs
mit
toLV2 :: V2 -> L.V2 Double toLV2 = (\[x, y] -> L.V2 x y) . toListV2
67
toLV2 :: V2 -> L.V2 Double toLV2 = (\[x, y] -> L.V2 x y) . toListV2
67
toLV2 = (\[x, y] -> L.V2 x y) . toListV2
40
false
true
0
9
15
45
24
21
null
null
eryx67/vk-api-example
src/VK/App/Widgets/AudioPlayer/Views.hs
bsd-3-clause
timeLabel_ :: State -> ReactElementM eventHandler () timeLabel_ state = view timeLabelView state mempty
106
timeLabel_ :: State -> ReactElementM eventHandler () timeLabel_ state = view timeLabelView state mempty
106
timeLabel_ state = view timeLabelView state mempty
52
false
true
0
7
16
32
15
17
null
null
phischu/fragnix
builtins/base/Text.Show.hs
bsd-3-clause
-- | Show a list (using square brackets and commas), given a function -- for showing elements. showListWith :: (a -> ShowS) -> [a] -> ShowS showListWith = showList__
165
showListWith :: (a -> ShowS) -> [a] -> ShowS showListWith = showList__
70
showListWith = showList__
25
true
true
0
8
28
38
19
19
null
null
llelf/float-binstring
tests/Test.hs
bsd-3-clause
predefined = do c <- readFile "tests/tests.pairs.10k" let vs = map parse $ lines c forM_ vs $ \(x,s) -> do liftA2 eq (readFloat s) (Just x) `shouldBe` Just True showFloat x `shouldBe` s where parse s = (readF a, pack b) :: (Double,Text) where [a,b] = words s readF "nan" = 0/0 readF s = read s
387
predefined = do c <- readFile "tests/tests.pairs.10k" let vs = map parse $ lines c forM_ vs $ \(x,s) -> do liftA2 eq (readFloat s) (Just x) `shouldBe` Just True showFloat x `shouldBe` s where parse s = (readF a, pack b) :: (Double,Text) where [a,b] = words s readF "nan" = 0/0 readF s = read s
387
predefined = do c <- readFile "tests/tests.pairs.10k" let vs = map parse $ lines c forM_ vs $ \(x,s) -> do liftA2 eq (readFloat s) (Just x) `shouldBe` Just True showFloat x `shouldBe` s where parse s = (readF a, pack b) :: (Double,Text) where [a,b] = words s readF "nan" = 0/0 readF s = read s
387
false
false
2
14
151
152
77
75
null
null
zalora/myrapi
src/Myracloud/DNS.hs
mit
createRecord :: Credentials -> DnsRecordCreate -> Site -> BaseUrl -> EitherT ServantError IO (Result ResultVO) createRecord (access, secret) r site@(Site s') b = do iso <- currentTimestamp let contentType = ContentType "application/json" sigData = MyraSignature { myra_rqBody = Just . BL.toStrict $ A.encode r , myra_method = getMethod dnsCreateApi , myra_uri = "/en/rapi/dnsRecords/" <> B8.pack (unpack s') , myra_contentType = _unContentType contentType , myra_date = iso } sig = myraSignature access secret sigData client dnsCreateApi b site (Just $ Date iso) (Just $ Authorization sig) (Just contentType) r
706
createRecord :: Credentials -> DnsRecordCreate -> Site -> BaseUrl -> EitherT ServantError IO (Result ResultVO) createRecord (access, secret) r site@(Site s') b = do iso <- currentTimestamp let contentType = ContentType "application/json" sigData = MyraSignature { myra_rqBody = Just . BL.toStrict $ A.encode r , myra_method = getMethod dnsCreateApi , myra_uri = "/en/rapi/dnsRecords/" <> B8.pack (unpack s') , myra_contentType = _unContentType contentType , myra_date = iso } sig = myraSignature access secret sigData client dnsCreateApi b site (Just $ Date iso) (Just $ Authorization sig) (Just contentType) r
706
createRecord (access, secret) r site@(Site s') b = do iso <- currentTimestamp let contentType = ContentType "application/json" sigData = MyraSignature { myra_rqBody = Just . BL.toStrict $ A.encode r , myra_method = getMethod dnsCreateApi , myra_uri = "/en/rapi/dnsRecords/" <> B8.pack (unpack s') , myra_contentType = _unContentType contentType , myra_date = iso } sig = myraSignature access secret sigData client dnsCreateApi b site (Just $ Date iso) (Just $ Authorization sig) (Just contentType) r
582
false
true
0
15
183
212
108
104
null
null
nishiuramakoto/erasm-plusplus
src/haskell/EncodedInstructionDefinition.hs
gpl-3.0
prefix_SS = makePrefix "SS" 0x36
32
prefix_SS = makePrefix "SS" 0x36
32
prefix_SS = makePrefix "SS" 0x36
32
false
false
0
5
4
11
5
6
null
null
pparkkin/eta
libraries/base/GHC/IO/Handle/Internals.hs
bsd-3-clause
trymaybe :: IO () -> IO (Maybe SomeException) trymaybe io = (do io; return Nothing) `catchException` \e -> return (Just e)
122
trymaybe :: IO () -> IO (Maybe SomeException) trymaybe io = (do io; return Nothing) `catchException` \e -> return (Just e)
122
trymaybe io = (do io; return Nothing) `catchException` \e -> return (Just e)
76
false
true
0
9
20
65
32
33
null
null
rahulmutt/ghcvm
compiler/Eta/DeSugar/Coverage.hs
bsd-3-clause
addTickHsCmd (HsCmdCase e mgs) = liftM2 HsCmdCase (addTickLHsExpr e) (addTickCmdMatchGroup mgs)
135
addTickHsCmd (HsCmdCase e mgs) = liftM2 HsCmdCase (addTickLHsExpr e) (addTickCmdMatchGroup mgs)
135
addTickHsCmd (HsCmdCase e mgs) = liftM2 HsCmdCase (addTickLHsExpr e) (addTickCmdMatchGroup mgs)
135
false
false
0
7
50
36
17
19
null
null
contivero/hasmin
tests/Hasmin/Parser/ValueSpec.hs
bsd-3-clause
numberParserTests :: Spec numberParserTests = describe "number parser tests. Succeeds in parsing:" $ mapM_ (matchSpecWithDesc number) numberTestsInfo
155
numberParserTests :: Spec numberParserTests = describe "number parser tests. Succeeds in parsing:" $ mapM_ (matchSpecWithDesc number) numberTestsInfo
155
numberParserTests = describe "number parser tests. Succeeds in parsing:" $ mapM_ (matchSpecWithDesc number) numberTestsInfo
129
false
true
0
8
22
29
14
15
null
null
UCSD-PL/RefScript
src/Language/Rsc/Errors.hs
bsd-3-clause
errorMultipleVarDeclAnns l x = mkErr l $ text "Cannot have multple variable declaration annotations for variable" <+> ticks (pp x) <> text "."
143
errorMultipleVarDeclAnns l x = mkErr l $ text "Cannot have multple variable declaration annotations for variable" <+> ticks (pp x) <> text "."
143
errorMultipleVarDeclAnns l x = mkErr l $ text "Cannot have multple variable declaration annotations for variable" <+> ticks (pp x) <> text "."
143
false
false
0
9
23
41
18
23
null
null
ian-mi/hTorrent
Data/Binary/Exception.hs
gpl-3.0
runGetExcept :: Get a -> LBS.ByteString -> Exceptional ParseErrorLazy a runGetExcept get bs = case runGetOrFail get bs of Left (rem, off, msg) -> Exception (ParseErrorLazy rem off msg) Right (_, _, a) -> Success a
221
runGetExcept :: Get a -> LBS.ByteString -> Exceptional ParseErrorLazy a runGetExcept get bs = case runGetOrFail get bs of Left (rem, off, msg) -> Exception (ParseErrorLazy rem off msg) Right (_, _, a) -> Success a
221
runGetExcept get bs = case runGetOrFail get bs of Left (rem, off, msg) -> Exception (ParseErrorLazy rem off msg) Right (_, _, a) -> Success a
149
false
true
0
10
43
95
47
48
null
null
DavidAlphaFox/ghc
libraries/filepath/System/FilePath/Internal.hs
bsd-3-clause
{- c:\ -} readDriveLetter :: String -> Maybe (FilePath, FilePath) readDriveLetter (x:':':y:xs) | isLetter x && isPathSeparator y = Just $ addSlash [x,':'] (y:xs)
161
readDriveLetter :: String -> Maybe (FilePath, FilePath) readDriveLetter (x:':':y:xs) | isLetter x && isPathSeparator y = Just $ addSlash [x,':'] (y:xs)
151
readDriveLetter (x:':':y:xs) | isLetter x && isPathSeparator y = Just $ addSlash [x,':'] (y:xs)
95
true
true
0
9
23
81
41
40
null
null
JustusAdam/elm-init
src/ElmInit/Util.hs
mit
enumerate ∷ Int → [a] → [(Int,a)] enumerate from l = zip [from..(length l)] l
77
enumerate ∷ Int → [a] → [(Int,a)] enumerate from l = zip [from..(length l)] l
77
enumerate from l = zip [from..(length l)] l
43
false
true
0
8
14
52
28
24
null
null
benma/bitd
src/BitD/Protocol/BitcoinAddress.hs
bsd-3-clause
integerToBS :: Integer -> BS.ByteString integerToBS 0 = BS.pack [0]
67
integerToBS :: Integer -> BS.ByteString integerToBS 0 = BS.pack [0]
67
integerToBS 0 = BS.pack [0]
27
false
true
0
8
9
33
15
18
null
null
mightymoose/liquidhaskell
tests/todo/linspace.hs
bsd-3-clause
{-@ makePVector :: vs:[Integer] -> s:(Space (PVectorN (len vs))) -> {v: (PVectorN (len vs)) | (orthSpace v) = s} @-} makePVector :: [Integer] -> Space PVector -> PVector makePVector v s@Null = PVector v [] s
207
makePVector :: [Integer] -> Space PVector -> PVector makePVector v s@Null = PVector v [] s
90
makePVector v s@Null = PVector v [] s
37
true
true
1
7
35
51
23
28
null
null
chadbrewbaker/shellcheck
ShellCheck/Parser.hs
gpl-3.0
prop_readBackTicked6 = isWarning readSimpleCommand "echo `foo\necho `bar"
73
prop_readBackTicked6 = isWarning readSimpleCommand "echo `foo\necho `bar"
73
prop_readBackTicked6 = isWarning readSimpleCommand "echo `foo\necho `bar"
73
false
false
1
5
6
14
5
9
null
null
omefire/megaparsec
Text/Megaparsec/Expr.hs
bsd-2-clause
pTerm :: Stream s m t => ParsecT s u m (a -> a) -> ParsecT s u m a -> ParsecT s u m (a -> a) -> ParsecT s u m a pTerm prefix term postfix = do pre <- option id (hidden prefix) x <- term post <- option id (hidden postfix) return $ post (pre x) -- | @pInfixN op p x@ parses non-associative infix operator @op@, then term -- with parser @p@, then returns result of the operator application on @x@ -- and the term.
432
pTerm :: Stream s m t => ParsecT s u m (a -> a) -> ParsecT s u m a -> ParsecT s u m (a -> a) -> ParsecT s u m a pTerm prefix term postfix = do pre <- option id (hidden prefix) x <- term post <- option id (hidden postfix) return $ post (pre x) -- | @pInfixN op p x@ parses non-associative infix operator @op@, then term -- with parser @p@, then returns result of the operator application on @x@ -- and the term.
432
pTerm prefix term postfix = do pre <- option id (hidden prefix) x <- term post <- option id (hidden postfix) return $ post (pre x) -- | @pInfixN op p x@ parses non-associative infix operator @op@, then term -- with parser @p@, then returns result of the operator application on @x@ -- and the term.
311
false
true
0
12
111
158
74
84
null
null
mettekou/ghc
compiler/rename/RnSplice.hs
bsd-3-clause
rn_bracket _ (ExpBr e) = do { (e', fvs) <- rnLExpr e ; return (ExpBr e', fvs) }
107
rn_bracket _ (ExpBr e) = do { (e', fvs) <- rnLExpr e ; return (ExpBr e', fvs) }
107
rn_bracket _ (ExpBr e) = do { (e', fvs) <- rnLExpr e ; return (ExpBr e', fvs) }
107
false
false
1
10
45
54
26
28
null
null
d0kt0r0/Tidal
tidal-parse/src/Sound/Tidal/Parse.hs
gpl-3.0
genericPatternExpressions :: forall a. (Parse a, Parse (Pattern a),Parse (Pattern a -> Pattern a)) => H (Pattern a) genericPatternExpressions = (parser :: H (Pattern a -> Pattern a)) <*> parser <|> (parser :: H ([a] -> Pattern a)) <*> parser <|> (parser :: H ([Pattern a] -> Pattern a)) <*> parser <|> (parser :: H ([(Pattern a, Double)] -> Pattern a)) <*> parser <|> pInt_p <*> parser <|> silence
409
genericPatternExpressions :: forall a. (Parse a, Parse (Pattern a),Parse (Pattern a -> Pattern a)) => H (Pattern a) genericPatternExpressions = (parser :: H (Pattern a -> Pattern a)) <*> parser <|> (parser :: H ([a] -> Pattern a)) <*> parser <|> (parser :: H ([Pattern a] -> Pattern a)) <*> parser <|> (parser :: H ([(Pattern a, Double)] -> Pattern a)) <*> parser <|> pInt_p <*> parser <|> silence
409
genericPatternExpressions = (parser :: H (Pattern a -> Pattern a)) <*> parser <|> (parser :: H ([a] -> Pattern a)) <*> parser <|> (parser :: H ([Pattern a] -> Pattern a)) <*> parser <|> (parser :: H ([(Pattern a, Double)] -> Pattern a)) <*> parser <|> pInt_p <*> parser <|> silence
293
false
true
3
17
80
208
108
100
null
null
Concomitant/LambdaHack
Game/LambdaHack/Atomic/MonadStateWrite.hs
bsd-3-clause
-- | Update the items embedded in a tile on the level. updateEmbed :: (ItemFloor -> ItemFloor) -> Level -> Level updateEmbed f lvl = lvl {lembed = f (lembed lvl)}
162
updateEmbed :: (ItemFloor -> ItemFloor) -> Level -> Level updateEmbed f lvl = lvl {lembed = f (lembed lvl)}
107
updateEmbed f lvl = lvl {lembed = f (lembed lvl)}
49
true
true
0
9
30
49
26
23
null
null
ocharles/hs-quake-3
Quake3/Shader/TypeCheck.hs
bsd-3-clause
-------------------------------------------------------------------------------- tcDouble :: String -> Validation [String] Double tcDouble ('-':s) = negate <$> tcDouble s
171
tcDouble :: String -> Validation [String] Double tcDouble ('-':s) = negate <$> tcDouble s
89
tcDouble ('-':s) = negate <$> tcDouble s
40
true
true
2
9
15
47
22
25
null
null
jstolarek/ghc
compiler/main/DynFlags.hs
bsd-3-clause
targetRetainsAllBindings HscNothing = True
46
targetRetainsAllBindings HscNothing = True
46
targetRetainsAllBindings HscNothing = True
46
false
false
0
5
7
9
4
5
null
null
fmapfmapfmap/amazonka
amazonka-codedeploy/gen/Network/AWS/CodeDeploy/ListDeploymentConfigs.hs
mpl-2.0
-- | Creates a value of 'ListDeploymentConfigsResponse' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ldcrsNextToken' -- -- * 'ldcrsDeploymentConfigsList' -- -- * 'ldcrsResponseStatus' listDeploymentConfigsResponse :: Int -- ^ 'ldcrsResponseStatus' -> ListDeploymentConfigsResponse listDeploymentConfigsResponse pResponseStatus_ = ListDeploymentConfigsResponse' { _ldcrsNextToken = Nothing , _ldcrsDeploymentConfigsList = Nothing , _ldcrsResponseStatus = pResponseStatus_ }
589
listDeploymentConfigsResponse :: Int -- ^ 'ldcrsResponseStatus' -> ListDeploymentConfigsResponse listDeploymentConfigsResponse pResponseStatus_ = ListDeploymentConfigsResponse' { _ldcrsNextToken = Nothing , _ldcrsDeploymentConfigsList = Nothing , _ldcrsResponseStatus = pResponseStatus_ }
316
listDeploymentConfigsResponse pResponseStatus_ = ListDeploymentConfigsResponse' { _ldcrsNextToken = Nothing , _ldcrsDeploymentConfigsList = Nothing , _ldcrsResponseStatus = pResponseStatus_ }
211
true
true
0
7
94
57
34
23
null
null
mrakgr/futhark
src/Futhark/CodeGen/Backends/GenericC.hs
bsd-3-clause
modifyUserState :: (s -> s) -> CompilerM op s () modifyUserState f = modify $ \compstate -> compstate { compUserState = f $ compUserState compstate }
151
modifyUserState :: (s -> s) -> CompilerM op s () modifyUserState f = modify $ \compstate -> compstate { compUserState = f $ compUserState compstate }
151
modifyUserState f = modify $ \compstate -> compstate { compUserState = f $ compUserState compstate }
102
false
true
0
10
27
58
30
28
null
null
ariep/psqueues
src/Data/IntPSQ/Internal.hs
bsd-3-clause
hasMinHeapProperty :: Ord p => IntPSQ p v -> Bool hasMinHeapProperty psq = case psq of Nil -> True Tip _ _ _ -> True Bin _ p _ _ l r -> go p l && go p r where go :: Ord p => p -> IntPSQ p v -> Bool go _ Nil = True go parentPrio (Tip _ prio _) = parentPrio <= prio go parentPrio (Bin _ prio _ _ l r) = parentPrio <= prio && go prio l && go prio r
402
hasMinHeapProperty :: Ord p => IntPSQ p v -> Bool hasMinHeapProperty psq = case psq of Nil -> True Tip _ _ _ -> True Bin _ p _ _ l r -> go p l && go p r where go :: Ord p => p -> IntPSQ p v -> Bool go _ Nil = True go parentPrio (Tip _ prio _) = parentPrio <= prio go parentPrio (Bin _ prio _ _ l r) = parentPrio <= prio && go prio l && go prio r
402
hasMinHeapProperty psq = case psq of Nil -> True Tip _ _ _ -> True Bin _ p _ _ l r -> go p l && go p r where go :: Ord p => p -> IntPSQ p v -> Bool go _ Nil = True go parentPrio (Tip _ prio _) = parentPrio <= prio go parentPrio (Bin _ prio _ _ l r) = parentPrio <= prio && go prio l && go prio r
352
false
true
6
7
145
180
87
93
null
null
Raveline/BadIntel
testsuite/BadIntel/Game/MechanismSpec.hs
gpl-2.0
testGame = Game (ukAgency' agentPool) (ukAgency' agentPool)
59
testGame = Game (ukAgency' agentPool) (ukAgency' agentPool)
59
testGame = Game (ukAgency' agentPool) (ukAgency' agentPool)
59
false
false
0
7
6
23
11
12
null
null
aelve/json-x
lib/Json/Internal/TH.hs
bsd-3-clause
(<:>) :: ExpQ -> ExpQ -> ExpQ (<:>) a b = a <^> [|B.char7 ':'|] <^> b
69
(<:>) :: ExpQ -> ExpQ -> ExpQ (<:>) a b = a <^> [|B.char7 ':'|] <^> b
69
(<:>) a b = a <^> [|B.char7 ':'|] <^> b
39
false
true
4
8
16
47
24
23
null
null
brendanhay/gogol
gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Locations/Agents/Flows/Versions/Create.hs
mpl-2.0
-- | Required. The Flow to create an Version for. Format: -- \`projects\/\/locations\/\/agents\/\/flows\/\`. plafvcParent :: Lens' ProjectsLocationsAgentsFlowsVersionsCreate Text plafvcParent = lens _plafvcParent (\ s a -> s{_plafvcParent = a})
246
plafvcParent :: Lens' ProjectsLocationsAgentsFlowsVersionsCreate Text plafvcParent = lens _plafvcParent (\ s a -> s{_plafvcParent = a})
137
plafvcParent = lens _plafvcParent (\ s a -> s{_plafvcParent = a})
67
true
true
0
9
30
44
23
21
null
null
pubnub/haskell
src/Network/Pubnub.hs
mit
unsubscribe :: Async () -> IO () unsubscribe = cancel
53
unsubscribe :: Async () -> IO () unsubscribe = cancel
53
unsubscribe = cancel
20
false
true
0
7
9
25
12
13
null
null
green-haskell/ghc
compiler/stranal/DmdAnal.hs
bsd-3-clause
-- Do not process absent demands -- Otherwise act like in a normal demand analysis -- See |-* relation in the companion paper dmdAnalStar :: AnalEnv -> Demand -- This one takes a *Demand* -> CoreExpr -> (BothDmdArg, CoreExpr) dmdAnalStar env dmd e | (cd, defer_and_use) <- toCleanDmd dmd (exprType e) , (dmd_ty, e') <- dmdAnal env cd e = (postProcessDmdTypeM defer_and_use dmd_ty, e')
423
dmdAnalStar :: AnalEnv -> Demand -- This one takes a *Demand* -> CoreExpr -> (BothDmdArg, CoreExpr) dmdAnalStar env dmd e | (cd, defer_and_use) <- toCleanDmd dmd (exprType e) , (dmd_ty, e') <- dmdAnal env cd e = (postProcessDmdTypeM defer_and_use dmd_ty, e')
297
dmdAnalStar env dmd e | (cd, defer_and_use) <- toCleanDmd dmd (exprType e) , (dmd_ty, e') <- dmdAnal env cd e = (postProcessDmdTypeM defer_and_use dmd_ty, e')
171
true
true
0
11
102
105
54
51
null
null
fredmorcos/attic
snippets/haskell/list-index.hs
isc
index (x:xs) n = index xs (n - 1)
33
index (x:xs) n = index xs (n - 1)
33
index (x:xs) n = index xs (n - 1)
33
false
false
1
7
8
32
15
17
null
null
frenetic-lang/nettle-openflow
src/Nettle/OpenFlow/MessagesBinary.hs
bsd-3-clause
reason2Code :: PacketInReason -> Word8 reason2Code NotMatched = 0
67
reason2Code :: PacketInReason -> Word8 reason2Code NotMatched = 0
67
reason2Code NotMatched = 0
28
false
true
0
5
10
18
9
9
null
null
nomeata/nofib-analyse
Main.hs
bsd-3-clause
meanInt :: Integral a => (Results -> [a]) -> Results -> Maybe (MeanStdDev a) meanInt f results = go (f results) where go [] = Nothing go fs = Just (MeanStdDev mn 0) where mn = foldl' (+) 0 fs `quot` fromIntegral (length fs) -- Look for bogus-looking times: On Linux we occasionally get timing results -- that are bizarrely low, and skew the average.
370
meanInt :: Integral a => (Results -> [a]) -> Results -> Maybe (MeanStdDev a) meanInt f results = go (f results) where go [] = Nothing go fs = Just (MeanStdDev mn 0) where mn = foldl' (+) 0 fs `quot` fromIntegral (length fs) -- Look for bogus-looking times: On Linux we occasionally get timing results -- that are bizarrely low, and skew the average.
370
meanInt f results = go (f results) where go [] = Nothing go fs = Just (MeanStdDev mn 0) where mn = foldl' (+) 0 fs `quot` fromIntegral (length fs) -- Look for bogus-looking times: On Linux we occasionally get timing results -- that are bizarrely low, and skew the average.
293
false
true
0
10
85
128
64
64
null
null
ekmett/hmpfr
src/Data/Number/MPFR/Special.hs
bsd-3-clause
fma :: RoundMode -> Precision -> MPFR -> MPFR -> MPFR -> MPFR fma r p d1 d2 = fst . fma_ r p d1 d2
108
fma :: RoundMode -> Precision -> MPFR -> MPFR -> MPFR -> MPFR fma r p d1 d2 = fst . fma_ r p d1 d2
108
fma r p d1 d2 = fst . fma_ r p d1 d2
36
false
true
0
9
35
53
26
27
null
null
JacquesCarette/literate-scientific-software
code/drasil-example/Drasil/SSP/Assumptions.hs
bsd-2-clause
slopeS = foldlSent [S "The factor of safety is assumed to be", phrase constant, S "across the entire", phrase slpSrf]
119
slopeS = foldlSent [S "The factor of safety is assumed to be", phrase constant, S "across the entire", phrase slpSrf]
119
slopeS = foldlSent [S "The factor of safety is assumed to be", phrase constant, S "across the entire", phrase slpSrf]
119
false
false
1
7
21
37
16
21
null
null
andregr/bot
lib/Bot/Parser/Parser.hs
bsd-3-clause
onExceptP :: Parser a -> Text -> Parser a onExceptP p m = p `catchP` (\e -> throwP $ Error [m] <> e)
100
onExceptP :: Parser a -> Text -> Parser a onExceptP p m = p `catchP` (\e -> throwP $ Error [m] <> e)
100
onExceptP p m = p `catchP` (\e -> throwP $ Error [m] <> e)
58
false
true
0
12
22
66
32
34
null
null