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
GaloisInc/halvm-ghc
utils/genapply/Main.hs
bsd-3-clause
enterFastPath regstatus no_load_regs args_in_regs args | Just tag <- tagForArity (length args) = enterFastPathHelper tag regstatus no_load_regs args_in_regs args
169
enterFastPath regstatus no_load_regs args_in_regs args | Just tag <- tagForArity (length args) = enterFastPathHelper tag regstatus no_load_regs args_in_regs args
169
enterFastPath regstatus no_load_regs args_in_regs args | Just tag <- tagForArity (length args) = enterFastPathHelper tag regstatus no_load_regs args_in_regs args
169
false
false
0
11
26
52
21
31
null
null
jlamothe/ru-deposit
ru-deposit.hs
gpl-3.0
graph :: String -> IO () graph addr = putStrLn $ "http://ripplecharts.com/#/graph/" ++ addr
91
graph :: String -> IO () graph addr = putStrLn $ "http://ripplecharts.com/#/graph/" ++ addr
91
graph addr = putStrLn $ "http://ripplecharts.com/#/graph/" ++ addr
66
false
true
0
7
13
31
15
16
null
null
lordi/flowskell
src/Flowskell/Interpreter.hs
gpl-2.0
evalFrame state env = tryEval env (List [Atom "every-frame-entry-point"]) $ \ error -> do reportError "<source>" error maybeLastEnv <- get $ lastEnvironment state when (isJust maybeLastEnv) $ environment state $= maybeLastEnv
239
evalFrame state env = tryEval env (List [Atom "every-frame-entry-point"]) $ \ error -> do reportError "<source>" error maybeLastEnv <- get $ lastEnvironment state when (isJust maybeLastEnv) $ environment state $= maybeLastEnv
239
evalFrame state env = tryEval env (List [Atom "every-frame-entry-point"]) $ \ error -> do reportError "<source>" error maybeLastEnv <- get $ lastEnvironment state when (isJust maybeLastEnv) $ environment state $= maybeLastEnv
239
false
false
1
13
44
88
37
51
null
null
ben-schulz/Idris-dev
src/Idris/Elab/Quasiquote.hs
bsd-3-clause
extractTUnquotes n (Claim name t) = extract1 n (Claim name) t
61
extractTUnquotes n (Claim name t) = extract1 n (Claim name) t
61
extractTUnquotes n (Claim name t) = extract1 n (Claim name) t
61
false
false
0
7
10
32
15
17
null
null
ezyang/ghc-shake
BuildModule.hs
bsd-3-clause
-- | Compute the 'FilePath' which we will log warnings to. buildModuleLogPath :: DynFlags -> BuildModule -> FilePath buildModuleLogPath dflags (BuildModule file mod is_boot) = let basename = dropExtension file mod_basename = moduleNameSlashes (moduleName mod) in dropExtension (mkHiPath dflags basename m...
388
buildModuleLogPath :: DynFlags -> BuildModule -> FilePath buildModuleLogPath dflags (BuildModule file mod is_boot) = let basename = dropExtension file mod_basename = moduleNameSlashes (moduleName mod) in dropExtension (mkHiPath dflags basename mod_basename) <.> (if is_boot then "log-boot" el...
329
buildModuleLogPath dflags (BuildModule file mod is_boot) = let basename = dropExtension file mod_basename = moduleNameSlashes (moduleName mod) in dropExtension (mkHiPath dflags basename mod_basename) <.> (if is_boot then "log-boot" else "log")
271
true
true
0
11
75
91
46
45
null
null
mkovacs/kanjibrowse
src/main/Glyph.hs
gpl-3.0
renderTree :: Glyph -> X.Element renderTree = \case glyph@Group{..} -> X.unode "span" $ [renderSvg glyph, X.unode "ul" $ map (X.unode "li" . renderTree) groupSubGlyphs] glyph@Path{..} -> X.unode "span" $ renderSvg glyph
224
renderTree :: Glyph -> X.Element renderTree = \case glyph@Group{..} -> X.unode "span" $ [renderSvg glyph, X.unode "ul" $ map (X.unode "li" . renderTree) groupSubGlyphs] glyph@Path{..} -> X.unode "span" $ renderSvg glyph
224
renderTree = \case glyph@Group{..} -> X.unode "span" $ [renderSvg glyph, X.unode "ul" $ map (X.unode "li" . renderTree) groupSubGlyphs] glyph@Path{..} -> X.unode "span" $ renderSvg glyph
191
false
true
0
15
35
105
52
53
null
null
seckcoder/vector
Data/Vector/Storable.hs
bsd-3-clause
(++) = (G.++)
13
(++) = (G.++)
13
(++) = (G.++)
13
false
false
1
6
2
16
8
8
null
null
anton-dessiatov/ghc
compiler/coreSyn/CoreUnfold.hs
bsd-3-clause
specUnfolding _dflags subst new_bndrs spec_args (CoreUnfolding { uf_src = src, uf_tmpl = tmpl , uf_is_top = top_lvl , uf_guidance = old_guidance }) | isStableSource src -- See Note [Specialising unfoldings] , UnfWhen { ug_arity = old_arity ...
950
specUnfolding _dflags subst new_bndrs spec_args (CoreUnfolding { uf_src = src, uf_tmpl = tmpl , uf_is_top = top_lvl , uf_guidance = old_guidance }) | isStableSource src -- See Note [Specialising unfoldings] , UnfWhen { ug_arity = old_arity ...
950
specUnfolding _dflags subst new_bndrs spec_args (CoreUnfolding { uf_src = src, uf_tmpl = tmpl , uf_is_top = top_lvl , uf_guidance = old_guidance }) | isStableSource src -- See Note [Specialising unfoldings] , UnfWhen { ug_arity = old_arity ...
950
false
false
0
14
359
177
95
82
null
null
lamdu/lamdu
src/main/System/Process/Git.hs
gpl-3.0
hash :: TH.ExpQ hash = runGit ["rev-parse", "HEAD"] <&> words <&> head >>= TH.stringE
85
hash :: TH.ExpQ hash = runGit ["rev-parse", "HEAD"] <&> words <&> head >>= TH.stringE
85
hash = runGit ["rev-parse", "HEAD"] <&> words <&> head >>= TH.stringE
69
false
true
0
9
13
36
19
17
null
null
parapluu/encore
src/ir/AST/PrettyPrinter.hs
bsd-3-clause
ppExpr Eos {} = "eos"
21
ppExpr Eos {} = "eos"
21
ppExpr Eos {} = "eos"
21
false
false
1
5
4
15
6
9
null
null
nevrenato/Hets_Fork
Common/IRI.hs
gpl-2.0
-- | Test if string contains a valid CURIE isCurie :: String -> Bool isCurie = isValidParse curie
97
isCurie :: String -> Bool isCurie = isValidParse curie
54
isCurie = isValidParse curie
28
true
true
0
5
17
19
10
9
null
null
Heather/clay
src/Clay/Attributes.hs
bsd-3-clause
wrap = "wrap"
13
wrap = "wrap"
13
wrap = "wrap"
13
false
false
1
5
2
10
3
7
null
null
gregorycollins/cabal2macpkg
Distribution/OSX/InstallerScript.hs
bsd-3-clause
------------------------------------------------------------------------ mkPkgRef :: (ArrowXml a) => String -> String -> [Char] -> a n XmlTree mkPkgRef iD installKBytes pkgFileName = mkelem "pkg-ref" [ sattr "id" iD , sattr "installKBytes" installKBytes , sattr "version" ...
412
mkPkgRef :: (ArrowXml a) => String -> String -> [Char] -> a n XmlTree mkPkgRef iD installKBytes pkgFileName = mkelem "pkg-ref" [ sattr "id" iD , sattr "installKBytes" installKBytes , sattr "version" "" , sattr "auth" "Root" ] [ txt $ "...
339
mkPkgRef iD installKBytes pkgFileName = mkelem "pkg-ref" [ sattr "id" iD , sattr "installKBytes" installKBytes , sattr "version" "" , sattr "auth" "Root" ] [ txt $ "#" ++ pkgFileName ]
269
true
true
0
9
130
106
51
55
null
null
vTurbine/ghc
ghc/Main.hs
bsd-3-clause
isShowNumVersionMode :: Mode -> Bool isShowNumVersionMode (Left ShowNumVersion) = True
86
isShowNumVersionMode :: Mode -> Bool isShowNumVersionMode (Left ShowNumVersion) = True
86
isShowNumVersionMode (Left ShowNumVersion) = True
49
false
true
0
7
9
24
12
12
null
null
fmapfmapfmap/amazonka
amazonka-rds/test/Test/AWS/Gen/RDS.hs
mpl-2.0
testDeleteEventSubscriptionResponse :: DeleteEventSubscriptionResponse -> TestTree testDeleteEventSubscriptionResponse = res "DeleteEventSubscriptionResponse" "fixture/DeleteEventSubscriptionResponse.proto" rDS (Proxy :: Proxy DeleteEventSubscription)
267
testDeleteEventSubscriptionResponse :: DeleteEventSubscriptionResponse -> TestTree testDeleteEventSubscriptionResponse = res "DeleteEventSubscriptionResponse" "fixture/DeleteEventSubscriptionResponse.proto" rDS (Proxy :: Proxy DeleteEventSubscription)
267
testDeleteEventSubscriptionResponse = res "DeleteEventSubscriptionResponse" "fixture/DeleteEventSubscriptionResponse.proto" rDS (Proxy :: Proxy DeleteEventSubscription)
184
false
true
0
7
30
33
17
16
null
null
kazu-yamamoto/dns
Network/DNS/Utils.hs
bsd-3-clause
splitDomain :: Domain -> Either DNSError (BS.ByteString, Domain) splitDomain = parseLabel 0x2e
94
splitDomain :: Domain -> Either DNSError (BS.ByteString, Domain) splitDomain = parseLabel 0x2e
94
splitDomain = parseLabel 0x2e
29
false
true
0
8
11
31
16
15
null
null
sonyandy/var
src/Data/Tuple/Storable.hs
bsd-3-clause
size :: Storable a => t a -> Int size = sizeOf . unproxy
56
size :: Storable a => t a -> Int size = sizeOf . unproxy
56
size = sizeOf . unproxy
23
false
true
1
8
13
37
15
22
null
null
nevrenato/Hets_Fork
OWL2/XML.hs
gpl-2.0
properFacet :: ConstrainingFacet -> ConstrainingFacet properFacet cf | iriType cf == Full = let p = showQU cf \\ "http://www.w3.org/2001/XMLSchema#" in case p of "minInclusive" -> facetToIRI MININCLUSIVE "minExclusive" -> facetToIRI MINEXCLUSIVE "maxInclusive" -> ...
438
properFacet :: ConstrainingFacet -> ConstrainingFacet properFacet cf | iriType cf == Full = let p = showQU cf \\ "http://www.w3.org/2001/XMLSchema#" in case p of "minInclusive" -> facetToIRI MININCLUSIVE "minExclusive" -> facetToIRI MINEXCLUSIVE "maxInclusive" -> ...
438
properFacet cf | iriType cf == Full = let p = showQU cf \\ "http://www.w3.org/2001/XMLSchema#" in case p of "minInclusive" -> facetToIRI MININCLUSIVE "minExclusive" -> facetToIRI MINEXCLUSIVE "maxInclusive" -> facetToIRI MAXINCLUSIVE "maxExclusive" -> ...
384
false
true
1
11
130
105
47
58
null
null
alexander-at-github/eta
compiler/ETA/Core/CoreFVs.hs
bsd-3-clause
-- | Finds free variables in several expressions selected by a predicate exprsSomeFreeVars :: InterestingVarFun -- Says which 'Var's are interesting -> [CoreExpr] -> VarSet exprsSomeFreeVars fv_cand = mapUnionVarSet (exprSomeFreeVars fv_cand)
279
exprsSomeFreeVars :: InterestingVarFun -- Says which 'Var's are interesting -> [CoreExpr] -> VarSet exprsSomeFreeVars fv_cand = mapUnionVarSet (exprSomeFreeVars fv_cand)
206
exprsSomeFreeVars fv_cand = mapUnionVarSet (exprSomeFreeVars fv_cand)
69
true
true
0
7
67
36
19
17
null
null
mattneary/GenerationY
src/main.hs
mit
applyEach :: [a -> b] -> [a] -> [b] applyEach fs xs = map (uncurry ($)) (zip fs xs)
83
applyEach :: [a -> b] -> [a] -> [b] applyEach fs xs = map (uncurry ($)) (zip fs xs)
83
applyEach fs xs = map (uncurry ($)) (zip fs xs)
47
false
true
0
7
18
58
31
27
null
null
brendanhay/gogol
gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/ConsentStores/Consents/DeleteRevision.hs
mpl-2.0
-- | Required. The resource name of the Consent revision to delete, of the -- form -- \`projects\/{project_id}\/locations\/{location_id}\/datasets\/{dataset_id}\/consentStores\/{consent_store_id}\/consents\/{consent_id}\'{revision_id}\`. -- An INVALID_ARGUMENT error occurs if \`revision_id\` is not specified in -- the ...
491
pldscscdrName :: Lens' ProjectsLocationsDataSetsConsentStoresConsentsDeleteRevision Text pldscscdrName = lens _pldscscdrName (\ s a -> s{_pldscscdrName = a})
165
pldscscdrName = lens _pldscscdrName (\ s a -> s{_pldscscdrName = a})
76
true
true
0
8
55
47
26
21
null
null
olsner/ghc
libraries/template-haskell/Language/Haskell/TH/Syntax.hs
bsd-3-clause
occString :: OccName -> String occString (OccName occ) = occ
60
occString :: OccName -> String occString (OccName occ) = occ
60
occString (OccName occ) = occ
29
false
true
0
7
9
24
12
12
null
null
martin-kolinek/some-board-game
src/Player/Dom.hs
mit
drawHireButton :: PlayerWidget t m x => m () drawHireButton = drawActionButton canHireWorker hireWorker "Hire worker"
117
drawHireButton :: PlayerWidget t m x => m () drawHireButton = drawActionButton canHireWorker hireWorker "Hire worker"
117
drawHireButton = drawActionButton canHireWorker hireWorker "Hire worker"
72
false
true
0
8
15
39
17
22
null
null
pascal-knodel/haskell-craft
Templates/Exercise Enumeration/Haskell_Craft.hs
mit
wct :: Integer -> Integer -> IO () -- Write chapter file. wct chapter exercises = do writeFile ("C'" ++ ( show chapter ) ++ ".hs") ( ct chapter exercises )
159
wct :: Integer -> Integer -> IO () wct chapter exercises = do writeFile ("C'" ++ ( show chapter ) ++ ".hs") ( ct chapter exercises )
134
wct chapter exercises = do writeFile ("C'" ++ ( show chapter ) ++ ".hs") ( ct chapter exercises )
99
true
true
0
13
34
68
32
36
null
null
facebookincubator/duckling
Duckling/Time/DA/Rules.hs
bsd-3-clause
ruleRelativeMinutesTotillbeforeIntegerHourofday :: Rule ruleRelativeMinutesTotillbeforeIntegerHourofday = Rule { name = "relative minutes to|till|before <integer> (hour-of-day)" , pattern = [ Predicate $ isIntegerBetween 1 59 , regex "i" , Predicate isAnHourOfDay ] , prod = \tokens -> case tokens ...
456
ruleRelativeMinutesTotillbeforeIntegerHourofday :: Rule ruleRelativeMinutesTotillbeforeIntegerHourofday = Rule { name = "relative minutes to|till|before <integer> (hour-of-day)" , pattern = [ Predicate $ isIntegerBetween 1 59 , regex "i" , Predicate isAnHourOfDay ] , prod = \tokens -> case tokens ...
456
ruleRelativeMinutesTotillbeforeIntegerHourofday = Rule { name = "relative minutes to|till|before <integer> (hour-of-day)" , pattern = [ Predicate $ isIntegerBetween 1 59 , regex "i" , Predicate isAnHourOfDay ] , prod = \tokens -> case tokens of (token:_:Token Time td:_) -> do n <- ge...
400
false
true
0
16
108
125
63
62
null
null
gridaphobe/ghc
compiler/main/DynFlags.hs
bsd-3-clause
opt_L :: DynFlags -> [String] opt_L dflags = sOpt_L (settings dflags)
85
opt_L :: DynFlags -> [String] opt_L dflags = sOpt_L (settings dflags)
85
opt_L dflags = sOpt_L (settings dflags)
39
false
true
0
7
26
30
15
15
null
null
vito/atomo
src/Atomo/Environment.hs
bsd-3-clause
targets' _ p = error $ "no targets for " ++ show p
50
targets' _ p = error $ "no targets for " ++ show p
50
targets' _ p = error $ "no targets for " ++ show p
50
false
false
0
6
12
22
10
12
null
null
stschiff/rarecoal
src-rarecoal/Main.hs
gpl-3.0
parseSimCommandOpts :: OP.Parser SimCommandOpt parseSimCommandOpts = SimCommandOpt <$> parseGeneralOpts <*> parseModelOpts <*> parseParamOpts <*> parseNrHaps <*> parseRho <*> parseChromLength where parseNrHaps = OP.option (map read . splitOn "," <$> OP.str) $ OP.long "nrHaps" <> OP.short 'n' <> OP.met...
897
parseSimCommandOpts :: OP.Parser SimCommandOpt parseSimCommandOpts = SimCommandOpt <$> parseGeneralOpts <*> parseModelOpts <*> parseParamOpts <*> parseNrHaps <*> parseRho <*> parseChromLength where parseNrHaps = OP.option (map read . splitOn "," <$> OP.str) $ OP.long "nrHaps" <> OP.short 'n' <> OP.met...
897
parseSimCommandOpts = SimCommandOpt <$> parseGeneralOpts <*> parseModelOpts <*> parseParamOpts <*> parseNrHaps <*> parseRho <*> parseChromLength where parseNrHaps = OP.option (map read . splitOn "," <$> OP.str) $ OP.long "nrHaps" <> OP.short 'n' <> OP.metavar "N1,N2,..." <> OP.help "specify th...
850
false
true
9
10
203
251
111
140
null
null
egison/egison
hs-src/Language/Egison/Primitives/IO.hs
mit
writeString :: String -> PrimitiveFunc writeString = oneArg' $ \val -> do s <- fromEgison val return $ makeIO' $ liftIO $ T.putStr s
136
writeString :: String -> PrimitiveFunc writeString = oneArg' $ \val -> do s <- fromEgison val return $ makeIO' $ liftIO $ T.putStr s
136
writeString = oneArg' $ \val -> do s <- fromEgison val return $ makeIO' $ liftIO $ T.putStr s
97
false
true
0
11
27
54
26
28
null
null
DataStewardshipPortal/ds-wizard
Transform/src/KMTransform.hs
apache-2.0
transformChapter :: Model.Chapter -> FormItem transformChapter ch = FormEngine.FormItem.Chapter { chDescriptor = defaultFIDescriptor {iLabel = Just (chapTitle ch), chapterId = Just $ chapID ch} , chItems = intro ++ map (transformQuestion ch) (chapQuests ch) } where intro = case chapText ch of ...
464
transformChapter :: Model.Chapter -> FormItem transformChapter ch = FormEngine.FormItem.Chapter { chDescriptor = defaultFIDescriptor {iLabel = Just (chapTitle ch), chapterId = Just $ chapID ch} , chItems = intro ++ map (transformQuestion ch) (chapQuests ch) } where intro = case chapText ch of ...
464
transformChapter ch = FormEngine.FormItem.Chapter { chDescriptor = defaultFIDescriptor {iLabel = Just (chapTitle ch), chapterId = Just $ chapID ch} , chItems = intro ++ map (transformQuestion ch) (chapQuests ch) } where intro = case chapText ch of Just introText -> [InfoFI {ifiDesc...
418
false
true
1
14
106
159
82
77
null
null
fumieval/machines
examples/Examples.hs
bsd-3-clause
-- | bad slurping machine crashes :: Handle -> MachineT IO k String crashes h = repeatedly $ lift (hGetLine h) >>= yield
120
crashes :: Handle -> MachineT IO k String crashes h = repeatedly $ lift (hGetLine h) >>= yield
94
crashes h = repeatedly $ lift (hGetLine h) >>= yield
52
true
true
0
9
22
43
21
22
null
null
d0kt0r0/InnerEar
src/InnerEar/Exercises/AddedWhiteNoise.hs
gpl-3.0
configMap:: Map Int (String,Config) configMap = fromList $ zip [0::Int,1..] $ fmap (\x-> (show x++" dB", x)) configs
116
configMap:: Map Int (String,Config) configMap = fromList $ zip [0::Int,1..] $ fmap (\x-> (show x++" dB", x)) configs
116
configMap = fromList $ zip [0::Int,1..] $ fmap (\x-> (show x++" dB", x)) configs
80
false
true
0
11
17
68
37
31
null
null
iquiw/network
Network/Socket/ByteString/Lazy/Posix.hs
bsd-3-clause
sendAll :: Socket -- ^ Connected socket -> ByteString -- ^ Data to send -> IO () sendAll sock bs = do sent <- send sock bs let bs' = L.drop sent bs unless (L.null bs') $ sendAll sock bs'
214
sendAll :: Socket -- ^ Connected socket -> ByteString -- ^ Data to send -> IO () sendAll sock bs = do sent <- send sock bs let bs' = L.drop sent bs unless (L.null bs') $ sendAll sock bs'
214
sendAll sock bs = do sent <- send sock bs let bs' = L.drop sent bs unless (L.null bs') $ sendAll sock bs'
111
false
true
0
11
67
82
38
44
null
null
badp/ganeti
src/Ganeti/HTools/Program/Hsqueeze.hs
gpl-2.0
-- | Options list and functions. options :: IO [OptType] options = do luxi <- oLuxiSocket return [ luxi , oDataFile , oMinResources , oTargetResources , oSaveCluster , oPrintCommands , oVerbose , oNoHeaders ] -- | The list of arguments supported by the program.
302
options :: IO [OptType] options = do luxi <- oLuxiSocket return [ luxi , oDataFile , oMinResources , oTargetResources , oSaveCluster , oPrintCommands , oVerbose , oNoHeaders ] -- | The list of arguments supported by the program.
269
options = do luxi <- oLuxiSocket return [ luxi , oDataFile , oMinResources , oTargetResources , oSaveCluster , oPrintCommands , oVerbose , oNoHeaders ] -- | The list of arguments supported by the program.
245
true
true
0
8
84
56
32
24
null
null
joehendrix/sized-builder
src/Data/Binary/Builder/Sized.hs
bsd-3-clause
singleton :: Word8 -> Builder singleton w = SB 1 (U.singleton w)
64
singleton :: Word8 -> Builder singleton w = SB 1 (U.singleton w)
64
singleton w = SB 1 (U.singleton w)
34
false
true
0
8
11
31
15
16
null
null
qpliu/esolang
gbagbo/hs/TestResolve.hs
gpl-3.0
testBag5 :: Assertion testBag5 = testResolve "testBag5" "f a=[a]." checkResult where checkResult [(_,Def (Identifier _ "f") 1 (ExprBag _ [(1,ExprBound _ "a" 0)]))] = True checkResult _ = False
226
testBag5 :: Assertion testBag5 = testResolve "testBag5" "f a=[a]." checkResult where checkResult [(_,Def (Identifier _ "f") 1 (ExprBag _ [(1,ExprBound _ "a" 0)]))] = True checkResult _ = False
226
testBag5 = testResolve "testBag5" "f a=[a]." checkResult where checkResult [(_,Def (Identifier _ "f") 1 (ExprBag _ [(1,ExprBound _ "a" 0)]))] = True checkResult _ = False
204
false
true
0
13
62
85
44
41
null
null
frontrowed/stratosphere
library-gen/Stratosphere/ResourceProperties/ApplicationAutoScalingScalingPolicyStepAdjustment.hs
mit
-- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-applicationautoscaling-scalingpolicy-stepscalingpolicyconfiguration-stepadjustment.html#cfn-applicationautoscaling-scalingpolicy-stepscalingpolicyconfiguration-stepadjustment-scalingadjustment aasspsaScalingAdjustment :: Lens' Application...
560
aasspsaScalingAdjustment :: Lens' ApplicationAutoScalingScalingPolicyStepAdjustment (Val Integer) aasspsaScalingAdjustment = lens _applicationAutoScalingScalingPolicyStepAdjustmentScalingAdjustment (\s a -> s { _applicationAutoScalingScalingPolicyStepAdjustmentScalingAdjustment = a })
285
aasspsaScalingAdjustment = lens _applicationAutoScalingScalingPolicyStepAdjustmentScalingAdjustment (\s a -> s { _applicationAutoScalingScalingPolicyStepAdjustmentScalingAdjustment = a })
187
true
true
1
9
21
49
25
24
null
null
jrclogic/SMCDEL
src/SMCDEL/Examples/RussianCards.hs
gpl-2.0
rusKNS :: KnowStruct rusSCN@(rusKNS,_) = (KnS rcProps law [ (i, obs i) | i <- rcPlayers ], defaultDeal) where law = boolBddOf $ Conj [ allCardsGiven, allCardsUnique, distribute331 ] obs i = [ P (3 * k + rcNumOf i) | k<-[0..6] ] defaultDeal = [P 0,P 3,P 6,P 10,P 13,P 16,P 20]
281
rusKNS :: KnowStruct rusSCN@(rusKNS,_) = (KnS rcProps law [ (i, obs i) | i <- rcPlayers ], defaultDeal) where law = boolBddOf $ Conj [ allCardsGiven, allCardsUnique, distribute331 ] obs i = [ P (3 * k + rcNumOf i) | k<-[0..6] ] defaultDeal = [P 0,P 3,P 6,P 10,P 13,P 16,P 20]
281
rusSCN@(rusKNS,_) = (KnS rcProps law [ (i, obs i) | i <- rcPlayers ], defaultDeal) where law = boolBddOf $ Conj [ allCardsGiven, allCardsUnique, distribute331 ] obs i = [ P (3 * k + rcNumOf i) | k<-[0..6] ] defaultDeal = [P 0,P 3,P 6,P 10,P 13,P 16,P 20]
260
false
true
0
11
58
165
88
77
null
null
ezyang/ghc
compiler/main/GhcMake.hs
bsd-3-clause
discardProg :: HscEnv -> HscEnv discardProg hsc_env = discardIC $ hsc_env { hsc_mod_graph = emptyMG , hsc_HPT = emptyHomePackageTable }
161
discardProg :: HscEnv -> HscEnv discardProg hsc_env = discardIC $ hsc_env { hsc_mod_graph = emptyMG , hsc_HPT = emptyHomePackageTable }
161
discardProg hsc_env = discardIC $ hsc_env { hsc_mod_graph = emptyMG , hsc_HPT = emptyHomePackageTable }
129
false
true
0
7
45
36
20
16
null
null
seckcoder/vector
Data/Vector.hs
bsd-3-clause
drop = G.drop
13
drop = G.drop
13
drop = G.drop
13
false
false
1
6
2
12
4
8
null
null
facebookincubator/duckling
Duckling/Numeral/HR/Rules.hs
bsd-3-clause
ruleInteger :: Rule ruleInteger = Rule { name = "integer (0..19)" , pattern = [ regex "(ni(s|š)ta|ni(s|š)tica|nula|jedanaest|dvanaest|trinaest|jeda?n(a|u|o(ga?)?)?|dv(i?je)?(a|o)?(ma)?|tri(ma)?|(č|c)etiri|(č|c)etrnaest|petnaest|pet|(s|š)esnaest|(š|s)est|sedamnaest|sedam|osamnaest|osam|devetnaest|devet)" ] ...
1,563
ruleInteger :: Rule ruleInteger = Rule { name = "integer (0..19)" , pattern = [ regex "(ni(s|š)ta|ni(s|š)tica|nula|jedanaest|dvanaest|trinaest|jeda?n(a|u|o(ga?)?)?|dv(i?je)?(a|o)?(ma)?|tri(ma)?|(č|c)etiri|(č|c)etrnaest|petnaest|pet|(s|š)esnaest|(š|s)est|sedamnaest|sedam|osamnaest|osam|devetnaest|devet)" ] ...
1,563
ruleInteger = Rule { name = "integer (0..19)" , pattern = [ regex "(ni(s|š)ta|ni(s|š)tica|nula|jedanaest|dvanaest|trinaest|jeda?n(a|u|o(ga?)?)?|dv(i?je)?(a|o)?(ma)?|tri(ma)?|(č|c)etiri|(č|c)etrnaest|petnaest|pet|(s|š)esnaest|(š|s)est|sedamnaest|sedam|osamnaest|osam|devetnaest|devet)" ] , prod = \tokens ->...
1,543
false
true
0
18
497
417
194
223
null
null
khajavi/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
setextHeader :: GenParser Char ParserState Block setextHeader = try $ do text <- many1Till inline newline underlineChar <- oneOf setextHChars many (char underlineChar) blanklines let level = (fromMaybe 0 $ findIndex (== underlineChar) setextHChars) + 1 return $ Header level (normalizeSpaces text) -- -- hru...
331
setextHeader :: GenParser Char ParserState Block setextHeader = try $ do text <- many1Till inline newline underlineChar <- oneOf setextHChars many (char underlineChar) blanklines let level = (fromMaybe 0 $ findIndex (== underlineChar) setextHChars) + 1 return $ Header level (normalizeSpaces text) -- -- hru...
331
setextHeader = try $ do text <- many1Till inline newline underlineChar <- oneOf setextHChars many (char underlineChar) blanklines let level = (fromMaybe 0 $ findIndex (== underlineChar) setextHChars) + 1 return $ Header level (normalizeSpaces text) -- -- hrule block --
282
false
true
0
15
59
112
53
59
null
null
ddssff/pandoc
src/Text/Pandoc/Readers/LaTeX.hs
gpl-2.0
hacek 'O' = "Ǒ"
15
hacek 'O' = "Ǒ"
15
hacek 'O' = "Ǒ"
15
false
false
0
5
3
9
4
5
null
null
beni55/haste-compiler
libraries/ghc-7.10/base/System/IO.hs
bsd-3-clause
readFile :: FilePath -> IO String readFile name = openFile name ReadMode >>= hGetContents
99
readFile :: FilePath -> IO String readFile name = openFile name ReadMode >>= hGetContents
99
readFile name = openFile name ReadMode >>= hGetContents
58
false
true
0
6
23
30
14
16
null
null
mpickering/hlint
src/CmdLine.hs
bsd-3-clause
getHintFile dataDir x = do let poss = nub $ concat [x : [x <.> "hs" | takeExtension x /= ".hs"] | x <- [x,dataDir </> x]] f poss poss where f o [] = error $ unlines $ [ "Couldn't find file: " ++ x, "Tried with:"] ++ map (" "++) o f o (x:xs) = do b...
382
getHintFile dataDir x = do let poss = nub $ concat [x : [x <.> "hs" | takeExtension x /= ".hs"] | x <- [x,dataDir </> x]] f poss poss where f o [] = error $ unlines $ [ "Couldn't find file: " ++ x, "Tried with:"] ++ map (" "++) o f o (x:xs) = do b...
382
getHintFile dataDir x = do let poss = nub $ concat [x : [x <.> "hs" | takeExtension x /= ".hs"] | x <- [x,dataDir </> x]] f poss poss where f o [] = error $ unlines $ [ "Couldn't find file: " ++ x, "Tried with:"] ++ map (" "++) o f o (x:xs) = do b...
382
false
false
1
17
155
169
84
85
null
null
forste/haReFork
StrategyLib-4.0-beta/library/NameTheme.hs
bsd-3-clause
freeNames :: (Eq name, Term t) => TU [(name,tpe)] Identity -- ^ Identify declarations -> TU [name] Identity -- ^ Identify references -> t -- ^ Input term -> [name] -- ^ Free names freeNames declared referenced = runIdentity . applyTU (all_recTU (op2TU combine) ...
501
freeNames :: (Eq name, Term t) => TU [(name,tpe)] Identity -- ^ Identify declarations -> TU [name] Identity -- ^ Identify references -> t -- ^ Input term -> [name] freeNames declared referenced = runIdentity . applyTU (all_recTU (op2TU combine) (op...
483
freeNames declared referenced = runIdentity . applyTU (all_recTU (op2TU combine) (op2TU (,) declared referenced)) where combine (decs,refs) recs = (refs `union` recs) \\ (map fst decs) -- | Generic free name analysis algorithm with types
275
true
true
4
11
152
158
82
76
null
null
arianvp/binary-serialise-cbor
Data/Binary/Serialise/CBOR.hs
bsd-3-clause
-- | Serialise a @'BS.ByteString'@ and write it directly to the -- specified file. writeFileSerialise :: Serialise a => FilePath -- ^ The file to write to. -> a -- ^ The value to be serialized and written. -> IO () writeFileSerialise fname x = ...
374
writeFileSerialise :: Serialise a => FilePath -- ^ The file to write to. -> a -- ^ The value to be serialized and written. -> IO () writeFileSerialise fname x = withFile fname WriteMode $ \hnd -> hPutSerialise hnd x
291
writeFileSerialise fname x = withFile fname WriteMode $ \hnd -> hPutSerialise hnd x
87
true
true
0
9
129
59
30
29
null
null
erikd/wai
warp/Network/Wai/Handler/Warp/HTTP2/Manager.hs
mit
-- | Starting a thread pool manager. -- Its action is initially set to 'return ()' and should be set -- by 'setAction'. This allows that the action can include -- the manager itself. start :: Settings -> IO Manager start set = do q <- newTQueueIO ref <- newIORef (\_ -> return ()) timmgr <- T.initializ...
1,040
start :: Settings -> IO Manager start set = do q <- newTQueueIO ref <- newIORef (\_ -> return ()) timmgr <- T.initialize $ settingsTimeout set * 1000000 void $ forkIO $ go q Set.empty ref timmgr return $ Manager q ref where go q !tset0 ref timmgr = do x <- atomically $ readTQueue q ...
851
start set = do q <- newTQueueIO ref <- newIORef (\_ -> return ()) timmgr <- T.initialize $ settingsTimeout set * 1000000 void $ forkIO $ go q Set.empty ref timmgr return $ Manager q ref where go q !tset0 ref timmgr = do x <- atomically $ readTQueue q case x of Stop ...
819
true
true
0
14
394
311
138
173
null
null
input-output-hk/pos-haskell-prototype
core/src/Pos/Core/ProtocolConstants.hs
mit
-- We don't have a special newtype for it, so it can be any -- 'Fractional'. I think adding newtype here would be overkill -- (@gromak). Also this value is not actually part of the protocol, -- but rather implementation detail, so we don't need to ensure -- conrete precision. Apart from that, in reality we know that it...
623
pcChainQualityThreshold :: Fractional f => ProtocolConstants -> f pcChainQualityThreshold = kChainQualityThreshold . pcBlkSecurityParam
135
pcChainQualityThreshold = kChainQualityThreshold . pcBlkSecurityParam
69
true
true
0
6
102
35
22
13
null
null
computation-hs/comp-models
Regex.hs
gpl-2.0
match (Kleene x) s = (match Epsilon s) || or [(match x sa)&&(match (Kleene x) sb) | (sa,sb) <- partitions] where partitions = [splitAt n s | n <- [1..length s]]
164
match (Kleene x) s = (match Epsilon s) || or [(match x sa)&&(match (Kleene x) sb) | (sa,sb) <- partitions] where partitions = [splitAt n s | n <- [1..length s]]
164
match (Kleene x) s = (match Epsilon s) || or [(match x sa)&&(match (Kleene x) sb) | (sa,sb) <- partitions] where partitions = [splitAt n s | n <- [1..length s]]
164
false
false
0
12
34
107
54
53
null
null
Teaspot-Studio/Urho3D-Haskell
src/Graphics/Urho3D/Scene/Node.hs
mit
nodeSetEnabledRecursive :: (Parent Node a, Pointer p a, MonadIO m) => p -- ^ Node pointer or child -> Bool -- ^ enable -> m () nodeSetEnabledRecursive p v = liftIO $ do let ptr = parentPointer p v' = fromBool v [C.exp| void { $(Node* ptr)->SetEnabledRecursive($(int v') != 0) } |] -- | Set owner connectio...
337
nodeSetEnabledRecursive :: (Parent Node a, Pointer p a, MonadIO m) => p -- ^ Node pointer or child -> Bool -- ^ enable -> m () nodeSetEnabledRecursive p v = liftIO $ do let ptr = parentPointer p v' = fromBool v [C.exp| void { $(Node* ptr)->SetEnabledRecursive($(int v') != 0) } |] -- | Set owner connectio...
337
nodeSetEnabledRecursive p v = liftIO $ do let ptr = parentPointer p v' = fromBool v [C.exp| void { $(Node* ptr)->SetEnabledRecursive($(int v') != 0) } |] -- | Set owner connection for networking.
206
false
true
0
11
73
95
48
47
null
null
tjunier/mlgsc
test/TestPepModel.hs
mit
main = do runTestTT tests
29
main = do runTestTT tests
29
main = do runTestTT tests
29
false
false
0
7
8
12
5
7
null
null
pasberth/binal1
Language/Binal/Verifier.hs
mit
examineNames :: AST -> [NotInScope] examineNames ast = evalState (examineNames' ast) Util.primitives
100
examineNames :: AST -> [NotInScope] examineNames ast = evalState (examineNames' ast) Util.primitives
100
examineNames ast = evalState (examineNames' ast) Util.primitives
64
false
true
0
7
11
34
17
17
null
null
ComputationWithBoundedResources/ara-inference
src/Data/Rewriting/ARA/CompletelyDefined.hs
mit
addChldsCtr :: (Show v, Show f) => [Term (Int, f) v] -> Term (Int, f) v -> [Term (Int, f) v] addChldsCtr ctrs p@Var{} = [p]
123
addChldsCtr :: (Show v, Show f) => [Term (Int, f) v] -> Term (Int, f) v -> [Term (Int, f) v] addChldsCtr ctrs p@Var{} = [p]
123
addChldsCtr ctrs p@Var{} = [p]
30
false
true
0
10
25
93
49
44
null
null
mpahrens/fun-with-propagators
src/Main.hs
mit
mycell :: ST s (Cell s Double) mycell = cellWith mymerge
56
mycell :: ST s (Cell s Double) mycell = cellWith mymerge
56
mycell = cellWith mymerge
25
false
true
2
6
10
35
13
22
null
null
hansbugge/cubicaltt
TypeChecker.hs
mit
checkPathSystem :: Ter -> Val -> System Ter -> Typing (System Val) checkPathSystem t0 va ps = do rho <- asks env v <- T.sequence $ mapWithKey (\alpha pAlpha -> local (faceEnv alpha) $ do rhoAlpha <- asks env (a0,a1) <- checkPath (va `face` alpha) pAlpha unlessM (a0 === eval rhoAlpha t0...
576
checkPathSystem :: Ter -> Val -> System Ter -> Typing (System Val) checkPathSystem t0 va ps = do rho <- asks env v <- T.sequence $ mapWithKey (\alpha pAlpha -> local (faceEnv alpha) $ do rhoAlpha <- asks env (a0,a1) <- checkPath (va `face` alpha) pAlpha unlessM (a0 === eval rhoAlpha t0)...
575
checkPathSystem t0 va ps = do rho <- asks env v <- T.sequence $ mapWithKey (\alpha pAlpha -> local (faceEnv alpha) $ do rhoAlpha <- asks env (a0,a1) <- checkPath (va `face` alpha) pAlpha unlessM (a0 === eval rhoAlpha t0) $ throwError $ "Incompatible system " ++ showSystem ps ++...
508
false
true
0
25
184
211
98
113
null
null
ekmett/ghc
compiler/main/DynFlags.hs
bsd-3-clause
unSetExtensionFlag' f dflags = xopt_unset dflags f
50
unSetExtensionFlag' f dflags = xopt_unset dflags f
50
unSetExtensionFlag' f dflags = xopt_unset dflags f
50
false
false
1
5
6
21
7
14
null
null
AndreasVoellmy/openflow
src/Network/Data/OF13/Message.hs
bsd-3-clause
putOXM oxmof = do putOXMClass putOXMField (fieldCode oxmof) (oxmHasMask' oxmof) putWord8 $ fromIntegral (oxmLen oxmof - tlv_header_len) case oxmof of InPort p -> putWord32be p InPhyPort p -> putWord32be p Metadata w w' hasMask -> do putWord64be w when hasMask $ put...
1,271
putOXM oxmof = do putOXMClass putOXMField (fieldCode oxmof) (oxmHasMask' oxmof) putWord8 $ fromIntegral (oxmLen oxmof - tlv_header_len) case oxmof of InPort p -> putWord32be p InPhyPort p -> putWord32be p Metadata w w' hasMask -> do putWord64be w when hasMask $ put...
1,271
putOXM oxmof = do putOXMClass putOXMField (fieldCode oxmof) (oxmHasMask' oxmof) putWord8 $ fromIntegral (oxmLen oxmof - tlv_header_len) case oxmof of InPort p -> putWord32be p InPhyPort p -> putWord32be p Metadata w w' hasMask -> do putWord64be w when hasMask $ put...
1,271
false
false
0
17
407
427
181
246
null
null
databrary/databrary
src/Controller/Party.hs
agpl-3.0
adminPartiesHandler :: Action --TODO: GET only adminPartiesHandler = withAuth $ do checkMemberADMIN pf <- runForm (Just $ htmlPartyAdmin mempty []) partySearchForm p <- findParties pf peeks $ blankForm . htmlPartyAdmin pf p
232
adminPartiesHandler :: Action adminPartiesHandler = withAuth $ do checkMemberADMIN pf <- runForm (Just $ htmlPartyAdmin mempty []) partySearchForm p <- findParties pf peeks $ blankForm . htmlPartyAdmin pf p
214
adminPartiesHandler = withAuth $ do checkMemberADMIN pf <- runForm (Just $ htmlPartyAdmin mempty []) partySearchForm p <- findParties pf peeks $ blankForm . htmlPartyAdmin pf p
184
true
true
0
13
40
71
33
38
null
null
sdiehl/ghc
compiler/main/HscTypes.hs
bsd-3-clause
numToTrustInfo n = error $ "numToTrustInfo: bad input number! (" ++ show n ++ ")"
81
numToTrustInfo n = error $ "numToTrustInfo: bad input number! (" ++ show n ++ ")"
81
numToTrustInfo n = error $ "numToTrustInfo: bad input number! (" ++ show n ++ ")"
81
false
false
1
7
14
28
11
17
null
null
julmue/UntypedLambda
src/Language/Lambda/Syntax/Nameless/Exp.hs
bsd-3-clause
fold v a l lt (Lam alpha scope) = l alpha scope' where scope' = (hoistScope (fold v a l lt) scope)
104
fold v a l lt (Lam alpha scope) = l alpha scope' where scope' = (hoistScope (fold v a l lt) scope)
104
fold v a l lt (Lam alpha scope) = l alpha scope' where scope' = (hoistScope (fold v a l lt) scope)
104
false
false
0
8
27
58
28
30
null
null
beni55/snap-server
src/Snap/Http/Server/Config.hs
bsd-3-clause
-- | Whether to write server status updates to stderr getVerbose :: Config m a -> Maybe Bool getVerbose = verbose
120
getVerbose :: Config m a -> Maybe Bool getVerbose = verbose
66
getVerbose = verbose
20
true
true
0
6
27
24
12
12
null
null
joshcough/L5-Haskell
src/L/L3/L3.hs
mit
l3Compiler1 :: Compiler1 L3 L2 l3Compiler1 = Compiler1 (\_ _ -> return . compileL3ToL2) "L3"
92
l3Compiler1 :: Compiler1 L3 L2 l3Compiler1 = Compiler1 (\_ _ -> return . compileL3ToL2) "L3"
92
l3Compiler1 = Compiler1 (\_ _ -> return . compileL3ToL2) "L3"
61
false
true
0
8
14
35
18
17
null
null
michaxm/haskell-hdfs-thrift-client
src-gen-thrift/ThriftHadoopFileSystem.hs
bsd-3-clause
decode_SetReplication_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> SetReplication_args decode_SetReplication_args iprot bs = to_SetReplication_args $ T.deserializeVal iprot (T.T_STRUCT typemap_SetReplication_args) bs
237
decode_SetReplication_args :: (T.Protocol p, T.Transport t) => p t -> LBS.ByteString -> SetReplication_args decode_SetReplication_args iprot bs = to_SetReplication_args $ T.deserializeVal iprot (T.T_STRUCT typemap_SetReplication_args) bs
237
decode_SetReplication_args iprot bs = to_SetReplication_args $ T.deserializeVal iprot (T.T_STRUCT typemap_SetReplication_args) bs
129
false
true
0
9
23
69
34
35
null
null
brendanhay/gogol
gogol-compute/gen/Network/Google/Resource/Compute/TargetHTTPSProxies/SetSSLCertificates.hs
mpl-2.0
-- | Multipart request metadata. thpsscPayload :: Lens' TargetHTTPSProxiesSetSSLCertificates TargetHTTPSProxiesSetSSLCertificatesRequest thpsscPayload = lens _thpsscPayload (\ s a -> s{_thpsscPayload = a})
213
thpsscPayload :: Lens' TargetHTTPSProxiesSetSSLCertificates TargetHTTPSProxiesSetSSLCertificatesRequest thpsscPayload = lens _thpsscPayload (\ s a -> s{_thpsscPayload = a})
180
thpsscPayload = lens _thpsscPayload (\ s a -> s{_thpsscPayload = a})
76
true
true
1
9
28
46
22
24
null
null
radekm/crep
Core/Regex.hs
bsd-3-clause
listCaptures (RepeatU _ a) = listCaptures a
44
listCaptures (RepeatU _ a) = listCaptures a
44
listCaptures (RepeatU _ a) = listCaptures a
44
false
false
0
7
7
20
9
11
null
null
ocharles/hackage-server
Distribution/Server/Packages/PackageIndex.hs
bsd-3-clause
-- | The number of package versions -- (i.e., we should have @length . allPackages == numPackageVersions@) numPackageVersions ::PackageIndex pkg -> Int numPackageVersions (PackageIndex m) = sum . map (length . snd) $ Map.toList m
229
numPackageVersions ::PackageIndex pkg -> Int numPackageVersions (PackageIndex m) = sum . map (length . snd) $ Map.toList m
122
numPackageVersions (PackageIndex m) = sum . map (length . snd) $ Map.toList m
77
true
true
0
9
34
52
26
26
null
null
GaloisInc/halvm-ghc
compiler/simplCore/SimplUtils.hs
bsd-3-clause
------------------- contIsRhsOrArg :: SimplCont -> Bool contIsRhsOrArg (Stop {}) = True
93
contIsRhsOrArg :: SimplCont -> Bool contIsRhsOrArg (Stop {}) = True
73
contIsRhsOrArg (Stop {}) = True
37
true
true
0
7
16
26
14
12
null
null
dysinger/amazonka
amazonka-opsworks/gen/Network/AWS/OpsWorks/UpdateMyUserProfile.hs
mpl-2.0
-- | 'UpdateMyUserProfile' constructor. -- -- The fields accessible through corresponding lenses are: -- -- * 'umupSshPublicKey' @::@ 'Maybe' 'Text' -- updateMyUserProfile :: UpdateMyUserProfile updateMyUserProfile = UpdateMyUserProfile { _umupSshPublicKey = Nothing }
276
updateMyUserProfile :: UpdateMyUserProfile updateMyUserProfile = UpdateMyUserProfile { _umupSshPublicKey = Nothing }
124
updateMyUserProfile = UpdateMyUserProfile { _umupSshPublicKey = Nothing }
81
true
true
0
6
39
25
17
8
null
null
whitehead1415/cql
src/Database/CQL/Protocol/Codec.hs
mpl-2.0
getValue V2 (SetColumn t) = CqlSet <$> (getList $ do len <- decodeShort replicateM (fromIntegral len) (withBytes 2 (getNative t)))
142
getValue V2 (SetColumn t) = CqlSet <$> (getList $ do len <- decodeShort replicateM (fromIntegral len) (withBytes 2 (getNative t)))
142
getValue V2 (SetColumn t) = CqlSet <$> (getList $ do len <- decodeShort replicateM (fromIntegral len) (withBytes 2 (getNative t)))
142
false
false
0
14
31
65
30
35
null
null
benweitzman/DivisionOfLabor
src/lib/Data/HexGrid.hs
mit
maxQ :: HexGrid a -> HexLocation maxQ = maxBy (comparing fst)
61
maxQ :: HexGrid a -> HexLocation maxQ = maxBy (comparing fst)
61
maxQ = maxBy (comparing fst)
28
false
true
0
7
10
27
13
14
null
null
andygill/plist-buddy
src/Database/PlistBuddy.hs
bsd-3-clause
valueType (Dict {}) = "dict"
31
valueType (Dict {}) = "dict"
31
valueType (Dict {}) = "dict"
31
false
false
0
7
7
16
8
8
null
null
bartavelle/stateWriter
Control/Monad/Trans/RSS/Lazy.hs
bsd-3-clause
liftCatch :: Catch e m (a,(s,w)) -> Catch e (RSST r w s m) a liftCatch catchE m h = RSST $ \ r s -> runRSST' m r s `catchE` \ e -> runRSST' (h e) r s
151
liftCatch :: Catch e m (a,(s,w)) -> Catch e (RSST r w s m) a liftCatch catchE m h = RSST $ \ r s -> runRSST' m r s `catchE` \ e -> runRSST' (h e) r s
151
liftCatch catchE m h = RSST $ \ r s -> runRSST' m r s `catchE` \ e -> runRSST' (h e) r s
90
false
true
0
11
40
102
53
49
null
null
kazu-yamamoto/wai
warp/Network/Wai/Handler/Warp/File.hs
mit
ifunmodified :: IndexedHeader -> Integer -> HTTPDate -> Maybe RspFileInfo ifunmodified reqidx size mtime = do date <- ifUnmodifiedSince reqidx return $ if date == mtime then unconditional reqidx size else WithoutBody H.preconditionFailed412
274
ifunmodified :: IndexedHeader -> Integer -> HTTPDate -> Maybe RspFileInfo ifunmodified reqidx size mtime = do date <- ifUnmodifiedSince reqidx return $ if date == mtime then unconditional reqidx size else WithoutBody H.preconditionFailed412
274
ifunmodified reqidx size mtime = do date <- ifUnmodifiedSince reqidx return $ if date == mtime then unconditional reqidx size else WithoutBody H.preconditionFailed412
200
false
true
0
10
66
72
34
38
null
null
dormouse/blog
source/haskell/haskell_learn/haskell_99_question_11_20.hs
gpl-2.0
dupli :: [a] -> [a] dupli [] = []
33
dupli :: [a] -> [a] dupli [] = []
33
dupli [] = []
13
false
true
0
8
8
34
16
18
null
null
nikita-volkov/ez-couch
src/EZCouch/ReadAction.hs
mit
readAction :: (MonadAction m, Entity a, ToJSON k) => View a k -- ^ View -> KeysSelection k -- ^ Keys selection mode -> Int -- ^ Skip -> Maybe Int -- ^ Limit -> Bool -- ^ Descending -> Bool -- ^ Include docs -> m Value -- ^ An unparsed response body JSON readAction view mode skip limit desc includeDocs = d...
1,170
readAction :: (MonadAction m, Entity a, ToJSON k) => View a k -- ^ View -> KeysSelection k -- ^ Keys selection mode -> Int -- ^ Skip -> Maybe Int -- ^ Limit -> Bool -- ^ Descending -> Bool -- ^ Include docs -> m Value readAction view mode skip limit desc includeDocs = do result <- action path qps body ...
1,134
readAction view mode skip limit desc includeDocs = do result <- action path qps body case result of ResponseNotFound -> do logLn 2 $ "View " ++ fromMaybe (crash "Unnamed view") (viewGeneratedName view) ++ " does not exist. Generating." createOrUpdateView view action path qp...
902
true
true
0
17
349
328
158
170
null
null
icyfork/shellcheck
ShellCheck/Analytics.hs
gpl-3.0
checkArithmeticOpCommand _ _ = return ()
40
checkArithmeticOpCommand _ _ = return ()
40
checkArithmeticOpCommand _ _ = return ()
40
false
false
1
6
5
16
7
9
null
null
bhamrick/hsmath
Math/Polynomial/Types.hs
bsd-3-clause
coefficients :: P a -> [a] coefficients (P as) = as
51
coefficients :: P a -> [a] coefficients (P as) = as
51
coefficients (P as) = as
24
false
true
0
7
10
30
15
15
null
null
pparkkin/eta
compiler/ETA/Rename/RnTypes.hs
bsd-3-clause
rnHsTyKi isType doc (HsAppTy ty1 ty2) = do { (ty1', fvs1) <- rnLHsTyKi isType doc ty1 ; (ty2', fvs2) <- rnLHsTyKi isType doc ty2 ; return (HsAppTy ty1' ty2', fvs1 `plusFV` fvs2) }
195
rnHsTyKi isType doc (HsAppTy ty1 ty2) = do { (ty1', fvs1) <- rnLHsTyKi isType doc ty1 ; (ty2', fvs2) <- rnLHsTyKi isType doc ty2 ; return (HsAppTy ty1' ty2', fvs1 `plusFV` fvs2) }
195
rnHsTyKi isType doc (HsAppTy ty1 ty2) = do { (ty1', fvs1) <- rnLHsTyKi isType doc ty1 ; (ty2', fvs2) <- rnLHsTyKi isType doc ty2 ; return (HsAppTy ty1' ty2', fvs1 `plusFV` fvs2) }
195
false
false
0
9
48
91
46
45
null
null
jacekszymanski/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs
lgpl-2.1
wxSTC_ERR_MS :: Int wxSTC_ERR_MS = 3
36
wxSTC_ERR_MS :: Int wxSTC_ERR_MS = 3
36
wxSTC_ERR_MS = 3
16
false
true
0
4
5
11
6
5
null
null
takayuki/natume
ScmToken.hs
gpl-2.0
nat :: Parser Char Int nat = do xs <- some digit let n = foldl1 (\x y -> x * 10 + y) xs return n
114
nat :: Parser Char Int nat = do xs <- some digit let n = foldl1 (\x y -> x * 10 + y) xs return n
114
nat = do xs <- some digit let n = foldl1 (\x y -> x * 10 + y) xs return n
91
false
true
0
15
44
70
31
39
null
null
maciej-bendkowski/boltzmann-brain
Data/Boltzmann/Compiler/Haskell/Helpers.hs
bsd-3-clause
declADT withShow (t, cons) = DataDecl () (DataType ()) Nothing (DHead () (Ident () t)) (map (QualConDecl () Nothing Nothing . declCon) cons) (declDerivations withShow)
179
declADT withShow (t, cons) = DataDecl () (DataType ()) Nothing (DHead () (Ident () t)) (map (QualConDecl () Nothing Nothing . declCon) cons) (declDerivations withShow)
179
declADT withShow (t, cons) = DataDecl () (DataType ()) Nothing (DHead () (Ident () t)) (map (QualConDecl () Nothing Nothing . declCon) cons) (declDerivations withShow)
179
false
false
0
10
36
96
45
51
null
null
hguenther/smtlib2
Language/SMTLib2/Internals/Expression.hs
gpl-3.0
functionType _ (BVUn _ n) = return (BitVecRepr n ::: Nil,BitVecRepr n)
70
functionType _ (BVUn _ n) = return (BitVecRepr n ::: Nil,BitVecRepr n)
70
functionType _ (BVUn _ n) = return (BitVecRepr n ::: Nil,BitVecRepr n)
70
false
false
1
8
11
40
18
22
null
null
noughtmare/yi
yi-keymap-vim/tests/Generic/TestPureBufferManipulations.hs
gpl-2.0
readFile' :: FilePath -> IO String readFile' f = do s <- readFile f return $! length s `seq` s
102
readFile' :: FilePath -> IO String readFile' f = do s <- readFile f return $! length s `seq` s
102
readFile' f = do s <- readFile f return $! length s `seq` s
67
false
true
0
9
27
47
22
25
null
null
christiaanb/Idris-dev
src/IRTS/CodegenC.hs
bsd-3-clause
bcc :: Int -> BC -> String bcc i (ASSIGN l r) = indent i ++ creg l ++ " = " ++ creg r ++ ";\n"
94
bcc :: Int -> BC -> String bcc i (ASSIGN l r) = indent i ++ creg l ++ " = " ++ creg r ++ ";\n"
94
bcc i (ASSIGN l r) = indent i ++ creg l ++ " = " ++ creg r ++ ";\n"
67
false
true
0
10
26
63
28
35
null
null
dorchard/camfort
src/Camfort/Specification/Stencils/InferenceFrontend.hs
apache-2.0
getMetaInfo :: Inferer F.MetaInfo getMetaInfo = asks ieMetaInfo
63
getMetaInfo :: Inferer F.MetaInfo getMetaInfo = asks ieMetaInfo
63
getMetaInfo = asks ieMetaInfo
29
false
true
0
7
7
25
10
15
null
null
dolio/vector
Data/Vector/Unboxed.hs
bsd-3-clause
ifoldM' = G.ifoldM'
19
ifoldM' = G.ifoldM'
19
ifoldM' = G.ifoldM'
19
false
false
1
6
2
12
4
8
null
null
plow-technologies/cobalt-kiosk-data-template
src/Kiosk/Backend/Data/DataTemplateEntry.hs
bsd-3-clause
notSignature :: TemplateItem -> Bool notSignature (TemplateItem ("Driver_Signature"::Text) (InputTypeText (InputText _))) = False
129
notSignature :: TemplateItem -> Bool notSignature (TemplateItem ("Driver_Signature"::Text) (InputTypeText (InputText _))) = False
129
notSignature (TemplateItem ("Driver_Signature"::Text) (InputTypeText (InputText _))) = False
92
false
true
0
11
12
45
23
22
null
null
samplecount/shake-language-c
src/Development/Shake/Language/C/ToolChain.hs
apache-2.0
toolFromString :: ToolChain -- ^ Toolchain -> String -- ^ Command name -> FilePath -- ^ Full command path toolFromString toolChain name = let c = _toolPrefix toolChain ++ name in maybe c (</> c) (_toolDirectory toolChain)
235
toolFromString :: ToolChain -- ^ Toolchain -> String -- ^ Command name -> FilePath toolFromString toolChain name = let c = _toolPrefix toolChain ++ name in maybe c (</> c) (_toolDirectory toolChain)
211
toolFromString toolChain name = let c = _toolPrefix toolChain ++ name in maybe c (</> c) (_toolDirectory toolChain)
119
true
true
0
10
50
64
32
32
null
null
norm2782/uuagc
src-generated/PrintCode.hs
bsd-3-clause
sem_Expr_ResultExpr :: (String) -> T_Expr -> T_Expr sem_Expr_ResultExpr !arg_nt_ arg_expr_ = T_Expr (return st26) where {-# NOINLINE st26 #-} !st26 = let v25 :: T_Expr_v25 v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let _exprX26 = Control.Monad.Identity.runIdentit...
1,582
sem_Expr_ResultExpr :: (String) -> T_Expr -> T_Expr sem_Expr_ResultExpr !arg_nt_ arg_expr_ = T_Expr (return st26) where {-# NOINLINE st26 #-} !st26 = let v25 :: T_Expr_v25 v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let _exprX26 = Control.Monad.Identity.runIdentity...
1,581
sem_Expr_ResultExpr !arg_nt_ arg_expr_ = T_Expr (return st26) where {-# NOINLINE st26 #-} !st26 = let v25 :: T_Expr_v25 v25 = \ !(T_Expr_vIn25 _lhsInested _lhsIoptions _lhsIoutputfile) -> ( let _exprX26 = Control.Monad.Identity.runIdentity (attach_T_Expr (arg_expr_)) (T_Expr_vOut25 ...
1,528
false
true
0
20
500
323
173
150
null
null
syanidar/Sophy
src/Foundation/Move.hs
bsd-3-clause
notSuicidal :: Position -> Move -> Bool notSuicidal x@Position{_attackers = as,_defenders = ds,_checkers = cs,_defendMap = dMap,_pinnedByBishops = pb,_pinnedByRooks = pr} y = case popCount cs of 0 -> case getMoveType y of EnPassant -> pinTest && epPinTest Castling -> dMap `disj...
2,144
notSuicidal :: Position -> Move -> Bool notSuicidal x@Position{_attackers = as,_defenders = ds,_checkers = cs,_defendMap = dMap,_pinnedByBishops = pb,_pinnedByRooks = pr} y = case popCount cs of 0 -> case getMoveType y of EnPassant -> pinTest && epPinTest Castling -> dMap `disj...
2,144
notSuicidal x@Position{_attackers = as,_defenders = ds,_checkers = cs,_defendMap = dMap,_pinnedByBishops = pb,_pinnedByRooks = pr} y = case popCount cs of 0 -> case getMoveType y of EnPassant -> pinTest && epPinTest Castling -> dMap `disjoint` kingPath _ -...
2,104
false
true
18
23
763
707
355
352
null
null
sdiehl/ghc
libraries/base/GHC/IO/Handle/Internals.hs
bsd-3-clause
withAllHandles__ :: String -> Handle -> (Handle__ -> IO Handle__) -> IO () withAllHandles__ fun h@(FileHandle _ m) act = withHandle__' fun h m act
150
withAllHandles__ :: String -> Handle -> (Handle__ -> IO Handle__) -> IO () withAllHandles__ fun h@(FileHandle _ m) act = withHandle__' fun h m act
150
withAllHandles__ fun h@(FileHandle _ m) act = withHandle__' fun h m act
75
false
true
0
10
28
65
32
33
null
null
danr/hipspec
examples/old-examples/quickspec/Lists.hs
gpl-3.0
toListS :: NonNilSeqP a -> ListP a toListS (Unit x) = point x
61
toListS :: NonNilSeqP a -> ListP a toListS (Unit x) = point x
61
toListS (Unit x) = point x
26
false
true
0
6
12
37
16
21
null
null
ingemaradahl/bilder
src/Compiler.hs
lgpl-3.0
rewriteExits ∷ Exp → Reader (Function,Shader) Exp rewriteExits (ECall n es) | length es >= 2 = do f ← asks (Map.lookup n . functions . snd) case f of Just fun → if (returnType fun == TVec4) && all isNum (leave 2 $ map variableType (parameters fun)) then return $ ECall n $ take (length es - 2) es +...
763
rewriteExits ∷ Exp → Reader (Function,Shader) Exp rewriteExits (ECall n es) | length es >= 2 = do f ← asks (Map.lookup n . functions . snd) case f of Just fun → if (returnType fun == TVec4) && all isNum (leave 2 $ map variableType (parameters fun)) then return $ ECall n $ take (length es - 2) es +...
763
rewriteExits (ECall n es) | length es >= 2 = do f ← asks (Map.lookup n . functions . snd) case f of Just fun → if (returnType fun == TVec4) && all isNum (leave 2 $ map variableType (parameters fun)) then return $ ECall n $ take (length es - 2) es ++ divByRes (leave 2 es) else ECall n <$> m...
713
false
true
0
22
225
355
166
189
null
null
Rydgel/advent-of-code
src/Day7.hs
bsd-3-clause
parseNot :: Parser Node parseNot = Not <$> (string "NOT " *> parseAtom)
71
parseNot :: Parser Node parseNot = Not <$> (string "NOT " *> parseAtom)
71
parseNot = Not <$> (string "NOT " *> parseAtom)
47
false
true
0
8
12
28
14
14
null
null
adamschoenemann/simple-frp
test/FRP/TestFunctions.hs
mit
frp_nats = unitFunc [unsafeDecl| nats : S alloc -> Nat -> S Nat nats us n = let cons(u, delay(us')) = us in let stable(x) = promote(n) in cons(x, delay(u, nats us' (x + 1))). |]
193
frp_nats = unitFunc [unsafeDecl| nats : S alloc -> Nat -> S Nat nats us n = let cons(u, delay(us')) = us in let stable(x) = promote(n) in cons(x, delay(u, nats us' (x + 1))). |]
193
frp_nats = unitFunc [unsafeDecl| nats : S alloc -> Nat -> S Nat nats us n = let cons(u, delay(us')) = us in let stable(x) = promote(n) in cons(x, delay(u, nats us' (x + 1))). |]
193
false
false
0
5
51
13
8
5
null
null
anirudhhkumarr/ml-lib
src/Parser/CSV.hs
gpl-2.0
removeEmptyLines [] = []
24
removeEmptyLines [] = []
24
removeEmptyLines [] = []
24
false
false
0
6
3
13
6
7
null
null
larioj/nemo
src/Util.hs
mit
putShowLn :: Show a => a -> IO () putShowLn = putStrLn . show
61
putShowLn :: Show a => a -> IO () putShowLn = putStrLn . show
61
putShowLn = putStrLn . show
27
false
true
0
8
13
31
15
16
null
null
alistra/data-structure-inferrer
C/Analyzer.hs
mit
analyzeCExpr (CVar ident _) = return []
65
analyzeCExpr (CVar ident _) = return []
65
analyzeCExpr (CVar ident _) = return []
65
false
false
0
7
32
22
10
12
null
null
f1u77y/xmonad-contrib
XMonad/Layout/BinarySpacePartition.hs
bsd-3-clause
equalizeNth b = doToNth equalize b
34
equalizeNth b = doToNth equalize b
34
equalizeNth b = doToNth equalize b
34
false
false
0
5
5
14
6
8
null
null