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
LambdaHack/LambdaHack
engine-src/Game/LambdaHack/Common/Tile.hs
bsd-3-clause
revealAs :: ContentData TileKind -> ContentId TileKind -> Rnd (ContentId TileKind) revealAs cotile t = do let getTo (TK.RevealAs grp) acc = grp : acc getTo _ acc = acc case foldr getTo [] $ TK.tfeature $ okind cotile t of [] -> return t groups -> do grp <- oneOf groups fromMaybe (...
383
revealAs :: ContentData TileKind -> ContentId TileKind -> Rnd (ContentId TileKind) revealAs cotile t = do let getTo (TK.RevealAs grp) acc = grp : acc getTo _ acc = acc case foldr getTo [] $ TK.tfeature $ okind cotile t of [] -> return t groups -> do grp <- oneOf groups fromMaybe (...
383
revealAs cotile t = do let getTo (TK.RevealAs grp) acc = grp : acc getTo _ acc = acc case foldr getTo [] $ TK.tfeature $ okind cotile t of [] -> return t groups -> do grp <- oneOf groups fromMaybe (error $ "" `showFailure` grp) <$> opick cotile grp (const True)
291
false
true
0
16
102
167
78
89
null
null
brownplt/javascript-contracts
src/BrownPLT/JavaScript/Contracts/Compiler.hs
bsd-3-clause
-- Given source that reads: -- -- foo = contract; -- ... -- -- Transform it to: -- -- var foo = { }; ... -- (function() { -- var tmp = contract; -- foo.client = tmp.client; -- foo.server = tmp.server; -- })(); -- -- The names are first initialized to empty object to permit mutually-recursive -- contract defini...
1,668
compileAliases :: [InterfaceItem] -> [ParsedStatement] compileAliases aliases = concatMap init aliases ++ concatMap def aliases where init (InterfaceAlias id _) = templateStatements $ renameVar "alias" id (stmtTemplate "var alias = { };") init (InterfaceInstance id _ _) = templateStatements -- same as above ...
1,341
compileAliases aliases = concatMap init aliases ++ concatMap def aliases where init (InterfaceAlias id _) = templateStatements $ renameVar "alias" id (stmtTemplate "var alias = { };") init (InterfaceInstance id _ _) = templateStatements -- same as above $ renameVar "alias" id (stmtTemplate "var alias = { };...
1,286
true
true
0
14
490
303
156
147
null
null
arnizamani/occam
Haskell.hs
mit
-- | returns all sub patterns of the given pattern getSubPat :: HsPat -> [HsPat] getSubPat p = case p of HsPNeg p1 -> p : getSubPat p1 HsPInfixApp p1 _ p2 -> p : (getSubPat p1 ++ getSubPat p2) HsPApp _ ps -> p : concatMap getSubPat ps HsPTuple ps -> p : concatMap getSubPat ps HsPList ps -> p : conca...
617
getSubPat :: HsPat -> [HsPat] getSubPat p = case p of HsPNeg p1 -> p : getSubPat p1 HsPInfixApp p1 _ p2 -> p : (getSubPat p1 ++ getSubPat p2) HsPApp _ ps -> p : concatMap getSubPat ps HsPTuple ps -> p : concatMap getSubPat ps HsPList ps -> p : concatMap getSubPat ps HsPParen p1 -> p : getSubPat ...
566
getSubPat p = case p of HsPNeg p1 -> p : getSubPat p1 HsPInfixApp p1 _ p2 -> p : (getSubPat p1 ++ getSubPat p2) HsPApp _ ps -> p : concatMap getSubPat ps HsPTuple ps -> p : concatMap getSubPat ps HsPList ps -> p : concatMap getSubPat ps HsPParen p1 -> p : getSubPat p1 HsPRec _ fields -> p : ...
536
true
true
0
13
154
233
108
125
null
null
ryna4c2e/chage
InstParser.hs
mit
parsePReg :: Parser PReg parsePReg = do blanks oneOf "pP" n <- parseHex return $ PReg n
95
parsePReg :: Parser PReg parsePReg = do blanks oneOf "pP" n <- parseHex return $ PReg n
95
parsePReg = do blanks oneOf "pP" n <- parseHex return $ PReg n
70
false
true
0
8
24
40
17
23
null
null
keera-studios/hsQt
Qtc/Enums/Gui/QGraphicsItem.hs
bsd-2-clause
ieQGraphicsItemExtension :: Int -> QGraphicsItemExtension ieQGraphicsItemExtension x = QEnum (CQGraphicsItemExtension x)
120
ieQGraphicsItemExtension :: Int -> QGraphicsItemExtension ieQGraphicsItemExtension x = QEnum (CQGraphicsItemExtension x)
120
ieQGraphicsItemExtension x = QEnum (CQGraphicsItemExtension x)
62
false
true
0
7
10
27
13
14
null
null
kellino/TypeSystems
arith/Parser.hs
mit
expr :: Parser Term expr = try boolFalse <|> try boolTrue <|> ifThen <|> succ' <|> try isZero <|> zero
122
expr :: Parser Term expr = try boolFalse <|> try boolTrue <|> ifThen <|> succ' <|> try isZero <|> zero
122
expr = try boolFalse <|> try boolTrue <|> ifThen <|> succ' <|> try isZero <|> zero
102
false
true
15
6
39
64
31
33
null
null
markusle/pasty
src/CommandLineParser.hs
gpl-3.0
{-| check final list of files for any potentially invalid command line options -} check_for_invalid_opts :: [String] -> Bool check_for_invalid_opts [] = False
162
check_for_invalid_opts :: [String] -> Bool check_for_invalid_opts [] = False
76
check_for_invalid_opts [] = False
33
true
true
0
6
26
24
13
11
null
null
erantapaa/hackage-server
Distribution/Client/Mirror/Repo/Local.hs
bsd-3-clause
uploadPackage :: FilePath -> PkgIndexInfo -> FilePath -> FilePath -> MirrorSession () uploadPackage targetRepoPath pkginfo locCab locTgz = liftIO $ do createDirectoryIfMissing True pkgDir createDirectoryIfMissing True cabalDir copyFile locTgz pkgFile ...
738
uploadPackage :: FilePath -> PkgIndexInfo -> FilePath -> FilePath -> MirrorSession () uploadPackage targetRepoPath pkginfo locCab locTgz = liftIO $ do createDirectoryIfMissing True pkgDir createDirectoryIfMissing True cabalDir copyFile locTgz pkgFile ...
738
uploadPackage targetRepoPath pkginfo locCab locTgz = liftIO $ do createDirectoryIfMissing True pkgDir createDirectoryIfMissing True cabalDir copyFile locTgz pkgFile copyFile locCab cabalFile where pkgDir = targetRepoPath </> "package" cabalDir = targetRepoPath </> "index" ...
596
false
true
0
10
240
177
83
94
null
null
codeq/language-go
src/Language/Go/SrcLocation.hs
mit
decColumn :: SrcLocation -> SrcLocation decColumn loc@(Location row column) | column > 1 = Location row (column - 1) | otherwise = loc
139
decColumn :: SrcLocation -> SrcLocation decColumn loc@(Location row column) | column > 1 = Location row (column - 1) | otherwise = loc
139
decColumn loc@(Location row column) | column > 1 = Location row (column - 1) | otherwise = loc
99
false
true
1
8
27
59
29
30
null
null
BluechipSystems/thrift
test/hs/TestClient.hs
apache-2.0
getTransport "framed" host port = do h <- hOpen (host, PortNumber $ fromIntegral port) t <- openFramedTransport h return $ Framed t
137
getTransport "framed" host port = do h <- hOpen (host, PortNumber $ fromIntegral port) t <- openFramedTransport h return $ Framed t
137
getTransport "framed" host port = do h <- hOpen (host, PortNumber $ fromIntegral port) t <- openFramedTransport h return $ Framed t
137
false
false
0
11
27
56
25
31
null
null
glguy/ssh-hans
src/Network/SSH/Rekey.hs
bsd-3-clause
determineAlg :: SshProposal {- ^ server -} -> SshProposal {- ^ client -} -> (SshProposal -> [ShortByteString]) {- ^ selector -} -> Maybe ShortByteString determineAlg server client f = find (`elem` f server) (f client)
225
determineAlg :: SshProposal {- ^ server -} -> SshProposal {- ^ client -} -> (SshProposal -> [ShortByteString]) {- ^ selector -} -> Maybe ShortByteString determineAlg server client f = find (`elem` f server) (f client)
225
determineAlg server client f = find (`elem` f server) (f client)
64
false
true
0
10
42
66
36
30
null
null
lynnard/cocos2d-hs
src/Graphics/UI/Cocos2d/Sprite.hs
bsd-3-clause
spriteFrame_getOffsetInPixels :: (SpriteFrameValue arg'1) => arg'1 -> HoppyP.IO M2.Vec2Const spriteFrame_getOffsetInPixels arg'1 = withSpriteFramePtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' -> HoppyP.fmap M2.Vec2Const (spriteFrame_getOffsetInPixels' arg'1')
273
spriteFrame_getOffsetInPixels :: (SpriteFrameValue arg'1) => arg'1 -> HoppyP.IO M2.Vec2Const spriteFrame_getOffsetInPixels arg'1 = withSpriteFramePtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' -> HoppyP.fmap M2.Vec2Const (spriteFrame_getOffsetInPixels' arg'1')
273
spriteFrame_getOffsetInPixels arg'1 = withSpriteFramePtr arg'1 $ HoppyP.flip HoppyFHR.withCppPtr $ \arg'1' -> HoppyP.fmap M2.Vec2Const (spriteFrame_getOffsetInPixels' arg'1')
180
false
true
0
8
29
73
35
38
null
null
ghc-android/ghc
testsuite/tests/ghci/should_run/ghcirun004.hs
bsd-3-clause
4814 = 4813
11
4814 = 4813
11
4814 = 4813
11
false
false
1
5
2
10
3
7
null
null
pharpend/desbot
desbot-old/Parser.hs
bsd-3-clause
nickParser :: Parser String nickParser = do firstChar <- oneOf allowedFirstChars rest <- many (oneOf allowedExtraChars) return (firstChar : rest) where allowedFirstChars = mconcat [['A'..'Z'] ,['a'..'z'] ,"_\\[]{}^...
480
nickParser :: Parser String nickParser = do firstChar <- oneOf allowedFirstChars rest <- many (oneOf allowedExtraChars) return (firstChar : rest) where allowedFirstChars = mconcat [['A'..'Z'] ,['a'..'z'] ,"_\\[]{}^...
480
nickParser = do firstChar <- oneOf allowedFirstChars rest <- many (oneOf allowedExtraChars) return (firstChar : rest) where allowedFirstChars = mconcat [['A'..'Z'] ,['a'..'z'] ,"_\\[]{}^`|"] allowedExtraCha...
452
false
true
0
10
192
112
55
57
null
null
kmate/HaRe
old/testing/renaming/D5_AstOut.hs
bsd-3-clause
sum [] = 0
10
sum [] = 0
10
sum [] = 0
10
false
false
1
5
3
15
5
10
null
null
mikeroll/fcm
executable/Options.hs
mit
fcmOpts = info (helper <*> opts) ( fullDesc <> progDesc "Classify objects from INFILE using FCM method" <> header "FCM clustering sample program" )
178
fcmOpts = info (helper <*> opts) ( fullDesc <> progDesc "Classify objects from INFILE using FCM method" <> header "FCM clustering sample program" )
178
fcmOpts = info (helper <*> opts) ( fullDesc <> progDesc "Classify objects from INFILE using FCM method" <> header "FCM clustering sample program" )
178
false
false
0
9
54
35
17
18
null
null
ddssff/lens
src/Control/Parallel/Strategies/Lens.hs
bsd-3-clause
-- | Evaluate the targets of a 'Lens' or 'Traversal' into a data structure -- according to the given 'Strategy'. -- -- @ -- 'evalTraversable' = 'evalOf' 'traverse' = 'traverse' -- 'evalOf' = 'id' -- @ -- -- @ -- 'evalOf' :: 'Lens'' s a -> 'Strategy' a -> 'Strategy' s -- 'evalOf' :: 'Traversal'' s a -> 'Strategy' a -> '...
487
evalOf :: LensLike' Eval s a -> Strategy a -> Strategy s evalOf l = l
69
evalOf l = l
12
true
true
0
7
98
48
29
19
null
null
ndmitchell/cmdargs
System/Console/CmdArgs/Implicit/Global.hs
bsd-3-clause
changeBuiltin_ :: Maybe Builtin_ -> Flag_ -> [Flag_] changeBuiltin_ Nothing _ = []
82
changeBuiltin_ :: Maybe Builtin_ -> Flag_ -> [Flag_] changeBuiltin_ Nothing _ = []
82
changeBuiltin_ Nothing _ = []
29
false
true
0
7
12
32
16
16
null
null
leshchevds/ganeti
src/Ganeti/HTools/PeerMap.hs
bsd-2-clause
maxElem _ = 0
13
maxElem _ = 0
13
maxElem _ = 0
13
false
false
0
5
3
9
4
5
null
null
energyflowanalysis/efa-2.1
attic/src/EFA2/Interpreter/Interpreter.hs
bsd-3-clause
interpretTerm :: (Show v, v ~ D.Apply c a, D.ZipWith c, D.Storage c a, S.Const s c, S.Arith s s ~ s, Fractional a, Base.DArith0 a, Base.BSum a, Base.BProd a a) => Int -> Envs rec (Signal s c a) -> EqTerm -> Signal s c a interpretTerm len envs = go where go term = case term of ...
1,920
interpretTerm :: (Show v, v ~ D.Apply c a, D.ZipWith c, D.Storage c a, S.Const s c, S.Arith s s ~ s, Fractional a, Base.DArith0 a, Base.BSum a, Base.BProd a a) => Int -> Envs rec (Signal s c a) -> EqTerm -> Signal s c a interpretTerm len envs = go where go term = case term of ...
1,920
interpretTerm len envs = go where go term = case term of -- Const x -> S.fromVal len [x] -- Wichtig für delta Rechnung? -- InGiven xs -> S.map (:[]) xs -- Const x -> S.fromVal len x Const x -> toConst len $ fromRational x -- Const x -> toScal...
1,677
false
true
1
16
771
669
331
338
null
null
pbevin/toycss
src/html/GenHtml.hs
gpl-2.0
phrasingNodes = [ "span" ]
26
phrasingNodes = [ "span" ]
26
phrasingNodes = [ "span" ]
26
false
false
0
5
4
9
5
4
null
null
ghc-android/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
rep1TyConKey = mkPreludeTyConUnique 156
39
rep1TyConKey = mkPreludeTyConUnique 156
39
rep1TyConKey = mkPreludeTyConUnique 156
39
false
false
0
5
3
9
4
5
null
null
luigy/stack
src/Stack/New.hs
bsd-3-clause
defaultTemplateName :: TemplateName defaultTemplateName = $(mkTemplateName "new-template")
90
defaultTemplateName :: TemplateName defaultTemplateName = $(mkTemplateName "new-template")
90
defaultTemplateName = $(mkTemplateName "new-template")
54
false
true
0
7
6
18
9
9
null
null
uuhan/Idris-dev
src/Idris/REPL/Parser.hs
bsd-3-clause
proofArgCmd names command doc = (names, NoArg, doc, proofArg command)
71
proofArgCmd names command doc = (names, NoArg, doc, proofArg command)
71
proofArgCmd names command doc = (names, NoArg, doc, proofArg command)
71
false
false
0
6
11
30
15
15
null
null
hvr/jhc
src/Options.hs
mit
-- | Test whether a dump flag is set. dump :: FD.Flag -> Bool dump s = s `S.member` optDumpSet options
102
dump :: FD.Flag -> Bool dump s = s `S.member` optDumpSet options
64
dump s = s `S.member` optDumpSet options
40
true
true
0
7
20
40
19
21
null
null
diku-dk/futhark
src/Futhark/Optimise/Simplify/Rules/Simple.hs
isc
simplifyConvOp lookupVar _ (ConvOp (SIToFP t2 t1) (Var v)) | Just (BasicOp (ConvOp (SExt t3 _) se), v_cs) <- lookupVar v, t2 >= t3 = Just (ConvOp (SIToFP t3 t1) se, v_cs)
180
simplifyConvOp lookupVar _ (ConvOp (SIToFP t2 t1) (Var v)) | Just (BasicOp (ConvOp (SExt t3 _) se), v_cs) <- lookupVar v, t2 >= t3 = Just (ConvOp (SIToFP t3 t1) se, v_cs)
180
simplifyConvOp lookupVar _ (ConvOp (SIToFP t2 t1) (Var v)) | Just (BasicOp (ConvOp (SExt t3 _) se), v_cs) <- lookupVar v, t2 >= t3 = Just (ConvOp (SIToFP t3 t1) se, v_cs)
180
false
false
0
15
41
106
51
55
null
null
kim/amazonka
amazonka-importexport/gen/Network/AWS/ImportExport/Types.hs
mpl-2.0
jobJobId :: Lens' Job Text jobJobId = lens _jobJobId (\s a -> s { _jobJobId = a })
82
jobJobId :: Lens' Job Text jobJobId = lens _jobJobId (\s a -> s { _jobJobId = a })
82
jobJobId = lens _jobJobId (\s a -> s { _jobJobId = a })
55
false
true
0
9
17
46
22
24
null
null
ti1024/hacq
src/Data/MexSet.hs
bsd-3-clause
mex :: Integral a => MexSet a -> a mex (MexSet t) = if mi == 0 then ho else 0 where Mex mi _ ho = FingerTree.measure t
144
mex :: Integral a => MexSet a -> a mex (MexSet t) = if mi == 0 then ho else 0 where Mex mi _ ho = FingerTree.measure t
144
mex (MexSet t) = if mi == 0 then ho else 0 where Mex mi _ ho = FingerTree.measure t
109
false
true
0
7
54
71
33
38
null
null
jean-edouard/manager
xec/Parse.hs
gpl-2.0
bool_p :: CharParser st Bool bool_p = True <$ ( string "true" <|> string "1" ) <|> False <$ ( string "false" <|> string "0" )
134
bool_p :: CharParser st Bool bool_p = True <$ ( string "true" <|> string "1" ) <|> False <$ ( string "false" <|> string "0" )
134
bool_p = True <$ ( string "true" <|> string "1" ) <|> False <$ ( string "false" <|> string "0" )
105
false
true
0
10
34
54
26
28
null
null
xmonad/xmonad-contrib
XMonad/Actions/SwapPromote.hs
bsd-3-clause
swapInStack Nothing st@(W.Stack _x [] _r) = (True,st)
55
swapInStack Nothing st@(W.Stack _x [] _r) = (True,st)
55
swapInStack Nothing st@(W.Stack _x [] _r) = (True,st)
55
false
false
0
9
9
34
18
16
null
null
jwiegley/hnix
src/Nix/Builtins.hs
bsd-3-clause
tryEval :: forall e t f m . MonadNix e t f m => NValue t f m -> m (NValue t f m) tryEval e = catch (demand e (pure . onSuccess)) (pure . onError) where onSuccess v = flip nvSet M.empty $ M.fromList [("success", nvConstant (NBool True)), ("value", v)] onError :: SomeException -> NValue t f m onError _ = fl...
443
tryEval :: forall e t f m . MonadNix e t f m => NValue t f m -> m (NValue t f m) tryEval e = catch (demand e (pure . onSuccess)) (pure . onError) where onSuccess v = flip nvSet M.empty $ M.fromList [("success", nvConstant (NBool True)), ("value", v)] onError :: SomeException -> NValue t f m onError _ = fl...
443
tryEval e = catch (demand e (pure . onSuccess)) (pure . onError) where onSuccess v = flip nvSet M.empty $ M.fromList [("success", nvConstant (NBool True)), ("value", v)] onError :: SomeException -> NValue t f m onError _ = flip nvSet M.empty $ M.fromList [ ("success", nvConstant (NBool False)) , ("v...
360
false
true
0
11
105
219
112
107
null
null
Persi/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
prop_checkFindExec6 = verify checkFindExec "find / -type d -execdir rm *.jpg \\;"
81
prop_checkFindExec6 = verify checkFindExec "find / -type d -execdir rm *.jpg \\;"
81
prop_checkFindExec6 = verify checkFindExec "find / -type d -execdir rm *.jpg \\;"
81
false
false
0
5
11
11
5
6
null
null
shlevy/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
pprPECategory PatSynExPE = text "Pattern synonym existential"
65
pprPECategory PatSynExPE = text "Pattern synonym existential"
65
pprPECategory PatSynExPE = text "Pattern synonym existential"
65
false
false
1
5
10
16
5
11
null
null
etarasov/iptadmin
src/IptAdmin/DelPage.hs
bsd-3-clause
checkParams :: String -> String -> Int -> IptAdmin (Chain, Rule) checkParams tableName chainName rulePosition = do table <- getTable tableName let chainMay = getChainByName chainName table chain <- maybe (throwError $ "Invalid chain name: " ++ chainName) return chainMa...
538
checkParams :: String -> String -> Int -> IptAdmin (Chain, Rule) checkParams tableName chainName rulePosition = do table <- getTable tableName let chainMay = getChainByName chainName table chain <- maybe (throwError $ "Invalid chain name: " ++ chainName) return chainMa...
538
checkParams tableName chainName rulePosition = do table <- getTable tableName let chainMay = getChainByName chainName table chain <- maybe (throwError $ "Invalid chain name: " ++ chainName) return chainMay let ruleMay = cRules chain `atMay` (rulePosition - 1) ...
473
false
true
0
12
167
153
74
79
null
null
kylcarte/harihara
src/Harihara/DB/Schema.hs
bsd-3-clause
fromMaybeText :: Maybe T.Text -> Value fromMaybeText = maybe Null (Text . T.unpack)
83
fromMaybeText :: Maybe T.Text -> Value fromMaybeText = maybe Null (Text . T.unpack)
83
fromMaybeText = maybe Null (Text . T.unpack)
44
false
true
0
8
12
34
17
17
null
null
phischu/fragnix
tests/packages/scotty/Network.HTTP.Types.Header.hs
bsd-3-clause
hExpires = "Expires"
31
hExpires = "Expires"
31
hExpires = "Expires"
31
false
false
1
5
13
10
3
7
null
null
tcsavage/shader-cats
src/ShaderNode.hs
mit
toFn (Join ba ca) = \glob -> toFn ba glob ||| toFn ca glob
58
toFn (Join ba ca) = \glob -> toFn ba glob ||| toFn ca glob
58
toFn (Join ba ca) = \glob -> toFn ba glob ||| toFn ca glob
58
false
false
0
7
13
37
17
20
null
null
apyrgio/ganeti
src/Ganeti/Constants.hs
bsd-2-clause
instanceCommunicationNetworkLink :: String instanceCommunicationNetworkLink = "communication_rt"
96
instanceCommunicationNetworkLink :: String instanceCommunicationNetworkLink = "communication_rt"
96
instanceCommunicationNetworkLink = "communication_rt"
53
false
true
0
4
5
11
6
5
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 1955635 = 3857
34
getValueFromProduct 1955635 = 3857
34
getValueFromProduct 1955635 = 3857
34
false
false
0
5
3
9
4
5
null
null
diagrams/diagrams-contrib
src/Diagrams/Color/XKCD.hs
bsd-3-clause
blueWithAHintOfPurple = fromJust $ readHexColor "#533cc6"
57
blueWithAHintOfPurple = fromJust $ readHexColor "#533cc6"
57
blueWithAHintOfPurple = fromJust $ readHexColor "#533cc6"
57
false
false
0
6
5
13
6
7
null
null
thalerjonathan/phd
public/ArtIterating/code/haskell/PureAgentsAct/src/HeroesAndCowards/HACFrontend.hs
gpl-3.0
agentColor :: Bool -> GLO.Color agentColor True = GLO.green
59
agentColor :: Bool -> GLO.Color agentColor True = GLO.green
59
agentColor True = GLO.green
27
false
true
0
6
8
26
12
14
null
null
rawlep/EQS
sourceCode/TestDisplay.hs
mit
------------------- example 11 ---------------------------------------------------------------------- chart borders = toRenderable layout where layout = layout1_title ^= "Sample Bars" ++ btitle $ layout1_title_style ^: font_size ^= 10 $ layout1_bottom_axis ^: laxis_generate ^= autoIndexAxis alabe...
1,021
chart borders = toRenderable layout where layout = layout1_title ^= "Sample Bars" ++ btitle $ layout1_title_style ^: font_size ^= 10 $ layout1_bottom_axis ^: laxis_generate ^= autoIndexAxis alabels $ layout1_left_axis ^: laxis_override ^= (axisGridHide.axisTicksHide) $ layout1_plots ^...
919
chart borders = toRenderable layout where layout = layout1_title ^= "Sample Bars" ++ btitle $ layout1_title_style ^: font_size ^= 10 $ layout1_bottom_axis ^: laxis_generate ^= autoIndexAxis alabels $ layout1_left_axis ^: laxis_override ^= (axisGridHide.axisTicksHide) $ layout1_plots ^...
919
true
false
25
9
201
315
156
159
null
null
nevrenato/Hets_Fork
VSE/Prove.hs
gpl-2.0
linksP :: String linksP = "IN-LINKS"
36
linksP :: String linksP = "IN-LINKS"
36
linksP = "IN-LINKS"
19
false
true
0
4
5
11
6
5
null
null
kristoff3r/importify
HLint.hs
mit
warn = (case m of Right _ -> return (); Left x -> f x) ==> Universum.whenLeft m f
81
warn = (case m of Right _ -> return (); Left x -> f x) ==> Universum.whenLeft m f
81
warn = (case m of Right _ -> return (); Left x -> f x) ==> Universum.whenLeft m f
81
false
false
0
11
18
51
24
27
null
null
karamellpelle/grid
source/Game/Grid/Do.hs
gpl-3.0
-------------------------------------------------------------------------------- -- onPathNode -- | eat and wait for defined Turn pathEatWait :: Path -> IO Path pathEatWait path = do --printPath path case pathTurnState path of -- continue in direction defined by turn (t:ts) -> do ...
1,978
pathEatWait :: Path -> IO Path pathEatWait path = do --printPath path case pathTurnState path of -- continue in direction defined by turn (t:ts) -> do path' <- pathEatTurn path t return $ path' { pathTurnState = ts } -- no defined turn, eat and wait []...
1,846
pathEatWait path = do --printPath path case pathTurnState path of -- continue in direction defined by turn (t:ts) -> do path' <- pathEatTurn path t return $ path' { pathTurnState = ts } -- no defined turn, eat and wait [] -> do path'...
1,815
true
true
1
15
819
461
218
243
null
null
Cahu/krpc-hs
src/KRPCHS/SpaceCenter.hs
gpl-3.0
getDecouplerPartStreamReq :: KRPCHS.SpaceCenter.Decoupler -> KRPCStreamReq (KRPCHS.SpaceCenter.Part) getDecouplerPartStreamReq thisArg = let req = makeRequest "SpaceCenter" "Decoupler_get_Part" [makeArgument 0 thisArg] in makeStream req
245
getDecouplerPartStreamReq :: KRPCHS.SpaceCenter.Decoupler -> KRPCStreamReq (KRPCHS.SpaceCenter.Part) getDecouplerPartStreamReq thisArg = let req = makeRequest "SpaceCenter" "Decoupler_get_Part" [makeArgument 0 thisArg] in makeStream req
245
getDecouplerPartStreamReq thisArg = let req = makeRequest "SpaceCenter" "Decoupler_get_Part" [makeArgument 0 thisArg] in makeStream req
144
false
true
0
11
29
63
30
33
null
null
ozgurakgun/Idris-dev
src/Idris/Core/Evaluate.hs
bsd-3-clause
isUniverse _ = False
20
isUniverse _ = False
20
isUniverse _ = False
20
false
false
0
5
3
9
4
5
null
null
VictorDenisov/jdi
src/Language/Java/Jdi/Method.hs
gpl-2.0
declaringType (Method rt _) = rt
32
declaringType (Method rt _) = rt
32
declaringType (Method rt _) = rt
32
false
false
0
7
5
17
8
9
null
null
kylcarte/wangtiles
src/Data/Grid.hs
bsd-3-clause
gridLookup :: (CoordType c) => Grid c a -> Coord c -> Maybe a gridLookup g c = M.lookup c $ grid g
98
gridLookup :: (CoordType c) => Grid c a -> Coord c -> Maybe a gridLookup g c = M.lookup c $ grid g
98
gridLookup g c = M.lookup c $ grid g
36
false
true
0
8
22
56
26
30
null
null
pjones/xmonad-test
vendor/xmonad-contrib/XMonad/Util/EZConfig.hs
bsd-2-clause
doKeymapCheck :: XConfig l -> [(String,a)] -> ([String], [String]) doKeymapCheck conf km = (bad,dups) where ks = map ((readKeySequence conf &&& id) . fst) km bad = nub . map snd . filter (isNothing . fst) $ ks dups = map (snd . head) . filter ((>1) . length) . groupBy ((==) `...
457
doKeymapCheck :: XConfig l -> [(String,a)] -> ([String], [String]) doKeymapCheck conf km = (bad,dups) where ks = map ((readKeySequence conf &&& id) . fst) km bad = nub . map snd . filter (isNothing . fst) $ ks dups = map (snd . head) . filter ((>1) . length) . groupBy ((==) `...
457
doKeymapCheck conf km = (bad,dups) where ks = map ((readKeySequence conf &&& id) . fst) km bad = nub . map snd . filter (isNothing . fst) $ ks dups = map (snd . head) . filter ((>1) . length) . groupBy ((==) `on` fst) . sortBy (comparing fst) . map (...
390
false
true
2
19
164
211
111
100
null
null
brendanhay/gogol
gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs
mpl-2.0
-- | The standard quality image for this resource. tdStandard :: Lens' ThumbnailDetails (Maybe Thumbnail) tdStandard = lens _tdStandard (\ s a -> s{_tdStandard = a})
167
tdStandard :: Lens' ThumbnailDetails (Maybe Thumbnail) tdStandard = lens _tdStandard (\ s a -> s{_tdStandard = a})
116
tdStandard = lens _tdStandard (\ s a -> s{_tdStandard = a})
61
true
true
0
9
27
48
25
23
null
null
tidalcycles/Tidal
bin/params-header.hs
gpl-3.0
drumN "hb" = 60
15
drumN "hb" = 60
15
drumN "hb" = 60
15
false
false
0
4
3
10
4
6
null
null
jberthold/rts-serialisation
Control/Monad/Checkpoint.hs
bsd-3-clause
-- | a @'mapM_'@ with checkpoints. Equivalent to @sequenceC_ file . map f@ mapMC_ :: (Typeable b, Typeable m, MonadIO m) => FilePath -> (a -> m b) -> [a] -> m () mapMC_ file f xs = sequenceC_ file (map f xs)
218
mapMC_ :: (Typeable b, Typeable m, MonadIO m) => FilePath -> (a -> m b) -> [a] -> m () mapMC_ file f xs = sequenceC_ file (map f xs)
143
mapMC_ file f xs = sequenceC_ file (map f xs)
45
true
true
0
10
53
83
42
41
null
null
olorin/http-proxy
Test/Util.hs
bsd-2-clause
dumpHttpResponse :: HT.Status -> HT.ResponseHeaders -> IO () dumpHttpResponse s rh = do mapM_ BS.putStrLn [ "------- Response from upsteam ----------------------------------------------------" , "HTTP/1.0 ", BS.pack (show (HT.statusCode s)), " ", HT.statusMessage s ] BS.putStr . BS.conca...
395
dumpHttpResponse :: HT.Status -> HT.ResponseHeaders -> IO () dumpHttpResponse s rh = do mapM_ BS.putStrLn [ "------- Response from upsteam ----------------------------------------------------" , "HTTP/1.0 ", BS.pack (show (HT.statusCode s)), " ", HT.statusMessage s ] BS.putStr . BS.conca...
395
dumpHttpResponse s rh = do mapM_ BS.putStrLn [ "------- Response from upsteam ----------------------------------------------------" , "HTTP/1.0 ", BS.pack (show (HT.statusCode s)), " ", HT.statusMessage s ] BS.putStr . BS.concat $ map (\ (f, v) -> BS.concat [ " ", CI.original f, ": ",...
334
false
true
0
15
88
146
74
72
null
null
snapframework/io-streams
test/System/IO/Streams/Tests/ByteString.hs
bsd-3-clause
testLines :: Test testLines = testCase "bytestring/testLines" $ do fromList ["th", "e\nquick\nbrown", "\n", "", "fox"] >>= lines >>= toList >>= assertEqual "lines" ["the", "quick", "brown", "fox"] fromList [] >>= lines >>= toList >>= assertEqual "empty lines" [] fromList ["a\nb\nc\n"] >>= lines...
624
testLines :: Test testLines = testCase "bytestring/testLines" $ do fromList ["th", "e\nquick\nbrown", "\n", "", "fox"] >>= lines >>= toList >>= assertEqual "lines" ["the", "quick", "brown", "fox"] fromList [] >>= lines >>= toList >>= assertEqual "empty lines" [] fromList ["a\nb\nc\n"] >>= lines...
624
testLines = testCase "bytestring/testLines" $ do fromList ["th", "e\nquick\nbrown", "\n", "", "fox"] >>= lines >>= toList >>= assertEqual "lines" ["the", "quick", "brown", "fox"] fromList [] >>= lines >>= toList >>= assertEqual "empty lines" [] fromList ["a\nb\nc\n"] >>= lines >>= toList ...
606
false
true
0
15
121
194
101
93
null
null
ku-fpg/kansas-amber
System/Hardware/Haskino/Compiler.hs
bsd-3-clause
compileExpr (ClrBI e1 e2) = compileTwoSubExpr "clrBI32" e1 e2
61
compileExpr (ClrBI e1 e2) = compileTwoSubExpr "clrBI32" e1 e2
61
compileExpr (ClrBI e1 e2) = compileTwoSubExpr "clrBI32" e1 e2
61
false
false
0
7
8
24
11
13
null
null
snowleopard/shaking-up-ghc
src/Hadrian/Utilities.hs
bsd-3-clause
colourCode Reset = "0"
22
colourCode Reset = "0"
22
colourCode Reset = "0"
22
false
false
0
5
3
9
4
5
null
null
bergmark/hakyll
src/Hakyll/Web/Pandoc.hs
bsd-3-clause
-------------------------------------------------------------------------------- -- | Render the resource using pandoc renderPandoc :: Item String -> Item String renderPandoc = renderPandocWith defaultHakyllReaderOptions defaultHakyllWriterOptions
251
renderPandoc :: Item String -> Item String renderPandoc = renderPandocWith defaultHakyllReaderOptions defaultHakyllWriterOptions
132
renderPandoc = renderPandocWith defaultHakyllReaderOptions defaultHakyllWriterOptions
89
true
true
0
6
23
28
14
14
null
null
yamadapc/git-issues
src/Main.hs
mit
listIssues :: [String] -> IO () listIssues _ = do repo <- gitRepository store <- readOrCreateStore repo forM_ (sortOn issueNumber (storeIssues store)) $ \issue -> putStrLn $ "#" ++ show (issueNumber issue) ++ " " ++ issueTitle issue ++ (if issueState i...
370
listIssues :: [String] -> IO () listIssues _ = do repo <- gitRepository store <- readOrCreateStore repo forM_ (sortOn issueNumber (storeIssues store)) $ \issue -> putStrLn $ "#" ++ show (issueNumber issue) ++ " " ++ issueTitle issue ++ (if issueState i...
370
listIssues _ = do repo <- gitRepository store <- readOrCreateStore repo forM_ (sortOn issueNumber (storeIssues store)) $ \issue -> putStrLn $ "#" ++ show (issueNumber issue) ++ " " ++ issueTitle issue ++ (if issueState issue == IssueStateClosed then " ...
338
false
true
0
15
117
122
59
63
null
null
elitak/frag
src/Object.hs
gpl-2.0
isAICube _ = False
34
isAICube _ = False
34
isAICube _ = False
34
false
false
0
4
19
10
4
6
null
null
lovasko/rset
src/Data/Set/Range/Combine.hs
bsd-2-clause
intersect ((a,b) : xs) ((c,d) : ys) = merge $ go $ overlap (a,b) (c,d) where go FstSmaller = intersect xs ((c,d) : ys) go FstInside = (a,b) : intersect xs ((b,d) : ys) go FstOverlap = (c,b) : intersect xs ((b,d) : ys) go SndInside = (c,d) : intersect ((d,b) : xs...
473
intersect ((a,b) : xs) ((c,d) : ys) = merge $ go $ overlap (a,b) (c,d) where go FstSmaller = intersect xs ((c,d) : ys) go FstInside = (a,b) : intersect xs ((b,d) : ys) go FstOverlap = (c,b) : intersect xs ((b,d) : ys) go SndInside = (c,d) : intersect ((d,b) : xs...
473
intersect ((a,b) : xs) ((c,d) : ys) = merge $ go $ overlap (a,b) (c,d) where go FstSmaller = intersect xs ((c,d) : ys) go FstInside = (a,b) : intersect xs ((b,d) : ys) go FstOverlap = (c,b) : intersect xs ((b,d) : ys) go SndInside = (c,d) : intersect ((d,b) : xs...
473
false
false
0
9
155
262
145
117
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/basicTypes/VarSet.hs
bsd-3-clause
extendVarSet = addOneToUniqSet
33
extendVarSet = addOneToUniqSet
33
extendVarSet = addOneToUniqSet
33
false
false
0
4
5
6
3
3
null
null
guillaume-nargeot/project-euler-haskell
src/ProjectEuler/Problem038.hs
bsd-3-clause
isPandigital :: [Integer] -> Bool isPandigital = (== [1..9]) . sort
67
isPandigital :: [Integer] -> Bool isPandigital = (== [1..9]) . sort
67
isPandigital = (== [1..9]) . sort
33
false
true
0
7
10
31
18
13
null
null
isaiah/cis194
src/StackVM.hs
mit
execute (BVal s1:BVal s2:ss) (And : xs) = execute (s':ss) xs where s' = BVal (s1 && s2)
95
execute (BVal s1:BVal s2:ss) (And : xs) = execute (s':ss) xs where s' = BVal (s1 && s2)
95
execute (BVal s1:BVal s2:ss) (And : xs) = execute (s':ss) xs where s' = BVal (s1 && s2)
95
false
false
2
9
25
70
32
38
null
null
project-horizon/framework
src/lib/Language/PolyDSL/Transformation/JavaScript/Modules.hs
mit
importDeclaration (DOM.Import i) = foreach "v" (moduleRegister ... i) (when (call (moduleRegister ... i ... "hasOwnProperty") [ident "v"]) (expr (call (ident "console.log") [ident "v"])))
199
importDeclaration (DOM.Import i) = foreach "v" (moduleRegister ... i) (when (call (moduleRegister ... i ... "hasOwnProperty") [ident "v"]) (expr (call (ident "console.log") [ident "v"])))
199
importDeclaration (DOM.Import i) = foreach "v" (moduleRegister ... i) (when (call (moduleRegister ... i ... "hasOwnProperty") [ident "v"]) (expr (call (ident "console.log") [ident "v"])))
199
false
false
0
12
35
92
45
47
null
null
jessekempf/hsh
src/HSH/Evaluate.hs
bsd-2-clause
replEvaluate :: ShellAST -> StateT ShellState IO () replEvaluate ast = do currentState <- get newState <- lift $ refreshPath currentState put newState evaluate ast -- | Read, evaluate, and print a single command.
222
replEvaluate :: ShellAST -> StateT ShellState IO () replEvaluate ast = do currentState <- get newState <- lift $ refreshPath currentState put newState evaluate ast -- | Read, evaluate, and print a single command.
222
replEvaluate ast = do currentState <- get newState <- lift $ refreshPath currentState put newState evaluate ast -- | Read, evaluate, and print a single command.
170
false
true
0
10
43
66
28
38
null
null
ssaavedra/liquidhaskell
src/Language/Haskell/Liquid/Constraint/Fresh.hs
bsd-3-clause
trueRefType (RFun _ t t' _) = rFun <$> fresh <*> true t <*> true t'
69
trueRefType (RFun _ t t' _) = rFun <$> fresh <*> true t <*> true t'
69
trueRefType (RFun _ t t' _) = rFun <$> fresh <*> true t <*> true t'
69
false
false
8
6
17
47
22
25
null
null
mrakgr/futhark
src/Futhark/Representation/AST/Attributes/Types.hs
bsd-3-clause
hasStaticShape (Array bt (ExtShape shape) u) = Array bt <$> (Shape <$> mapM isFree shape) <*> pure u where isFree (Free s) = Just s isFree (Ext _) = Nothing
169
hasStaticShape (Array bt (ExtShape shape) u) = Array bt <$> (Shape <$> mapM isFree shape) <*> pure u where isFree (Free s) = Just s isFree (Ext _) = Nothing
169
hasStaticShape (Array bt (ExtShape shape) u) = Array bt <$> (Shape <$> mapM isFree shape) <*> pure u where isFree (Free s) = Just s isFree (Ext _) = Nothing
169
false
false
1
9
42
84
40
44
null
null
foreverbell/unlimited-plt-toys
tapl/simplesub/Context.hs
bsd-3-clause
addName :: Context -> String -> TermType -> Context addName (Context ctx) name ty = Context ((name, ty) : ctx)
110
addName :: Context -> String -> TermType -> Context addName (Context ctx) name ty = Context ((name, ty) : ctx)
110
addName (Context ctx) name ty = Context ((name, ty) : ctx)
58
false
true
0
8
19
52
27
25
null
null
anchor/vaultaire-collector-ceilometer
lib/Vaultaire/Collector/Ceilometer/Process/Snapshot.hs
mit
processSnapshotSizeEvent :: MonadIO m => Metric -> V.Collector o s m [(Address, SourceDict, TimeStamp, Word64)] processSnapshotSizeEvent = processEvent getSnapshotSizePayload
174
processSnapshotSizeEvent :: MonadIO m => Metric -> V.Collector o s m [(Address, SourceDict, TimeStamp, Word64)] processSnapshotSizeEvent = processEvent getSnapshotSizePayload
174
processSnapshotSizeEvent = processEvent getSnapshotSizePayload
62
false
true
0
9
18
51
27
24
null
null
davidbrewer/xmonad-ubuntu-conf
xmonad.hs
mit
-- wrap urgent workspace with these myUrgentWSRight = "}"
57
myUrgentWSRight = "}"
21
myUrgentWSRight = "}"
21
true
false
0
4
8
7
4
3
null
null
jjwchoy/hotdb
tests/TransformationTest.hs
mit
testTransformChildSequenceDelete :: TestTree testTransformChildSequenceDelete = let dop1 = O.DirectedOperation "3/foo" $ O.IntInc 1 dop2 = O.DirectedOperation "foo/bar" $ O.IntInc 1 dop3 = O.DirectedOperation "" $ O.IntInc 1 dop4 = O.DirectedOperation "2/foo" $ O.IntInc 1 ss1 = O.DirectedOpera...
1,226
testTransformChildSequenceDelete :: TestTree testTransformChildSequenceDelete = let dop1 = O.DirectedOperation "3/foo" $ O.IntInc 1 dop2 = O.DirectedOperation "foo/bar" $ O.IntInc 1 dop3 = O.DirectedOperation "" $ O.IntInc 1 dop4 = O.DirectedOperation "2/foo" $ O.IntInc 1 ss1 = O.DirectedOpera...
1,226
testTransformChildSequenceDelete = let dop1 = O.DirectedOperation "3/foo" $ O.IntInc 1 dop2 = O.DirectedOperation "foo/bar" $ O.IntInc 1 dop3 = O.DirectedOperation "" $ O.IntInc 1 dop4 = O.DirectedOperation "2/foo" $ O.IntInc 1 ss1 = O.DirectedOperation "" $ O.SequenceDelete 2 ss2 = O.Di...
1,181
false
true
0
14
228
427
194
233
null
null
ribag/ganeti-experiments
src/Ganeti/Config.hs
gpl-2.0
-- | Retrieves the instance backend params, missing values filled with cluster -- defaults. getFilledInstBeParams :: ConfigData -> Instance -> ErrorResult FilledBeParams getFilledInstBeParams cfg inst = do let beParamMap = fromContainer . clusterBeparams . configCluster $ cfg parentParams <- getItem "FilledBeParams...
542
getFilledInstBeParams :: ConfigData -> Instance -> ErrorResult FilledBeParams getFilledInstBeParams cfg inst = do let beParamMap = fromContainer . clusterBeparams . configCluster $ cfg parentParams <- getItem "FilledBeParams" C.ppDefault beParamMap return $ fillBeParams parentParams (instBeparams inst) -- | Retr...
450
getFilledInstBeParams cfg inst = do let beParamMap = fromContainer . clusterBeparams . configCluster $ cfg parentParams <- getItem "FilledBeParams" C.ppDefault beParamMap return $ fillBeParams parentParams (instBeparams inst) -- | Retrieves the instance os params, missing values filled with cluster -- defaults. ...
372
true
true
0
13
77
91
43
48
null
null
noughtmare/yi
yi-core/src/Yi/Config/Default.hs
gpl-2.0
defaultConfig :: Config defaultConfig = publishedActions .~ defaultPublishedActions $ Config { startFrontEnd = error "panic: no frontend compiled in! (configure with -fvty or another frontend.)" , configUI = UIConfig { configFontSize = Just 10 , configFontName = Nothing ...
1,305
defaultConfig :: Config defaultConfig = publishedActions .~ defaultPublishedActions $ Config { startFrontEnd = error "panic: no frontend compiled in! (configure with -fvty or another frontend.)" , configUI = UIConfig { configFontSize = Just 10 , configFontName = Nothing ...
1,305
defaultConfig = publishedActions .~ defaultPublishedActions $ Config { startFrontEnd = error "panic: no frontend compiled in! (configure with -fvty or another frontend.)" , configUI = UIConfig { configFontSize = Just 10 , configFontName = Nothing , configScrollW...
1,281
false
true
0
10
433
214
133
81
null
null
nushio3/ghc
compiler/deSugar/Coverage.hs
bsd-3-clause
addTickHsExpr (HsCoreAnn src nm e) = liftM3 HsCoreAnn (return src) (return nm) (addTickLHsExpr e)
153
addTickHsExpr (HsCoreAnn src nm e) = liftM3 HsCoreAnn (return src) (return nm) (addTickLHsExpr e)
153
addTickHsExpr (HsCoreAnn src nm e) = liftM3 HsCoreAnn (return src) (return nm) (addTickLHsExpr e)
153
false
false
0
7
69
46
22
24
null
null
greole/calendula
Tocify.hs
bsd-3-clause
tocEL :: Parser Toc tocEL = do many (noneOf "#\n") <* char '\n' return EmptyToc
87
tocEL :: Parser Toc tocEL = do many (noneOf "#\n") <* char '\n' return EmptyToc
87
tocEL = do many (noneOf "#\n") <* char '\n' return EmptyToc
67
false
true
0
11
22
45
18
27
null
null
tadeuzagallo/verve-lang
src/Typing/TypeChecker.hs
mit
inferStmts :: TcEnv -> [U.Stmt] -> Result (TcEnv, ([T.Stmt], Maybe Type)) inferStmts state stmts = runScoped (i_stmts stmts) state
132
inferStmts :: TcEnv -> [U.Stmt] -> Result (TcEnv, ([T.Stmt], Maybe Type)) inferStmts state stmts = runScoped (i_stmts stmts) state
132
inferStmts state stmts = runScoped (i_stmts stmts) state
58
false
true
0
11
20
63
33
30
null
null
RossMeikleham/GPC
src/GPC/Parser.hs
bsd-2-clause
-- | Parse literal literal :: Parser (Literal SrcPos) literal = Ch <$> getPos <*> ch <|> Str <$> getPos <*> str <|> Bl <$> getPos <*> bool <|> Number <$> getPos <*> num
202
literal :: Parser (Literal SrcPos) literal = Ch <$> getPos <*> ch <|> Str <$> getPos <*> str <|> Bl <$> getPos <*> bool <|> Number <$> getPos <*> num
183
literal = Ch <$> getPos <*> ch <|> Str <$> getPos <*> str <|> Bl <$> getPos <*> bool <|> Number <$> getPos <*> num
148
true
true
0
15
67
65
33
32
null
null
kawu/pedestrian-dag
src/Data/DAG_Backup.hs
bsd-2-clause
-- | Resolve the edge identifier. edge :: DAG a b -> EdgeID -> Edge b edge d x = case M.lookup x (edgeMap d) of Nothing -> error "edge: invalid identifier" Just y -> y ------------------------------------------------------------------------- -- Mapping --------------------------------------------------------...
379
edge :: DAG a b -> EdgeID -> Edge b edge d x = case M.lookup x (edgeMap d) of Nothing -> error "edge: invalid identifier" Just y -> y ------------------------------------------------------------------------- -- Mapping ------------------------------------------------------------------------- -- | Map funct...
345
edge d x = case M.lookup x (edgeMap d) of Nothing -> error "edge: invalid identifier" Just y -> y ------------------------------------------------------------------------- -- Mapping ------------------------------------------------------------------------- -- | Map function over the node values.
309
true
true
0
8
60
77
37
40
null
null
maoe/language-javascript
src/Language/JavaScript/Pretty/Printer.hs
bsd-3-clause
rn (NN (JSDoWhile d x1 w lb x2 rb x3)) foo = rJS ([d,x1,w,lb,x2,rb,x3]) foo
86
rn (NN (JSDoWhile d x1 w lb x2 rb x3)) foo = rJS ([d,x1,w,lb,x2,rb,x3]) foo
86
rn (NN (JSDoWhile d x1 w lb x2 rb x3)) foo = rJS ([d,x1,w,lb,x2,rb,x3]) foo
86
false
false
0
9
25
64
35
29
null
null
jjingram/satori
app/Main.hs
bsd-3-clause
main :: IO () main = do args <- getArgs case args of [] -> shell (return ()) [fname] -> shell (Main.load [fname] >> browse [] >> quit ()) ["test", fname] -> shell (Main.load [fname] >> browse [] >> quit ()) _ -> putStrLn "invalid arguments"
260
main :: IO () main = do args <- getArgs case args of [] -> shell (return ()) [fname] -> shell (Main.load [fname] >> browse [] >> quit ()) ["test", fname] -> shell (Main.load [fname] >> browse [] >> quit ()) _ -> putStrLn "invalid arguments"
260
main = do args <- getArgs case args of [] -> shell (return ()) [fname] -> shell (Main.load [fname] >> browse [] >> quit ()) ["test", fname] -> shell (Main.load [fname] >> browse [] >> quit ()) _ -> putStrLn "invalid arguments"
246
false
true
1
16
65
147
69
78
null
null
snoyberg/ghc
compiler/types/Type.hs
bsd-3-clause
typeKind (CastTy _ty co) = pSnd $ coercionKind co
55
typeKind (CastTy _ty co) = pSnd $ coercionKind co
55
typeKind (CastTy _ty co) = pSnd $ coercionKind co
55
false
false
0
6
14
25
11
14
null
null
triplepointfive/hogldev
tutorial22/Tutorial22.hs
mit
renderSceneCB :: Mesh -> LightingTechnique -> IORef DirectionLight -> IORef GLfloat -> IORef Camera -> DisplayCallback renderSceneCB mesh effect dirLight gScale cameraRef = do cameraRef $~! cameraOnRender clear [ColorBuffer, DepthBuffer] ...
1,124
renderSceneCB :: Mesh -> LightingTechnique -> IORef DirectionLight -> IORef GLfloat -> IORef Camera -> DisplayCallback renderSceneCB mesh effect dirLight gScale cameraRef = do cameraRef $~! cameraOnRender clear [ColorBuffer, DepthBuffer] ...
1,124
renderSceneCB mesh effect dirLight gScale cameraRef = do cameraRef $~! cameraOnRender clear [ColorBuffer, DepthBuffer] gScaleVal <- readIORef gScale camera <- readIORef cameraRef directionLight <- readIORef dirLight setLightingWVP effect $ getTrans WVPPipeline { worldInfo =...
935
false
true
0
13
373
283
132
151
null
null
annenkov/contracts
Haskell/Contract/Type.hs
mit
-- | computes hash of a contract, considering symmetry of 'Both' constructor hashContr :: [Var] -> Contract -> Hash -> Hash hashContr vs c a = let ps = hashPrimes in case c of Zero -> hash (ps!!0) a -- symmetric Both c1 c2 -> hashContr vs c1 0 + hashContr vs c2 0 + a TransfO...
941
hashContr :: [Var] -> Contract -> Hash -> Hash hashContr vs c a = let ps = hashPrimes in case c of Zero -> hash (ps!!0) a -- symmetric Both c1 c2 -> hashContr vs c1 0 + hashContr vs c2 0 + a TransfOne cur p1 p2 -> hashStr (show cur) (hashStr p1 (hashStr p2 (has...
864
hashContr vs c a = let ps = hashPrimes in case c of Zero -> hash (ps!!0) a -- symmetric Both c1 c2 -> hashContr vs c1 0 + hashContr vs c2 0 + a TransfOne cur p1 p2 -> hashStr (show cur) (hashStr p1 (hashStr p2 (hash (ps!!1) a))) If e c1 c2 -> ...
817
true
true
0
20
327
362
179
183
null
null
ladinu/cs457
src/Drum.hs
mit
getTrackBeat (instr, (NoPlay:xs)) = enr :+: getTrackBeat (instr, xs)
68
getTrackBeat (instr, (NoPlay:xs)) = enr :+: getTrackBeat (instr, xs)
68
getTrackBeat (instr, (NoPlay:xs)) = enr :+: getTrackBeat (instr, xs)
68
false
false
0
7
8
36
19
17
null
null
SAdams601/HaRe
test/testdata/Demote/WhereIn5.hs
bsd-3-clause
--A definition can be demoted to the local 'where' binding of a friend declaration, --if it is only used by this friend declaration. --Demoting a definition narrows down the scope of the definition. --In this example, demote the top level 'pow' to 'sq' --This example aims to test demoting a function/pattern binding mu...
433
sumSquares x y = sq x + sq y where sq 0=0 sq z=z^pow {-There is a comment-}
100
sumSquares x y = sq x + sq y where sq 0=0 sq z=z^pow {-There is a comment-}
100
true
false
7
5
97
65
26
39
null
null
vTurbine/ghc
compiler/cmm/CLabel.hs
bsd-3-clause
labelType (CaseLabel _ _) = CodeLabel
59
labelType (CaseLabel _ _) = CodeLabel
59
labelType (CaseLabel _ _) = CodeLabel
59
false
false
0
6
27
18
8
10
null
null
UoYCS-plasma/LazySmallCheck2012
suite/performance/Benchmarks/Countdown.hs
bsd-3-clause
eval' (App o l r) = [apply o x y | x <- eval' l, y <- eval' r, valid' o x y]
80
eval' (App o l r) = [apply o x y | x <- eval' l, y <- eval' r, valid' o x y]
80
eval' (App o l r) = [apply o x y | x <- eval' l, y <- eval' r, valid' o x y]
80
false
false
0
8
26
62
29
33
null
null
josefs/sbv
SBVTestSuite/TestSuite/Basics/ArithSolver.hs
bsd-3-clause
w64s :: [Word64] w64s = xsUnsigned
34
w64s :: [Word64] w64s = xsUnsigned
34
w64s = xsUnsigned
17
false
true
0
7
5
21
9
12
null
null
ghc-android/ghc
libraries/base/System/Posix/Internals.hs
bsd-3-clause
setCooked :: FD -> Bool -> IO () setCooked fd cooked = tcSetAttr fd $ \ p_tios -> do -- turn on/off ICANON lflag <- c_lflag p_tios :: IO CTcflag let new_lflag | cooked = lflag .|. (fromIntegral const_icanon) | otherwise = lflag .&. complement (fromIntegral const_icanon) poke_c_lf...
673
setCooked :: FD -> Bool -> IO () setCooked fd cooked = tcSetAttr fd $ \ p_tios -> do -- turn on/off ICANON lflag <- c_lflag p_tios :: IO CTcflag let new_lflag | cooked = lflag .|. (fromIntegral const_icanon) | otherwise = lflag .&. complement (fromIntegral const_icanon) poke_c_lf...
673
setCooked fd cooked = tcSetAttr fd $ \ p_tios -> do -- turn on/off ICANON lflag <- c_lflag p_tios :: IO CTcflag let new_lflag | cooked = lflag .|. (fromIntegral const_icanon) | otherwise = lflag .&. complement (fromIntegral const_icanon) poke_c_lflag p_tios (new_lflag :: CTcflag)...
640
false
true
2
18
209
224
106
118
null
null
burz/sonada
Foundation.hs
apache-2.0
minifym :: a -> Either b a minifym = Right
42
minifym :: a -> Either b a minifym = Right
42
minifym = Right
15
false
true
0
7
9
26
11
15
null
null
brendanhay/gogol
gogol-people/gen/Network/Google/People/Types/Product.hs
mpl-2.0
-- | The type of the phone number. The type can be custom or one of these -- predefined values: * \`home\` * \`work\` * \`mobile\` * \`homeFax\` * -- \`workFax\` * \`otherFax\` * \`pager\` * \`workMobile\` * \`workPager\` -- * \`main\` * \`googleVoice\` * \`other\` pnType :: Lens' PhoneNumber (Maybe Text) pnType = lens...
354
pnType :: Lens' PhoneNumber (Maybe Text) pnType = lens _pnType (\ s a -> s{_pnType = a})
88
pnType = lens _pnType (\ s a -> s{_pnType = a})
47
true
true
0
9
62
49
28
21
null
null
dancor/melang
src/Lang/De/DewiktNouns.hs
mit
readStoryWds :: IO (Set.Set DT.Text) readStoryWds = Set.fromList . pullWds <$> DT.readFile "/home/danl/l/l/de/audio/book/Herrn-Arnes-Schatz/Kapitel-01.txt"
163
readStoryWds :: IO (Set.Set DT.Text) readStoryWds = Set.fromList . pullWds <$> DT.readFile "/home/danl/l/l/de/audio/book/Herrn-Arnes-Schatz/Kapitel-01.txt"
163
readStoryWds = Set.fromList . pullWds <$> DT.readFile "/home/danl/l/l/de/audio/book/Herrn-Arnes-Schatz/Kapitel-01.txt"
126
false
true
3
7
20
47
19
28
null
null
alanz/htelehash
src/Network/TeleHash/Old/Utils.hs
bsd-3-clause
getChan :: HashName -> ChannelId -> TeleHash (Maybe RawChannel) getChan hn cid = do -- logT $ "getChan:" ++ show (hn,cid) hc <- getHNsafe hn "getChan" return $ Map.lookup cid (hChans hc)
192
getChan :: HashName -> ChannelId -> TeleHash (Maybe RawChannel) getChan hn cid = do -- logT $ "getChan:" ++ show (hn,cid) hc <- getHNsafe hn "getChan" return $ Map.lookup cid (hChans hc)
192
getChan hn cid = do -- logT $ "getChan:" ++ show (hn,cid) hc <- getHNsafe hn "getChan" return $ Map.lookup cid (hChans hc)
128
false
true
0
10
37
66
31
35
null
null
RAFIRAF/HASKELL
IO/arg-test.hs
mit
main = do args <- getArgs name <- getProgName putStrLn "The program's name is:" putStrLn name putStrLn "The arguments are:" mapM putStrLn args
148
main = do args <- getArgs name <- getProgName putStrLn "The program's name is:" putStrLn name putStrLn "The arguments are:" mapM putStrLn args
148
main = do args <- getArgs name <- getProgName putStrLn "The program's name is:" putStrLn name putStrLn "The arguments are:" mapM putStrLn args
148
false
false
1
8
28
50
18
32
null
null
phaazon/OpenGLRaw
src/Graphics/Rendering/OpenGL/Raw/Tokens.hs
bsd-3-clause
gl_BLEND_EQUATION_RGB_OES :: GLenum gl_BLEND_EQUATION_RGB_OES = 0x8009
70
gl_BLEND_EQUATION_RGB_OES :: GLenum gl_BLEND_EQUATION_RGB_OES = 0x8009
70
gl_BLEND_EQUATION_RGB_OES = 0x8009
34
false
true
0
4
5
11
6
5
null
null
ben-schulz/Idris-dev
src/Idris/Elab/Quasiquote.hs
bsd-3-clause
extractUnquotes n (PLet fc name nfc ty val body) = do (ty', ex1) <- extractUnquotes n ty (val', ex2) <- extractUnquotes n val (body', ex3) <- extractUnquotes n body return (PLet fc name nfc ty' val' body', ex1 ++ ex2 ++ ex3)
247
extractUnquotes n (PLet fc name nfc ty val body) = do (ty', ex1) <- extractUnquotes n ty (val', ex2) <- extractUnquotes n val (body', ex3) <- extractUnquotes n body return (PLet fc name nfc ty' val' body', ex1 ++ ex2 ++ ex3)
247
extractUnquotes n (PLet fc name nfc ty val body) = do (ty', ex1) <- extractUnquotes n ty (val', ex2) <- extractUnquotes n val (body', ex3) <- extractUnquotes n body return (PLet fc name nfc ty' val' body', ex1 ++ ex2 ++ ex3)
247
false
false
0
10
64
114
56
58
null
null
sashabu/libcspm
src/Data/Graph/Wrapper/Internal.hs
bsd-3-clause
indexGVertex'_maybe :: Ord i => Array G.Vertex i -> i -> Maybe G.Vertex indexGVertex'_maybe key_map k = go 0 (snd (bounds key_map)) where go a b | a > b = Nothing | otherwise = case compare k (key_map ! mid) of LT -> go a (mid - 1) EQ -> Just mid ...
446
indexGVertex'_maybe :: Ord i => Array G.Vertex i -> i -> Maybe G.Vertex indexGVertex'_maybe key_map k = go 0 (snd (bounds key_map)) where go a b | a > b = Nothing | otherwise = case compare k (key_map ! mid) of LT -> go a (mid - 1) EQ -> Just mid ...
446
indexGVertex'_maybe key_map k = go 0 (snd (bounds key_map)) where go a b | a > b = Nothing | otherwise = case compare k (key_map ! mid) of LT -> go a (mid - 1) EQ -> Just mid GT -> go (mid + 1) b where mid = (a + b) `...
374
false
true
0
11
181
173
85
88
null
null
mindriot101/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
tilde 'U' = "Ũ"
15
tilde 'U' = "Ũ"
15
tilde 'U' = "Ũ"
15
false
false
0
5
3
9
4
5
null
null
oldmanmike/ghc
compiler/specialise/Rules.hs
bsd-3-clause
match_cos _ _ cos1 cos2 = pprTrace "match_cos: not same length" (ppr cos1 $$ ppr cos2) Nothing
94
match_cos _ _ cos1 cos2 = pprTrace "match_cos: not same length" (ppr cos1 $$ ppr cos2) Nothing
94
match_cos _ _ cos1 cos2 = pprTrace "match_cos: not same length" (ppr cos1 $$ ppr cos2) Nothing
94
false
false
0
8
16
35
16
19
null
null