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
brendanhay/gogol
gogol-dialogflow/gen/Network/Google/Resource/DialogFlow/Projects/Locations/Agents/Flows/TransitionRouteGroups/Create.hs
mpl-2.0
-- | Creates a value of 'ProjectsLocationsAgentsFlowsTransitionRouteGroupsCreate' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'plaftrgcParent' -- -- * 'plaftrgcXgafv' -- -- * 'plaftrgcLanguageCode' -- -- * 'plaftrgcUploadProtocol' ...
1,118
projectsLocationsAgentsFlowsTransitionRouteGroupsCreate :: Text -- ^ 'plaftrgcParent' -> GoogleCloudDialogflowCxV3TransitionRouteGroup -- ^ 'plaftrgcPayload' -> ProjectsLocationsAgentsFlowsTransitionRouteGroupsCreate projectsLocationsAgentsFlowsTransitionRouteGroupsCreate pPlaftrgcParent_ pPlaftrgcPayload_ ...
686
projectsLocationsAgentsFlowsTransitionRouteGroupsCreate pPlaftrgcParent_ pPlaftrgcPayload_ = ProjectsLocationsAgentsFlowsTransitionRouteGroupsCreate' { _plaftrgcParent = pPlaftrgcParent_ , _plaftrgcXgafv = Nothing , _plaftrgcLanguageCode = Nothing , _plaftrgcUploadProtocol = Nothing , _plaftrgcAcc...
457
true
true
0
6
162
95
66
29
null
null
johan--/twitter-conduit
Web/Twitter/Conduit/Stream.hs
bsd-2-clause
stream' :: (MonadResource m, FromJSON value) => TWInfo -> HTTP.Manager -> APIRequest apiName responseType -> m (C.ResumableSource m value) stream' info mgr req = do rsrc <- getResponse info mgr =<< liftIO (makeRequest req) responseBody rsrc $=+ CL.sequence sinkFromJSON
309
stream' :: (MonadResource m, FromJSON value) => TWInfo -> HTTP.Manager -> APIRequest apiName responseType -> m (C.ResumableSource m value) stream' info mgr req = do rsrc <- getResponse info mgr =<< liftIO (makeRequest req) responseBody rsrc $=+ CL.sequence sinkFromJSON
309
stream' info mgr req = do rsrc <- getResponse info mgr =<< liftIO (makeRequest req) responseBody rsrc $=+ CL.sequence sinkFromJSON
138
false
true
0
13
78
110
50
60
null
null
oldmanmike/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
matchContextErrString (StmtCtxt GhciStmtCtxt) = text "interactive GHCi command"
84
matchContextErrString (StmtCtxt GhciStmtCtxt) = text "interactive GHCi command"
84
matchContextErrString (StmtCtxt GhciStmtCtxt) = text "interactive GHCi command"
84
false
false
0
7
12
18
8
10
null
null
leksah/leksah-server
src/IDE/Metainfo/SourceCollectorH.hs
gpl-2.0
copyNixSource packageId fpUnpack project = do debugM "leksah-server" "copyNixSource" let nixFile = pjDir project </> "default.nix" doesFileExist nixFile >>= \case True -> do (nixOuput, _) <- runTool' "nix-instantiate" [T.pack nixFile, "--eval", "-A", T.pack $ "ghc." <> display (pkgName p...
1,253
copyNixSource packageId fpUnpack project = do debugM "leksah-server" "copyNixSource" let nixFile = pjDir project </> "default.nix" doesFileExist nixFile >>= \case True -> do (nixOuput, _) <- runTool' "nix-instantiate" [T.pack nixFile, "--eval", "-A", T.pack $ "ghc." <> display (pkgName p...
1,253
copyNixSource packageId fpUnpack project = do debugM "leksah-server" "copyNixSource" let nixFile = pjDir project </> "default.nix" doesFileExist nixFile >>= \case True -> do (nixOuput, _) <- runTool' "nix-instantiate" [T.pack nixFile, "--eval", "-A", T.pack $ "ghc." <> display (pkgName p...
1,253
false
false
4
26
410
350
159
191
null
null
NorfairKing/super-user-spark
src/SuperUserSpark/OptParse.hs
mit
parseParse :: ParserInfo Dispatch parseParse = info parser modifier where parser = DispatchParse <$> parseParseArgs modifier = fullDesc <> progDesc "Parse a spark file and check for syntactic errors."
226
parseParse :: ParserInfo Dispatch parseParse = info parser modifier where parser = DispatchParse <$> parseParseArgs modifier = fullDesc <> progDesc "Parse a spark file and check for syntactic errors."
226
parseParse = info parser modifier where parser = DispatchParse <$> parseParseArgs modifier = fullDesc <> progDesc "Parse a spark file and check for syntactic errors."
192
false
true
6
6
54
58
22
36
null
null
jasaarim/uncrossed-paths
Main.hs
mit
showPath :: Path -> String showPath path = let start = (show ((length path) - 1)) ++ " steps: " end = show (map (\sw -> (x (p sw), y (p sw))) path) in start ++ end ++ "\n"
208
showPath :: Path -> String showPath path = let start = (show ((length path) - 1)) ++ " steps: " end = show (map (\sw -> (x (p sw), y (p sw))) path) in start ++ end ++ "\n"
208
showPath path = let start = (show ((length path) - 1)) ++ " steps: " end = show (map (\sw -> (x (p sw), y (p sw))) path) in start ++ end ++ "\n"
181
false
true
0
17
75
108
55
53
null
null
jessica-taylor/quipp2
src/Quipp/Parser.hs
mit
varPatternExpr = VarPExpr <$> lowerId
37
varPatternExpr = VarPExpr <$> lowerId
37
varPatternExpr = VarPExpr <$> lowerId
37
false
false
3
5
4
15
5
10
null
null
balangs/eTeak
aschem/Render.hs
bsd-3-clause
inLineWidth :: Double -> Render a -> Render () inLineWidth width body = do oldWidth <- getLineWidth setLineWidth width body setLineWidth oldWidth
181
inLineWidth :: Double -> Render a -> Render () inLineWidth width body = do oldWidth <- getLineWidth setLineWidth width body setLineWidth oldWidth
177
inLineWidth width body = do oldWidth <- getLineWidth setLineWidth width body setLineWidth oldWidth
130
false
true
0
9
57
59
24
35
null
null
stone-guru/tmmha
test/src/SelectorTest.hs
gpl-3.0
testLast4 = TestLabel "3level last in for signed contracts" $ (TestCase $ do let s = html2Test $ at "div:last-child div:last-child li:last-child" (textOf "strong") T.putStrLn s assertEqual "Signed contracts of last girl" "6" s )
250
testLast4 = TestLabel "3level last in for signed contracts" $ (TestCase $ do let s = html2Test $ at "div:last-child div:last-child li:last-child" (textOf "strong") T.putStrLn s assertEqual "Signed contracts of last girl" "6" s )
250
testLast4 = TestLabel "3level last in for signed contracts" $ (TestCase $ do let s = html2Test $ at "div:last-child div:last-child li:last-child" (textOf "strong") T.putStrLn s assertEqual "Signed contracts of last girl" "6" s )
250
false
false
1
17
56
66
28
38
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_SAMPLER_RENDERBUFFER_NV :: GLenum gl_SAMPLER_RENDERBUFFER_NV = 0x8E56
72
gl_SAMPLER_RENDERBUFFER_NV :: GLenum gl_SAMPLER_RENDERBUFFER_NV = 0x8E56
72
gl_SAMPLER_RENDERBUFFER_NV = 0x8E56
35
false
true
0
4
5
11
6
5
null
null
dysinger/amazonka
amazonka-rds/gen/Network/AWS/RDS/ApplyPendingMaintenanceAction.hs
mpl-2.0
-- | Specify an opt-in request, or undo an opt-in request. An opt-in request of -- type 'immediate' cannot be undone. -- -- Valid values: -- -- 'immediate' - Apply the maintenance action immediately. 'next-maintenance' - -- Apply the maintenance action during the next maintenance window for the -- resource. 'undo-opt...
514
apmaOptInType :: Lens' ApplyPendingMaintenanceAction Text apmaOptInType = lens _apmaOptInType (\s a -> s { _apmaOptInType = a })
128
apmaOptInType = lens _apmaOptInType (\s a -> s { _apmaOptInType = a })
70
true
true
0
9
78
48
30
18
null
null
bacchanalia/KitchenSink
KitchenSink/Qualified.hs
gpl-3.0
-- |'BL.toStrict' bl_toStrict = BL.toStrict
43
bl_toStrict = BL.toStrict
25
bl_toStrict = BL.toStrict
25
true
false
0
5
4
9
5
4
null
null
bravit/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
ibc i (IBCTotCheckErr fc err) f = return f { ibc_totcheckfail = (fc, err) : ibc_totcheckfail f }
96
ibc i (IBCTotCheckErr fc err) f = return f { ibc_totcheckfail = (fc, err) : ibc_totcheckfail f }
96
ibc i (IBCTotCheckErr fc err) f = return f { ibc_totcheckfail = (fc, err) : ibc_totcheckfail f }
96
false
false
1
9
17
48
23
25
null
null
simhu/cubical
CTT.hs
mit
appendSides :: [(Side, a)] -> Box a -> Box a appendSides sides (Box dir x v nvs) = Box dir x v (sides ++ nvs)
109
appendSides :: [(Side, a)] -> Box a -> Box a appendSides sides (Box dir x v nvs) = Box dir x v (sides ++ nvs)
109
appendSides sides (Box dir x v nvs) = Box dir x v (sides ++ nvs)
64
false
true
0
7
24
67
34
33
null
null
EduPH/ModelosComputacionales
src/MacrosNew.hs
bsd-3-clause
instM2inst m@(Macro e vs v) = concat (map (instM2inst) (instDeMacro (normEtMAux m)))
89
instM2inst m@(Macro e vs v) = concat (map (instM2inst) (instDeMacro (normEtMAux m)))
89
instM2inst m@(Macro e vs v) = concat (map (instM2inst) (instDeMacro (normEtMAux m)))
89
false
false
1
11
16
54
24
30
null
null
seckcoder/lang-learn
haskell/algo/src/Data/Tree/Lazy.hs
unlicense
preOrder (Branch a left right) = [a] ++ preOrder left ++ preOrder right
71
preOrder (Branch a left right) = [a] ++ preOrder left ++ preOrder right
71
preOrder (Branch a left right) = [a] ++ preOrder left ++ preOrder right
71
false
false
0
7
12
37
17
20
null
null
a143753/AOJ
0034.hs
apache-2.0
chk i s r (l:ls) = if s + l >= r then i else chk (i+1) (s+l) r ls
71
chk i s r (l:ls) = if s + l >= r then i else chk (i+1) (s+l) r ls
71
chk i s r (l:ls) = if s + l >= r then i else chk (i+1) (s+l) r ls
71
false
false
0
8
25
61
32
29
null
null
alexgadea/fun
Fun/Parser/Decl.hs
gpl-3.0
- | Parsea nombres que comienzan con minuscula. parseName :: ParserD Text parseName = lexeme lexer ((:) <$> lower <*> many alphaNum) >>= return . pack
151
parseName :: ParserD Text parseName = lexeme lexer ((:) <$> lower <*> many alphaNum) >>= return . pack
102
parseName = lexeme lexer ((:) <$> lower <*> many alphaNum) >>= return . pack
76
true
true
1
10
26
70
32
38
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 12915 = 5798
32
getValueFromProduct 12915 = 5798
32
getValueFromProduct 12915 = 5798
32
false
false
0
5
3
9
4
5
null
null
hsyl20/ViperVM
haskus-system-build/src/apps/Haskus/Apps/System/Build/Disk.hs
bsd-3-clause
makeDisk :: SystemConfig -> FilePath -> IO () makeDisk config tmpfp = do showStep "Creating system disk..." -- create directories let syslinuxfp = tmpfp </> "boot" </> "syslinux" createDirectoryIfMissing True syslinuxfp -- copy Syslinux syslinuxPath <- syslinuxMain (syslinuxConfig config) -- copy...
1,265
makeDisk :: SystemConfig -> FilePath -> IO () makeDisk config tmpfp = do showStep "Creating system disk..." -- create directories let syslinuxfp = tmpfp </> "boot" </> "syslinux" createDirectoryIfMissing True syslinuxfp -- copy Syslinux syslinuxPath <- syslinuxMain (syslinuxConfig config) -- copy...
1,265
makeDisk config tmpfp = do showStep "Creating system disk..." -- create directories let syslinuxfp = tmpfp </> "boot" </> "syslinux" createDirectoryIfMissing True syslinuxfp -- copy Syslinux syslinuxPath <- syslinuxMain (syslinuxConfig config) -- copy *.c32 files copyDirectory (syslinuxPath </...
1,219
false
true
0
13
315
296
142
154
null
null
roboguy13/remote-json
example/Weak/Typed.hs
bsd-3-clause
main = do ts <- send (Session session) $ do say "Hello!" say "Hello!" t1 <- temperature t2 <- temperature t3 <- temperature say "Howdy" return [t1,t2,t3] print ts
313
main = do ts <- send (Session session) $ do say "Hello!" say "Hello!" t1 <- temperature t2 <- temperature t3 <- temperature say "Howdy" return [t1,t2,t3] print ts
313
main = do ts <- send (Session session) $ do say "Hello!" say "Hello!" t1 <- temperature t2 <- temperature t3 <- temperature say "Howdy" return [t1,t2,t3] print ts
313
false
false
1
13
179
90
37
53
null
null
xificurC/scheme-interpreter
Main.hs
bsd-3-clause
eqv :: [LispVal] -> ThrowsError LispVal eqv [Bool arg1, Bool arg2] = return (Bool (arg1 == arg2))
97
eqv :: [LispVal] -> ThrowsError LispVal eqv [Bool arg1, Bool arg2] = return (Bool (arg1 == arg2))
97
eqv [Bool arg1, Bool arg2] = return (Bool (arg1 == arg2))
57
false
true
0
9
16
56
27
29
null
null
pparkkin/eta
compiler/ETA/Main/HscTypes.hs
bsd-3-clause
appendStubC (ForeignStubs h c m) c_code = ForeignStubs h (c $$ c_code) m
72
appendStubC (ForeignStubs h c m) c_code = ForeignStubs h (c $$ c_code) m
72
appendStubC (ForeignStubs h c m) c_code = ForeignStubs h (c $$ c_code) m
72
false
false
1
7
12
37
17
20
null
null
abbradar/aeson
Data/Aeson/Types/Internal.hs
bsd-3-clause
-- | Annotate an error message with a -- <http://goessner.net/articles/JsonPath/ JSONPath> error location. formatError :: JSONPath -> String -> String formatError path msg = "Error in " ++ (format "$" path) ++ ": " ++ msg where format pfx [] = pfx format pfx (Index idx:parts) = format (pfx ++ "...
464
formatError :: JSONPath -> String -> String formatError path msg = "Error in " ++ (format "$" path) ++ ": " ++ msg where format pfx [] = pfx format pfx (Index idx:parts) = format (pfx ++ "[" ++ show idx ++ "]") parts format pfx (Key key:parts) = format (pfx ++ "." ++ unpack key) parts --...
357
formatError path msg = "Error in " ++ (format "$" path) ++ ": " ++ msg where format pfx [] = pfx format pfx (Index idx:parts) = format (pfx ++ "[" ++ show idx ++ "]") parts format pfx (Key key:parts) = format (pfx ++ "." ++ unpack key) parts -- | A key\/value pair for an 'Object'.
313
true
true
0
9
109
144
72
72
null
null
awakenetworks/gRPC-haskell
core/src/Network/GRPC/LowLevel/Call.hs
apache-2.0
-- | Optionally allocate a managed byte buffer for a payload, depending on the -- given method type. If no payload is needed, the returned pointer is null mgdPayload :: GRPCMethodType -> Managed (Ptr C.ByteBuffer) mgdPayload mt | payloadHandling mt == C.SrmPayloadNone = return nullPtr | otherwise ...
360
mgdPayload :: GRPCMethodType -> Managed (Ptr C.ByteBuffer) mgdPayload mt | payloadHandling mt == C.SrmPayloadNone = return nullPtr | otherwise = managed C.withByteBufferPtr
205
mgdPayload mt | payloadHandling mt == C.SrmPayloadNone = return nullPtr | otherwise = managed C.withByteBufferPtr
146
true
true
1
10
82
65
30
35
null
null
mettekou/ghc
compiler/coreSyn/CoreSyn.hs
bsd-3-clause
cmpAltCon con1 con2 = WARN( True, text "Comparing incomparable AltCons" <+> ppr con1 <+> ppr con2 ) LT
158
cmpAltCon con1 con2 = WARN( True, text "Comparing incomparable AltCons" <+> ppr con1 <+> ppr con2 ) LT
158
cmpAltCon con1 con2 = WARN( True, text "Comparing incomparable AltCons" <+> ppr con1 <+> ppr con2 ) LT
158
false
false
1
8
73
45
18
27
null
null
danr/tfp1
Lang/PolyFOL.hs
gpl-3.0
collectQ :: Formula a -> Maybe (Q,([(a,Type a)],Formula a)) collectQ f0@(Q q _ _ _) = Just (q,go f0) where go (Q q' x t f) | q == q' = let (xs,f') = go f in ((x,t):xs,f') go f = ([],f)
227
collectQ :: Formula a -> Maybe (Q,([(a,Type a)],Formula a)) collectQ f0@(Q q _ _ _) = Just (q,go f0) where go (Q q' x t f) | q == q' = let (xs,f') = go f in ((x,t):xs,f') go f = ([],f)
227
collectQ f0@(Q q _ _ _) = Just (q,go f0) where go (Q q' x t f) | q == q' = let (xs,f') = go f in ((x,t):xs,f') go f = ([],f)
167
false
true
0
11
84
164
85
79
null
null
JoeyEremondi/utrecht-pv
Z3Utils.hs
mit
{- Same as freeVars, but traverses the body of a function -} progFreeVars :: Program -> Variables progFreeVars (Program _ params body ty) = [Variable [] (ToName "return") ty] ++ params ++ (freeVars body)
242
progFreeVars :: Program -> Variables progFreeVars (Program _ params body ty) = [Variable [] (ToName "return") ty] ++ params ++ (freeVars body)
181
progFreeVars (Program _ params body ty) = [Variable [] (ToName "return") ty] ++ params ++ (freeVars body)
144
true
true
0
10
72
63
32
31
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Misc.hs
bsd-3-clause
angleBrackets p = char '<' <> p <> char '>'
46
angleBrackets p = char '<' <> p <> char '>'
46
angleBrackets p = char '<' <> p <> char '>'
46
false
false
0
7
12
23
10
13
null
null
hdc-arizona/nanocube-hs
src/Main.hs
mit
p1'' = ()
9
p1'' = ()
9
p1'' = ()
9
false
false
1
6
2
12
4
8
null
null
byorgey/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
bcc i (RESERVE 0) = ""
22
bcc i (RESERVE 0) = ""
22
bcc i (RESERVE 0) = ""
22
false
false
0
7
5
18
8
10
null
null
authchir/mini-ml
test/Spec.hs
isc
normalFormTests = [ ("1", "1"), ("fun x -> x", "let x0 = (fun x -> x) in\n" ++ "x0"), ("1 + 2", "let x0 = 1 + 2 in\nx0"), ("1 + 2 + 3", "let x0 = 1 + 2 in\nlet x1 = x0 + 3 in\nx1"), ("1 + 2 + 3 + 4", "let x0 = 1 + 2 in\nlet x1 = x0 + 3 in\nlet x2 = x1 + 4 in\nx2"), ...
2,715
normalFormTests = [ ("1", "1"), ("fun x -> x", "let x0 = (fun x -> x) in\n" ++ "x0"), ("1 + 2", "let x0 = 1 + 2 in\nx0"), ("1 + 2 + 3", "let x0 = 1 + 2 in\nlet x1 = x0 + 3 in\nx1"), ("1 + 2 + 3 + 4", "let x0 = 1 + 2 in\nlet x1 = x0 + 3 in\nlet x2 = x1 + 4 in\nx2"), ...
2,715
normalFormTests = [ ("1", "1"), ("fun x -> x", "let x0 = (fun x -> x) in\n" ++ "x0"), ("1 + 2", "let x0 = 1 + 2 in\nx0"), ("1 + 2 + 3", "let x0 = 1 + 2 in\nlet x1 = x0 + 3 in\nx1"), ("1 + 2 + 3 + 4", "let x0 = 1 + 2 in\nlet x1 = x0 + 3 in\nlet x2 = x1 + 4 in\nx2"), ...
2,715
false
false
0
15
1,130
368
211
157
null
null
goshakkk/Poker.hs
src/Poker.hs
mit
allSuitsSame :: Hand -> Bool allSuitsSame = (==1) . length . allSuits
69
allSuitsSame :: Hand -> Bool allSuitsSame = (==1) . length . allSuits
69
allSuitsSame = (==1) . length . allSuits
40
false
true
0
7
11
27
15
12
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
getAutoPilotTargetDirectionStreamReq :: KRPCHS.SpaceCenter.AutoPilot -> KRPCStreamReq ((Double, Double, Double)) getAutoPilotTargetDirectionStreamReq thisArg = let req = makeRequest "SpaceCenter" "AutoPilot_get_TargetDirection" [makeArgument 0 thisArg] in makeStream req
279
getAutoPilotTargetDirectionStreamReq :: KRPCHS.SpaceCenter.AutoPilot -> KRPCStreamReq ((Double, Double, Double)) getAutoPilotTargetDirectionStreamReq thisArg = let req = makeRequest "SpaceCenter" "AutoPilot_get_TargetDirection" [makeArgument 0 thisArg] in makeStream req
279
getAutoPilotTargetDirectionStreamReq thisArg = let req = makeRequest "SpaceCenter" "AutoPilot_get_TargetDirection" [makeArgument 0 thisArg] in makeStream req
166
false
true
0
11
31
65
33
32
null
null
free2tedy/PP
Tema2PP/Parser.hs
mit
{-| Parses the entire input, using a given parser, and returns the corresponding result, stripping off the remainder part, which is empty anyway, since the input has been completely parsed. Examples: >>> result (spotWhile1 isLetter) "abc" "abc" >>> result (spotWhile1 isLetter) "abc1" <error> -} result :...
615
result :: Parser a b -> [a] -> b result parser input = case candidates of [] -> error "Syntax error" (candidate : _) -> candidate where -- Only look at entries for which the entire input has been consumed. candidates = [ candidate | (candidate, []) <- parser input ]
302
result parser input = case candidates of [] -> error "Syntax error" (candidate : _) -> candidate where -- Only look at entries for which the entire input has been consumed. candidates = [ candidate | (candidate, []) <- parser input ]
269
true
true
1
10
147
101
49
52
null
null
alanz/haskell-token-utils
src/Language/Haskell/TokenUtils/Utils.hs
unlicense
makeOffset :: RowOffset -> ColOffset -> EndOffset makeOffset 0 0 = None
73
makeOffset :: RowOffset -> ColOffset -> EndOffset makeOffset 0 0 = None
73
makeOffset 0 0 = None
23
false
true
0
6
13
24
12
12
null
null
michalkonecny/mixed-types-num
src/Data/Convertible/Base.hs
bsd-3-clause
convert :: Convertible a b => a -> b convert x = case safeConvert x of Left e -> error (prettyConvertError e) Right r -> r {- instance Convertible Int Double where safeConvert = return . fromIntegral instance Convertible Double Int where safeConvert = return . truncate -- could do boun...
710
convert :: Convertible a b => a -> b convert x = case safeConvert x of Left e -> error (prettyConvertError e) Right r -> r {- instance Convertible Int Double where safeConvert = return . fromIntegral instance Convertible Double Int where safeConvert = return . truncate -- could do boun...
710
convert x = case safeConvert x of Left e -> error (prettyConvertError e) Right r -> r {- instance Convertible Int Double where safeConvert = return . fromIntegral instance Convertible Double Int where safeConvert = return . truncate -- could do bounds checking here instance Convertible...
673
false
true
0
10
133
72
34
38
null
null
eigengrau/hlint
src/Hint/Monad.hs
bsd-3-clause
monadCall (replaceBranches -> (bs@(_:_), gen)) | all isJust res = Just ("Use simple functions", gen $ map (\(Just (a,b,c)) -> b) res, rs) where res = map monadCall bs rs = concatMap (\(Just (a,b,c)) -> c) res
227
monadCall (replaceBranches -> (bs@(_:_), gen)) | all isJust res = Just ("Use simple functions", gen $ map (\(Just (a,b,c)) -> b) res, rs) where res = map monadCall bs rs = concatMap (\(Just (a,b,c)) -> c) res
227
monadCall (replaceBranches -> (bs@(_:_), gen)) | all isJust res = Just ("Use simple functions", gen $ map (\(Just (a,b,c)) -> b) res, rs) where res = map monadCall bs rs = concatMap (\(Just (a,b,c)) -> c) res
227
false
false
0
14
55
132
72
60
null
null
fgaray/telegram-bot
src/Database.hs
gpl-3.0
migrate = runDB $ runMigration migrateAll
41
migrate = runDB $ runMigration migrateAll
41
migrate = runDB $ runMigration migrateAll
41
false
false
1
6
5
16
6
10
null
null
MaxDaten/yage
src/Yage/Rendering/Mesh.hs
mit
vertexCount :: Storable v => Getter (Mesh v) Int vertexCount = meshVertexBuffer.to (sum . map VS.length)
104
vertexCount :: Storable v => Getter (Mesh v) Int vertexCount = meshVertexBuffer.to (sum . map VS.length)
104
vertexCount = meshVertexBuffer.to (sum . map VS.length)
55
false
true
0
9
15
46
22
24
null
null
candide-guevara/programming_challenges
haskell_learning/probabilistic_monad.hs
gpl-2.0
multi_rand_event :: t -> Int -> (t -> PList t) -> PList t multi_rand_event initial rounds event = f initial where f = foldr (C.<=<) return (replicate rounds event)
165
multi_rand_event :: t -> Int -> (t -> PList t) -> PList t multi_rand_event initial rounds event = f initial where f = foldr (C.<=<) return (replicate rounds event)
165
multi_rand_event initial rounds event = f initial where f = foldr (C.<=<) return (replicate rounds event)
107
false
true
0
10
30
73
36
37
null
null
rueshyna/gogol
gogol-books/gen/Network/Google/Books/Types/Product.hs
mpl-2.0
-- | Creates a value of 'VolumeUserInfoUserUploadedVolumeInfo' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'vuiuuviProcessingState' volumeUserInfoUserUploadedVolumeInfo :: VolumeUserInfoUserUploadedVolumeInfo volumeUserInfoUser...
428
volumeUserInfoUserUploadedVolumeInfo :: VolumeUserInfoUserUploadedVolumeInfo volumeUserInfoUserUploadedVolumeInfo = VolumeUserInfoUserUploadedVolumeInfo' { _vuiuuviProcessingState = Nothing }
207
volumeUserInfoUserUploadedVolumeInfo = VolumeUserInfoUserUploadedVolumeInfo' { _vuiuuviProcessingState = Nothing }
126
true
true
1
6
60
30
17
13
null
null
merijn/GPU-benchmarks
benchmark-analysis/ingest-src/Parsers.hs
gpl-3.0
externalTiming :: Parser Timing externalTiming = do avgTime <- double <* endOfLine return Timing { name = "computation" , minTime = 0 , avgTime = avgTime , maxTime = 0 , stddev = 0 }
226
externalTiming :: Parser Timing externalTiming = do avgTime <- double <* endOfLine return Timing { name = "computation" , minTime = 0 , avgTime = avgTime , maxTime = 0 , stddev = 0 }
226
externalTiming = do avgTime <- double <* endOfLine return Timing { name = "computation" , minTime = 0 , avgTime = avgTime , maxTime = 0 , stddev = 0 }
194
false
true
1
10
78
67
35
32
null
null
ublubu/shapes
shapes/src/Physics/Scenes/FourBoxesTwoStatic.hs
mit
externals :: External externals = makeConstantAccel (0, -2)
59
externals :: External externals = makeConstantAccel (0, -2)
59
externals = makeConstantAccel (0, -2)
37
false
true
0
7
7
22
12
10
null
null
graninas/Andromeda
app/ViewModels/ShellViewModel.hs
bsd-3-clause
createShellVM (workspaceView, workspaceModel) = do workspaceVM <- newObjectDC workspaceModel let shellVM = ShellVM workspaceVM workspaceView newObjectDC shellVM
166
createShellVM (workspaceView, workspaceModel) = do workspaceVM <- newObjectDC workspaceModel let shellVM = ShellVM workspaceVM workspaceView newObjectDC shellVM
166
createShellVM (workspaceView, workspaceModel) = do workspaceVM <- newObjectDC workspaceModel let shellVM = ShellVM workspaceVM workspaceView newObjectDC shellVM
166
false
false
0
10
22
45
20
25
null
null
jhoxray/muon
src/Quark/Parsers/Basic.hs
bsd-3-clause
-- parsing aggregate terms with functions on column names pAggr :: Parser OpTerm pAggr = Aggr <$> (skipSpace *> string "aggregate" *> funcArgs)
143
pAggr :: Parser OpTerm pAggr = Aggr <$> (skipSpace *> string "aggregate" *> funcArgs)
85
pAggr = Aggr <$> (skipSpace *> string "aggregate" *> funcArgs)
62
true
true
3
9
22
38
17
21
null
null
Lyapunov/haskell-programming-from-first-principles
chapter_9/poem_lines.hs
mit
secondSen = "In the forest of the night\n"
42
secondSen = "In the forest of the night\n"
42
secondSen = "In the forest of the night\n"
42
false
false
0
4
7
6
3
3
null
null
leepike/SmartCheck
examples/RedBlackTrees/RedBlackSetTest.hs
bsd-3-clause
prop_NoInsertPhantom :: RBSet Int -> Int -> Int -> Property prop_NoInsertPhantom t x y = not (member x t) && x /= y ==> not (member x (insert y t))
149
prop_NoInsertPhantom :: RBSet Int -> Int -> Int -> Property prop_NoInsertPhantom t x y = not (member x t) && x /= y ==> not (member x (insert y t))
149
prop_NoInsertPhantom t x y = not (member x t) && x /= y ==> not (member x (insert y t))
89
false
true
6
9
31
84
39
45
null
null
emc2/compiler-misc
src/Data/Position/DWARFPosition.hs
bsd-3-clause
basicPosition Simple { simplePos = Span { spanStart = start, spanEnd = end } } = BasicPosition.Span { BasicPosition.spanStart = start, BasicPosition.spanEnd = end }
189
basicPosition Simple { simplePos = Span { spanStart = start, spanEnd = end } } = BasicPosition.Span { BasicPosition.spanStart = start, BasicPosition.spanEnd = end }
189
basicPosition Simple { simplePos = Span { spanStart = start, spanEnd = end } } = BasicPosition.Span { BasicPosition.spanStart = start, BasicPosition.spanEnd = end }
189
false
false
0
11
49
53
30
23
null
null
sordina/scotty
test/Web/ScottySpec.hs
bsd-3-clause
availableMethods :: [StdMethod] availableMethods = [GET, POST, HEAD, PUT, PATCH, DELETE, OPTIONS]
97
availableMethods :: [StdMethod] availableMethods = [GET, POST, HEAD, PUT, PATCH, DELETE, OPTIONS]
97
availableMethods = [GET, POST, HEAD, PUT, PATCH, DELETE, OPTIONS]
65
false
true
0
7
11
42
23
19
null
null
WSCU/JSEuterpea
Euterpea Examples/Basics.hs
gpl-3.0
el12 = q r + e a3 + e a3 + e a3 + e g3 + e g3 + e g3 + e a3 + e a3 + e a3 + q g3 + e g3 + q c4
95
mel12 = q r + e a3 + e a3 + e a3 + e g3 + e g3 + e g3 + e a3 + e a3 + e a3 + q g3 + e g3 + q c4
95
mel12 = q r + e a3 + e a3 + e a3 + e g3 + e g3 + e g3 + e a3 + e a3 + e a3 + q g3 + e g3 + q c4
95
false
false
3
16
40
97
40
57
null
null
matterhorn-chat/matterhorn
src/Matterhorn/Events.hs
bsd-3-clause
onEvent :: ChatState -> BrickEvent Name MHEvent -> EventM Name (Next ChatState) onEvent st ev = runMHEvent st $ do onBrickEvent ev doPendingUserFetches doPendingUserStatusFetches
190
onEvent :: ChatState -> BrickEvent Name MHEvent -> EventM Name (Next ChatState) onEvent st ev = runMHEvent st $ do onBrickEvent ev doPendingUserFetches doPendingUserStatusFetches
190
onEvent st ev = runMHEvent st $ do onBrickEvent ev doPendingUserFetches doPendingUserStatusFetches
110
false
true
0
9
35
59
26
33
null
null
ilyasergey/GHC-XAppFix
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
enCCall' :: GenCCallPlatform -> CmmCallTarget -- function to call -> [HintedCmmFormal] -- where to put the result -> [HintedCmmActual] -- arguments (of mixed type) -> NatM InstrBlock {- The PowerPC calling convention for Darwin/Mac OS X is described in Apple's docum...
2,237
genCCall' :: GenCCallPlatform -> CmmCallTarget -- function to call -> [HintedCmmFormal] -- where to put the result -> [HintedCmmActual] -- arguments (of mixed type) -> NatM InstrBlock genCCall' _ (CmmPrim MO_WriteBarrier) _ _ = return $ unitOL LWSYNC
296
genCCall' _ (CmmPrim MO_WriteBarrier) _ _ = return $ unitOL LWSYNC
67
true
true
0
12
532
66
34
32
null
null
drpowell/Prokka-web
WJR/Jobs.hs
gpl-3.0
isNullUserID :: UserID -> Bool isNullUserID userId = T.null userId
66
isNullUserID :: UserID -> Bool isNullUserID userId = T.null userId
66
isNullUserID userId = T.null userId
35
false
true
0
6
9
23
11
12
null
null
oldmanmike/ghc
compiler/utils/Outputable.hs
bsd-3-clause
speakN :: Int -> SDoc speakN 0 = text "none"
44
speakN :: Int -> SDoc speakN 0 = text "none"
44
speakN 0 = text "none"
22
false
true
0
5
9
25
11
14
null
null
MaxGabriel/hedis
src/Database/Redis/ProtocolPipelining.hs
bsd-3-clause
-- |Read all the replies from the Handle and return them as a lazy list. -- -- The actual reading and parsing of each 'Reply' is deferred until the spine -- of the list is evaluated up to that 'Reply'. Each 'Reply' is cons'd in front -- of the (unevaluated) list of all remaining replies. -- -- 'unsafeInterleaveIO' ...
1,296
hGetReplies :: Handle -> Parser a -> IO [a] hGetReplies h parser = go S.empty where go rest = unsafeInterleaveIO $ do parseResult <- parseWith readMore parser rest case parseResult of Fail{} -> errConnClosed Partial{} -> error "Hedis: parseWith returned Par...
697
hGetReplies h parser = go S.empty where go rest = unsafeInterleaveIO $ do parseResult <- parseWith readMore parser rest case parseResult of Fail{} -> errConnClosed Partial{} -> error "Hedis: parseWith returned Partial" Done rest' r -> do ...
653
true
true
2
15
351
239
113
126
null
null
Paow/encore
src/ir/AST/PrettyPrinter.hs
bsd-3-clause
ppExpr FunctionAsValue {qname, typeArgs} = ppQName qname <> brackets (commaSep (map ppType typeArgs))
103
ppExpr FunctionAsValue {qname, typeArgs} = ppQName qname <> brackets (commaSep (map ppType typeArgs))
103
ppExpr FunctionAsValue {qname, typeArgs} = ppQName qname <> brackets (commaSep (map ppType typeArgs))
103
false
false
2
9
14
44
20
24
null
null
ImsungChoi/haskell-test
src/HW03.hs
bsd-3-clause
evalSimple s p@(DWhile e d) = if (evalE s e == 1) then evalSimple (evalSimple s d) p else s
163
evalSimple s p@(DWhile e d) = if (evalE s e == 1) then evalSimple (evalSimple s d) p else s
163
evalSimple s p@(DWhile e d) = if (evalE s e == 1) then evalSimple (evalSimple s d) p else s
163
false
false
1
9
91
61
28
33
null
null
sdiehl/ghc
compiler/GHC/Cmm/Dataflow/Collections.hs
bsd-3-clause
mapUnions :: IsMap map => [map a] -> map a mapUnions [] = mapEmpty
66
mapUnions :: IsMap map => [map a] -> map a mapUnions [] = mapEmpty
66
mapUnions [] = mapEmpty
23
false
true
0
8
13
36
17
19
null
null
thielema/wxhaskell
wxdirect/src/MultiSet.hs
lgpl-2.1
-- | /O(log n)/. The maximal element of a multi set. findMax :: MultiSet a -> a findMax (MultiSet m) = fst (M.findMax m)
122
findMax :: MultiSet a -> a findMax (MultiSet m) = fst (M.findMax m)
69
findMax (MultiSet m) = fst (M.findMax m)
42
true
true
0
9
25
45
20
25
null
null
ben-schulz/Idris-dev
src/Idris/Prover.hs
bsd-3-clause
prove :: Bool -> ElabInfo -> Ctxt OptInfo -> Context -> Bool -> Name -> Type -> Idris () prove mode info opt ctxt lit n ty = do ps <- fmap (\ist -> initElaborator n (constraintNS info) ctxt (idris_datatypes ist) (idris_name ist) ty) getIState idemodePutSExp "start-proof-mode" n (tm, prf) <- ...
2,582
prove :: Bool -> ElabInfo -> Ctxt OptInfo -> Context -> Bool -> Name -> Type -> Idris () prove mode info opt ctxt lit n ty = do ps <- fmap (\ist -> initElaborator n (constraintNS info) ctxt (idris_datatypes ist) (idris_name ist) ty) getIState idemodePutSExp "start-proof-mode" n (tm, prf) <- ...
2,582
prove mode info opt ctxt lit n ty = do ps <- fmap (\ist -> initElaborator n (constraintNS info) ctxt (idris_datatypes ist) (idris_name ist) ty) getIState idemodePutSExp "start-proof-mode" n (tm, prf) <- if mode then elabloop info n True ("-" ++ show n) [] (ES (ps, initESt...
2,493
false
true
0
16
1,060
899
442
457
null
null
AArkadie/Chatshire
SpaghettiParsing.hs
mit
parseStringRes = parseCookWin ||| parseCookFail ||| parseThrow ||| parseAttack ||| parseTurn ||| parseOpenWin ||| parseOpenLose ||| parseGrab ||| parsePut
290
parseStringRes = parseCookWin ||| parseCookFail ||| parseThrow ||| parseAttack ||| parseTurn ||| parseOpenWin ||| parseOpenLose ||| parseGrab ||| parsePut
290
parseStringRes = parseCookWin ||| parseCookFail ||| parseThrow ||| parseAttack ||| parseTurn ||| parseOpenWin ||| parseOpenLose ||| parseGrab ||| parsePut
290
false
false
0
12
154
38
19
19
null
null
lamefun/haddock
haddock-api/src/Haddock/Interface/Rename.hs
bsd-2-clause
returnRn :: a -> RnM a returnRn a = RnM (const (a,[]))
56
returnRn :: a -> RnM a returnRn a = RnM (const (a,[]))
56
returnRn a = RnM (const (a,[]))
33
false
true
0
9
13
38
19
19
null
null
vdweegen/UvA-Software_Testing
Lab1/Bauke/Exercise7.hs
gpl-3.0
oubleOdd a = a
15
doubleOdd a = a
15
doubleOdd a = a
15
false
false
0
5
4
9
4
5
null
null
antalsz/hs-to-coq
src/lib/HsToCoq/Coq/Pretty.hs
mit
-- Module-local render_opt_rtype :: Gallina a => Maybe a -> Doc render_opt_rtype = maybe mempty render_rtype
108
render_opt_rtype :: Gallina a => Maybe a -> Doc render_opt_rtype = maybe mempty render_rtype
92
render_opt_rtype = maybe mempty render_rtype
44
true
true
0
7
15
31
15
16
null
null
sdiehl/ghc
hadrian/src/Hadrian/Haskell/Cabal/Parse.hs
bsd-3-clause
externalPackageDeps :: C.LocalBuildInfo -> [(C.UnitId, C.MungedPackageId)] externalPackageDeps lbi = -- TODO: what about non-buildable components? nub [ (ipkgid, pkgid) | clbi <- Graph.toList (C.componentGraph lbi) , (ipkgid, pkgid) <- C.componentPackageDeps clbi , not (inter...
549
externalPackageDeps :: C.LocalBuildInfo -> [(C.UnitId, C.MungedPackageId)] externalPackageDeps lbi = -- TODO: what about non-buildable components? nub [ (ipkgid, pkgid) | clbi <- Graph.toList (C.componentGraph lbi) , (ipkgid, pkgid) <- C.componentPackageDeps clbi , not (inter...
549
externalPackageDeps lbi = -- TODO: what about non-buildable components? nub [ (ipkgid, pkgid) | clbi <- Graph.toList (C.componentGraph lbi) , (ipkgid, pkgid) <- C.componentPackageDeps clbi , not (internal ipkgid) ] where -- True if this dependency is an internal one (de...
474
false
true
0
12
123
145
77
68
null
null
snoyberg/ghc
compiler/basicTypes/DataCon.hs
bsd-3-clause
-- | 'TyBinder's for the universally-quantified type variables dataConUnivTyVarBinders :: DataCon -> [TyVarBinder] dataConUnivTyVarBinders = dcUnivTyVars
153
dataConUnivTyVarBinders :: DataCon -> [TyVarBinder] dataConUnivTyVarBinders = dcUnivTyVars
90
dataConUnivTyVarBinders = dcUnivTyVars
38
true
true
0
6
15
19
11
8
null
null
naushadh/persistent
persistent-mongoDB/Database/Persist/MongoDB.hs
mit
mongoFilterToDoc (ArrayFilter field op) = mongoFilterToBSON (fieldName field) op
80
mongoFilterToDoc (ArrayFilter field op) = mongoFilterToBSON (fieldName field) op
80
mongoFilterToDoc (ArrayFilter field op) = mongoFilterToBSON (fieldName field) op
80
false
false
0
7
8
28
13
15
null
null
jdeisenberg/rwh_commentary
chapter02_files/trigUtils.hs
mit
-- trig utilities -- convert a value in degrees to radians radians :: Floating a => a -> a radians x = pi * x / 180.0
119
radians :: Floating a => a -> a radians x = pi * x / 180.0
59
radians x = pi * x / 180.0
27
true
true
3
8
28
43
19
24
null
null
thalerjonathan/phd
coding/learning/haskell/grahambook/Code_Solutions/countdown2.hs
gpl-3.0
interleave :: a -> [a] -> [[a]] interleave x [] = [[x]]
59
interleave :: a -> [a] -> [[a]] interleave x [] = [[x]]
59
interleave x [] = [[x]]
27
false
true
0
8
15
41
23
18
null
null
termite2/code-widget
CodeWidget/CodeWidgetAPI.hs
bsd-3-clause
codeRegionSetMark :: RCodeView -> Region -> G.TextMark -> SourcePos -> IO () codeRegionSetMark ref r m p = do cv <- readIORef ref case getContexts cv r of Nothing -> error ("regionSetMark: region not found: " ++ (show r)) Just (pg,x) -> do rpos <- rgnMapPos pg x p ...
502
codeRegionSetMark :: RCodeView -> Region -> G.TextMark -> SourcePos -> IO () codeRegionSetMark ref r m p = do cv <- readIORef ref case getContexts cv r of Nothing -> error ("regionSetMark: region not found: " ++ (show r)) Just (pg,x) -> do rpos <- rgnMapPos pg x p ...
502
codeRegionSetMark ref r m p = do cv <- readIORef ref case getContexts cv r of Nothing -> error ("regionSetMark: region not found: " ++ (show r)) Just (pg,x) -> do rpos <- rgnMapPos pg x p iter <- G.textBufferGetIterAtLineOffset (pgBuffer pg) (sourceLine ...
425
false
true
0
16
163
176
83
93
null
null
kolmodin/cabal
Cabal/Distribution/Compat/Graph.hs
bsd-3-clause
-- | /O(1)/. The number of nodes in the graph. size :: Graph a -> Int size = Map.size . toMap
93
size :: Graph a -> Int size = Map.size . toMap
46
size = Map.size . toMap
23
true
true
0
6
20
25
13
12
null
null
rueshyna/gogol
gogol-bigquery/gen/Network/Google/BigQuery/Types/Product.hs
mpl-2.0
-- | [Pick one] Configures an extract job. jcExtract :: Lens' JobConfiguration (Maybe JobConfigurationExtract) jcExtract = lens _jcExtract (\ s a -> s{_jcExtract = a})
169
jcExtract :: Lens' JobConfiguration (Maybe JobConfigurationExtract) jcExtract = lens _jcExtract (\ s a -> s{_jcExtract = a})
126
jcExtract = lens _jcExtract (\ s a -> s{_jcExtract = a})
58
true
true
0
9
26
48
25
23
null
null
mzini/qlogic
Qlogic/SatSolver.hs
gpl-3.0
negFmToClauses (Neg a) = fmToClauses a
42
negFmToClauses (Neg a) = fmToClauses a
42
negFmToClauses (Neg a) = fmToClauses a
42
false
false
0
7
9
18
8
10
null
null
WraithM/peertrader-backend
src/PeerTrader/Route/StreamData.hs
bsd-3-clause
handleTimeSeries :: ToJSON a => (Vector Listing -> a) -> AppHandler () handleTimeSeries f = do x <- handleProsper $ do lss <- getAllListings return $ f lss t <- liftIO getTime writeJSON (t, x)
228
handleTimeSeries :: ToJSON a => (Vector Listing -> a) -> AppHandler () handleTimeSeries f = do x <- handleProsper $ do lss <- getAllListings return $ f lss t <- liftIO getTime writeJSON (t, x)
228
handleTimeSeries f = do x <- handleProsper $ do lss <- getAllListings return $ f lss t <- liftIO getTime writeJSON (t, x)
157
false
true
0
12
70
90
41
49
null
null
toothbrush/cco-bibtex2html
PrettyPrintHTML/Tool.hs
gpl-3.0
tagWithFields :: [Field] -- ^ attribute list, pretty-printed with printField -> String -- ^ the tag name, A for example -> Doc -- ^ output pretty-print CCO format tagWithFields fs tag = text ( "<" ++ tag) >|< (foldr (>|<) empty (map printField fs)) ...
354
tagWithFields :: [Field] -- ^ attribute list, pretty-printed with printField -> String -- ^ the tag name, A for example -> Doc tagWithFields fs tag = text ( "<" ++ tag) >|< (foldr (>|<) empty (map printField fs)) >|< text ">"
310
tagWithFields fs tag = text ( "<" ++ tag) >|< (foldr (>|<) empty (map printField fs)) >|< text ">"
146
true
true
0
10
139
76
39
37
null
null
nkpart/score-writer
src/Score/Defaults.hs
bsd-3-clause
defaultBarsPerLine :: Num a => a defaultBarsPerLine = 4
55
defaultBarsPerLine :: Num a => a defaultBarsPerLine = 4
55
defaultBarsPerLine = 4
22
false
true
0
6
8
18
9
9
null
null
ndmitchell/binarydefer
Data/Binary/Defer.hs
bsd-3-clause
defer xs = (save, load) where -- value `seq` is important to that a _|_ in value is -- thrown before entering a Catch statement -- may still not be safe if multiple levels of combinators save hndl value = value `seq` f (zip [0::Int ..] xs) where f [] = err...
563
defer xs = (save, load) where -- value `seq` is important to that a _|_ in value is -- thrown before entering a Catch statement -- may still not be safe if multiple levels of combinators save hndl value = value `seq` f (zip [0::Int ..] xs) where f [] = err...
563
defer xs = (save, load) where -- value `seq` is important to that a _|_ in value is -- thrown before entering a Catch statement -- may still not be safe if multiple levels of combinators save hndl value = value `seq` f (zip [0::Int ..] xs) where f [] = err...
563
false
false
1
12
202
175
88
87
null
null
micknelso/language-c
src/Language/CFamily/Data/Position.hs
bsd-3-clause
isInternalPos _ = False
38
isInternalPos _ = False
38
isInternalPos _ = False
38
false
false
0
5
18
9
4
5
null
null
gcampax/ghc
compiler/main/DynFlags.hs
bsd-3-clause
pgm_libtool :: DynFlags -> String pgm_libtool dflags = sPgm_libtool (settings dflags)
95
pgm_libtool :: DynFlags -> String pgm_libtool dflags = sPgm_libtool (settings dflags)
95
pgm_libtool dflags = sPgm_libtool (settings dflags)
51
false
true
0
7
20
27
13
14
null
null
peddie/hgraph
Data/HGraph/Graph.hs
gpl-3.0
-- | @mkLeaf a@ creates a new node with only a value @a@ mkLeaf :: a -> HNode a (b -> b) HNil mkLeaf x = HNode x id hNil
120
mkLeaf :: a -> HNode a (b -> b) HNil mkLeaf x = HNode x id hNil
63
mkLeaf x = HNode x id hNil
26
true
true
0
8
29
40
20
20
null
null
hackern/ghc-7.8.3
libraries/containers/Data/IntSet/Base.hs
bsd-3-clause
findMax (Bin _ m l r) | m < 0 = find l | otherwise = find r where find (Tip kx bm) = kx + highestBitSet bm find (Bin _ _ _ r') = find r' find Nil = error "findMax Nil" -- | /O(min(n,W))/. Delete the minimal element. Returns an empty set if the set is empty. -- -- Note that t...
467
findMax (Bin _ m l r) | m < 0 = find l | otherwise = find r where find (Tip kx bm) = kx + highestBitSet bm find (Bin _ _ _ r') = find r' find Nil = error "findMax Nil" -- | /O(min(n,W))/. Delete the minimal element. Returns an empty set if the set is empty. -- -- Note that t...
467
findMax (Bin _ m l r) | m < 0 = find l | otherwise = find r where find (Tip kx bm) = kx + highestBitSet bm find (Bin _ _ _ r') = find r' find Nil = error "findMax Nil" -- | /O(min(n,W))/. Delete the minimal element. Returns an empty set if the set is empty. -- -- Note that t...
467
false
false
3
8
132
105
52
53
null
null
lamefun/haddock
haddock-api/src/Haddock/Utils.hs
bsd-2-clause
-------------------------------------------------------------------------------- -- * Filename mangling functions stolen from s main/DriverUtil.lhs. -------------------------------------------------------------------------------- baseName :: ModuleName -> FilePath baseName = map (\c -> if c == '.' then '-' else c) . ...
336
baseName :: ModuleName -> FilePath baseName = map (\c -> if c == '.' then '-' else c) . moduleNameString
104
baseName = map (\c -> if c == '.' then '-' else c) . moduleNameString
69
true
true
0
10
32
45
26
19
null
null
haskell-opengl/OpenGLRaw
src/Graphics/GL/Functions/F18.hs
bsd-3-clause
-- glMulticastViewportArrayvNVX ------------------------------------------------ glMulticastViewportArrayvNVX :: MonadIO m => GLuint -- ^ @gpu@. -> GLuint -- ^ @first@. -> GLsizei -- ^ @count@. -> Ptr GLfloat -- ^ @v@ pointing to @COMPSIZE(count)@ elements of type @GLfloat@. -> m () glMulticastViewportArra...
400
glMulticastViewportArrayvNVX :: MonadIO m => GLuint -- ^ @gpu@. -> GLuint -- ^ @first@. -> GLsizei -- ^ @count@. -> Ptr GLfloat -- ^ @v@ pointing to @COMPSIZE(count)@ elements of type @GLfloat@. -> m () glMulticastViewportArrayvNVX v1 v2 v3 v4 = liftIO $ dyn604 ptr_glMulticastViewportArrayvNVX v1 v2 v3 v4
318
glMulticastViewportArrayvNVX v1 v2 v3 v4 = liftIO $ dyn604 ptr_glMulticastViewportArrayvNVX v1 v2 v3 v4
103
true
true
0
12
64
75
37
38
null
null
Hrothen/Hubert
src/CSS.hs
mit
-- compute the specificity of a Selector spec :: Selector -> Specificity spec (Simple name id cls) = (maybeLen id, fromIntegral $ length cls, maybeLen name) where maybeLen = fromIntegral . maybe 0 T.length -- an empty selector
230
spec :: Selector -> Specificity spec (Simple name id cls) = (maybeLen id, fromIntegral $ length cls, maybeLen name) where maybeLen = fromIntegral . maybe 0 T.length -- an empty selector
189
spec (Simple name id cls) = (maybeLen id, fromIntegral $ length cls, maybeLen name) where maybeLen = fromIntegral . maybe 0 T.length -- an empty selector
157
true
true
0
7
41
75
37
38
null
null
SnipyJulmy/mcs_notes_and_resume
fun-and-log-prog/exercices/s05/ex2.hs
lgpl-3.0
main = do T.runTestTT tests
27
main = do T.runTestTT tests
27
main = do T.runTestTT tests
27
false
false
0
8
4
14
6
8
null
null
kim/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/DescribeElasticIps.hs
mpl-2.0
-- | 'DescribeElasticIps' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'deiInstanceId' @::@ 'Maybe' 'Text' -- -- * 'deiIps' @::@ ['Text'] -- -- * 'deiStackId' @::@ 'Maybe' 'Text' -- describeElasticIps :: DescribeElasticIps describeElasticIps = DescribeElasticIps { _deiInstanceI...
398
describeElasticIps :: DescribeElasticIps describeElasticIps = DescribeElasticIps { _deiInstanceId = Nothing , _deiStackId = Nothing , _deiIps = mempty }
178
describeElasticIps = DescribeElasticIps { _deiInstanceId = Nothing , _deiStackId = Nothing , _deiIps = mempty }
137
true
true
0
7
78
51
31
20
null
null
raventid/coursera_learning
haskell/chpater5/type_kwon_do.hs
mit
munge :: (x -> y) -> (y -> (w, z)) -> x -> w munge f f1 v = fst $ f1 $ f v
74
munge :: (x -> y) -> (y -> (w, z)) -> x -> w munge f f1 v = fst $ f1 $ f v
74
munge f f1 v = fst $ f1 $ f v
29
false
true
0
9
24
61
32
29
null
null
mfpi/q-inqu
tests/Render/Text.hs
mit
glyphFormatString :: FT_Glyph_Format -> String glyphFormatString fmt | fmt == ft_GLYPH_FORMAT_COMPOSITE = "ft_GLYPH_FORMAT_COMPOSITE" | fmt == ft_GLYPH_FORMAT_OUTLINE = "ft_GLYPH_FORMAT_OUTLINE" | fmt == ft_GLYPH_FORMAT_PLOTTER = "ft_GLYPH_FORMAT_PLOTTER" | fmt == ft_GLYPH_FORMAT_BITMAP = "ft_GLYPH_FORM...
371
glyphFormatString :: FT_Glyph_Format -> String glyphFormatString fmt | fmt == ft_GLYPH_FORMAT_COMPOSITE = "ft_GLYPH_FORMAT_COMPOSITE" | fmt == ft_GLYPH_FORMAT_OUTLINE = "ft_GLYPH_FORMAT_OUTLINE" | fmt == ft_GLYPH_FORMAT_PLOTTER = "ft_GLYPH_FORMAT_PLOTTER" | fmt == ft_GLYPH_FORMAT_BITMAP = "ft_GLYPH_FORM...
371
glyphFormatString fmt | fmt == ft_GLYPH_FORMAT_COMPOSITE = "ft_GLYPH_FORMAT_COMPOSITE" | fmt == ft_GLYPH_FORMAT_OUTLINE = "ft_GLYPH_FORMAT_OUTLINE" | fmt == ft_GLYPH_FORMAT_PLOTTER = "ft_GLYPH_FORMAT_PLOTTER" | fmt == ft_GLYPH_FORMAT_BITMAP = "ft_GLYPH_FORMAT_BITMAP" | otherwise = "ft_GLYPH_FORMAT_N...
324
false
true
4
8
54
75
35
40
null
null
brendanhay/gogol
gogol-dataproc/gen/Network/Google/Dataproc/Types/Product.hs
mpl-2.0
-- | Creates a value of 'AutoscalingConfig' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'acPolicyURI' autoscalingConfig :: AutoscalingConfig autoscalingConfig = AutoscalingConfig' {_acPolicyURI = Nothing}
297
autoscalingConfig :: AutoscalingConfig autoscalingConfig = AutoscalingConfig' {_acPolicyURI = Nothing}
106
autoscalingConfig = AutoscalingConfig' {_acPolicyURI = Nothing}
63
true
true
0
6
46
24
16
8
null
null
xymostech/hpong
src/Objects/Ball.hs
mit
directionToVector :: VertDirection -> HorizDirection -> Vertex2 GLfloat directionToVector Up Left = Vertex2 (-0.01) 0.01
120
directionToVector :: VertDirection -> HorizDirection -> Vertex2 GLfloat directionToVector Up Left = Vertex2 (-0.01) 0.01
120
directionToVector Up Left = Vertex2 (-0.01) 0.01
48
false
true
0
8
14
41
19
22
null
null
4ZP6Capstone2015/ampersand
src/Database/Design/Ampersand/ADL1/Disambiguate.hs
gpl-3.0
findConcept :: String -> A_Concept -- SJC: ONE should be tokenized, so it cannot occur as a string -- especially because we require that concepts are identifiable by their name -- hence if this line would change the semantics, we have either -- (1) made a programming error in the call of findConcept (in which case you ...
472
findConcept :: String -> A_Concept findConcept "ONE" = fatal 200 "ONE is not a valid name for a concept"
104
findConcept "ONE" = fatal 200 "ONE is not a valid name for a concept"
69
true
true
0
5
82
28
16
12
null
null
ddssff/lens
examples/Pong.hs
bsd-3-clause
initialSpeed = 0.6
21
initialSpeed = 0.6
21
initialSpeed = 0.6
21
false
false
0
4
5
6
3
3
null
null
markcwhitfield/nunavut
src/Nunavut/Newtypes.hs
mit
infNorm :: (HasVec a) => a -> Double infNorm = pNorm InfNorm
60
infNorm :: (HasVec a) => a -> Double infNorm = pNorm InfNorm
60
infNorm = pNorm InfNorm
23
false
true
0
6
11
27
14
13
null
null
lukexi/ghc
compiler/nativeGen/X86/Ppr.hs
bsd-3-clause
pprImm (ImmInteger i) = integer i
33
pprImm (ImmInteger i) = integer i
33
pprImm (ImmInteger i) = integer i
33
false
false
0
7
5
18
8
10
null
null
overminder/hs-mini-kanren
app/Main.hs
bsd-3-clause
zero_ = "O"
11
zero_ = "O"
11
zero_ = "O"
11
false
false
0
4
2
6
3
3
null
null
pparkkin/eta
compiler/ETA/CodeGen/Prim.hs
bsd-3-clause
-- Double# ops simpleOp DoubleEqOp = Just $ typedCmp jdouble ifeq
65
simpleOp DoubleEqOp = Just $ typedCmp jdouble ifeq
50
simpleOp DoubleEqOp = Just $ typedCmp jdouble ifeq
50
true
false
0
6
10
19
9
10
null
null
sukwon0709/mysql
tests/LexerTest.hs
bsd-3-clause
ts2 :: TestTree ts2 = testCase "Identifier test2" $ Lex.alexScanTokens "sukwon oh" @?= [Tok.LTokIdent (Tok.LIdentSimpleToken "sukwon"), Tok.LTokIdent (Tok.LIdentSimpleToken "oh")]
181
ts2 :: TestTree ts2 = testCase "Identifier test2" $ Lex.alexScanTokens "sukwon oh" @?= [Tok.LTokIdent (Tok.LIdentSimpleToken "sukwon"), Tok.LTokIdent (Tok.LIdentSimpleToken "oh")]
181
ts2 = testCase "Identifier test2" $ Lex.alexScanTokens "sukwon oh" @?= [Tok.LTokIdent (Tok.LIdentSimpleToken "sukwon"), Tok.LTokIdent (Tok.LIdentSimpleToken "oh")]
165
false
true
0
11
20
66
30
36
null
null
alexliew/learn_you_a_haskell
3_syntax_in_functions.hs
unlicense
tell :: (Show a) => [a] -> String tell [] = "The list is empty"
63
tell :: (Show a) => [a] -> String tell [] = "The list is empty"
63
tell [] = "The list is empty"
29
false
true
0
7
14
32
17
15
null
null
scotty-web/scotty-hastache
src/Web/Scotty/Hastache.hs
bsd-3-clause
-- * Runners and types -- | The runner to use instead of 'scotty' scottyH :: (ScottyError e) => Port -> ScottyH e () -> IO () scottyH p s = do (runH, runActionToIO) <- mkHStateRunners defaultConfig scottyT p runH runActionToIO s -- | The runner to use instead of 'scottyOpts'
285
scottyH :: (ScottyError e) => Port -> ScottyH e () -> IO () scottyH p s = do (runH, runActionToIO) <- mkHStateRunners defaultConfig scottyT p runH runActionToIO s -- | The runner to use instead of 'scottyOpts'
218
scottyH p s = do (runH, runActionToIO) <- mkHStateRunners defaultConfig scottyT p runH runActionToIO s -- | The runner to use instead of 'scottyOpts'
158
true
true
0
9
60
76
38
38
null
null