Search is not available for this dataset
repo_name
string
path
string
license
string
full_code
string
full_size
int64
uncommented_code
string
uncommented_size
int64
function_only_code
string
function_only_size
int64
is_commented
bool
is_signatured
bool
n_ast_errors
int64
ast_max_depth
int64
n_whitespaces
int64
n_ast_nodes
int64
n_ast_terminals
int64
n_ast_nonterminals
int64
loc
int64
cycloplexity
int64
brendanhay/gogol
gogol-logging/gen/Network/Google/Resource/Logging/Locations/Operations/Cancel.hs
mpl-2.0
-- | JSONP locCallback :: Lens' LocationsOperationsCancel (Maybe Text) locCallback = lens _locCallback (\ s a -> s{_locCallback = a})
135
locCallback :: Lens' LocationsOperationsCancel (Maybe Text) locCallback = lens _locCallback (\ s a -> s{_locCallback = a})
124
locCallback = lens _locCallback (\ s a -> s{_locCallback = a})
64
true
true
0
9
21
48
25
23
null
null
dterei/memcache-hs
Database/Memcache/Socket.hs
bsd-3-clause
chkLength expected l msg = when (l /= expected) $ return $ throw $ ProtocolError BadLength { protocolError = msg ++ " length expected " ++ show expected ++ " got " ++ show l }
185
chkLength expected l msg = when (l /= expected) $ return $ throw $ ProtocolError BadLength { protocolError = msg ++ " length expected " ++ show expected ++ " got " ++ show l }
185
chkLength expected l msg = when (l /= expected) $ return $ throw $ ProtocolError BadLength { protocolError = msg ++ " length expected " ++ show expected ++ " got " ++ show l }
185
false
false
0
12
45
68
33
35
null
null
badp/ganeti
src/Ganeti/OpParams.hs
gpl-2.0
pIgnoreRemoveFailures :: Field pIgnoreRemoveFailures = withDoc "Whether to ignore failures while removing instances" $ defaultFalse "ignore_remove_failures"
160
pIgnoreRemoveFailures :: Field pIgnoreRemoveFailures = withDoc "Whether to ignore failures while removing instances" $ defaultFalse "ignore_remove_failures"
160
pIgnoreRemoveFailures = withDoc "Whether to ignore failures while removing instances" $ defaultFalse "ignore_remove_failures"
129
false
true
0
6
19
21
10
11
null
null
noughtmare/yi
yi-keymap-vim/src/Yi/Keymap/Vim/Digraph.hs
gpl-2.0
-- KATAKANA LETTER HU switch 'B' 'u' = '\x30D6'
47
switch 'B' 'u' = '\x30D6'
25
switch 'B' 'u' = '\x30D6'
25
true
false
0
5
8
12
6
6
null
null
bitemyapp/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
isListCompExpr _ = False
40
isListCompExpr _ = False
40
isListCompExpr _ = False
40
false
false
0
5
19
9
4
5
null
null
mariefarrell/Hets
utils/DrIFT-src/ParseLib2.hs
gpl-2.0
parse :: Parser a -> Parser a parse = (junk >>)
47
parse :: Parser a -> Parser a parse = (junk >>)
47
parse = (junk >>)
17
false
true
0
7
10
31
14
17
null
null
JeanJoskin/ObjectiveJLib
src/Language/ObjectiveJLib/Parser/Parser.hs
bsd-3-clause
-- Objective-J: IVar declaration pJIVar :: JsParser JIVar pJIVar = JIVar <$> pJTy <*> pIdent <*> pMaybe pJAccessors <* pSemi
124
pJIVar :: JsParser JIVar pJIVar = JIVar <$> pJTy <*> pIdent <*> pMaybe pJAccessors <* pSemi
91
pJIVar = JIVar <$> pJTy <*> pIdent <*> pMaybe pJAccessors <* pSemi
66
true
true
3
7
19
39
17
22
null
null
rahulmutt/ghcvm
compiler/Eta/BasicTypes/OccName.hs
bsd-3-clause
nameSpacesRelated :: NameSpace -> NameSpace -> Bool nameSpacesRelated ns1 ns2 = ns1 == ns2 || otherNameSpace ns1 == ns2
119
nameSpacesRelated :: NameSpace -> NameSpace -> Bool nameSpacesRelated ns1 ns2 = ns1 == ns2 || otherNameSpace ns1 == ns2
119
nameSpacesRelated ns1 ns2 = ns1 == ns2 || otherNameSpace ns1 == ns2
67
false
true
0
7
18
39
19
20
null
null
liff/adventofcode-2016
app/Day4.hs
bsd-3-clause
part1 :: [Room] -> Int part1 = sum . map sector . filter isReal
63
part1 :: [Room] -> Int part1 = sum . map sector . filter isReal
63
part1 = sum . map sector . filter isReal
40
false
true
2
7
13
40
17
23
null
null
shlevy/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
tyCoFVsOfCt (CDictCan { cc_tyargs = tys }) = tyCoFVsOfTypes tys
63
tyCoFVsOfCt (CDictCan { cc_tyargs = tys }) = tyCoFVsOfTypes tys
63
tyCoFVsOfCt (CDictCan { cc_tyargs = tys }) = tyCoFVsOfTypes tys
63
false
false
0
8
9
25
12
13
null
null
NorfairKing/the-notes
src/Macro/Sets/Macro.hs
gpl-2.0
--[ set union comprehension setuncmprsign :: Note setuncmprsign = commS "bigcup"
80
setuncmprsign :: Note setuncmprsign = commS "bigcup"
52
setuncmprsign = commS "bigcup"
30
true
true
0
6
10
21
9
12
null
null
technogeeky/d-A
include/containers-0.5.0.0/Data/Map/Strict.hs
gpl-3.0
mapEitherWithKey f (Bin _ kx x l r) = case f kx x of Left y -> y `seq` (join kx y l1 r1 `strictPair` merge l2 r2) Right z -> z `seq` (merge l1 r1 `strictPair` join kx z l2 r2) where (l1,l2) = mapEitherWithKey f l (r1,r2) = mapEitherWithKey f r {------------------------------------------------------------...
550
mapEitherWithKey f (Bin _ kx x l r) = case f kx x of Left y -> y `seq` (join kx y l1 r1 `strictPair` merge l2 r2) Right z -> z `seq` (merge l1 r1 `strictPair` join kx z l2 r2) where (l1,l2) = mapEitherWithKey f l (r1,r2) = mapEitherWithKey f r {------------------------------------------------------------...
550
mapEitherWithKey f (Bin _ kx x l r) = case f kx x of Left y -> y `seq` (join kx y l1 r1 `strictPair` merge l2 r2) Right z -> z `seq` (merge l1 r1 `strictPair` join kx z l2 r2) where (l1,l2) = mapEitherWithKey f l (r1,r2) = mapEitherWithKey f r {------------------------------------------------------------...
550
false
false
0
11
99
155
79
76
null
null
qrilka/xlsx
src/Codec/Xlsx/Types/ConditionalFormatting.hs
mit
readOpExpression :: Text -> [Formula] -> [OperatorExpression] readOpExpression "beginsWith" [f] = [OpBeginsWith f ]
123
readOpExpression :: Text -> [Formula] -> [OperatorExpression] readOpExpression "beginsWith" [f] = [OpBeginsWith f ]
123
readOpExpression "beginsWith" [f] = [OpBeginsWith f ]
61
false
true
0
9
21
45
22
23
null
null
msiegenthaler/haskell-xbee
System/Hardware/XBee/Command.hs
bsd-3-clause
-- | Initial FrameId. frameId = FrameId 1
41
frameId = FrameId 1
19
frameId = FrameId 1
19
true
false
0
5
7
10
5
5
null
null
ejlilley/AbstractMusic
LilyParse.hs
gpl-3.0
relativeSim base (LilySimultaneous (e:es)) = let (b, e') = relativeExpr base e (b', (LilySimultaneous es')) = relativeSim b (LilySimultaneous es) in (b', LilySimultaneous (e':es'))
274
relativeSim base (LilySimultaneous (e:es)) = let (b, e') = relativeExpr base e (b', (LilySimultaneous es')) = relativeSim b (LilySimultaneous es) in (b', LilySimultaneous (e':es'))
274
relativeSim base (LilySimultaneous (e:es)) = let (b, e') = relativeExpr base e (b', (LilySimultaneous es')) = relativeSim b (LilySimultaneous es) in (b', LilySimultaneous (e':es'))
274
false
false
0
11
117
92
47
45
null
null
githubkleon/ConvenientHDL
src/VerilogHandle.hs
bsd-3-clause
genPortDecl x pt (CS.Ident ident) ll ww = PortDecl (PortDir x) (maybe Nothing (Just . parseFromPortType) pt) (maybeGetRange ll ww) (Ident ident) (CommentItem "") where maybeGetRange l w = case or [(isJust l),(isJust w)] of False -> Nothing True -> maybeGetRange1 l w maybeGet...
798
genPortDecl x pt (CS.Ident ident) ll ww = PortDecl (PortDir x) (maybe Nothing (Just . parseFromPortType) pt) (maybeGetRange ll ww) (Ident ident) (CommentItem "") where maybeGetRange l w = case or [(isJust l),(isJust w)] of False -> Nothing True -> maybeGetRange1 l w maybeGet...
798
genPortDecl x pt (CS.Ident ident) ll ww = PortDecl (PortDir x) (maybe Nothing (Just . parseFromPortType) pt) (maybeGetRange ll ww) (Ident ident) (CommentItem "") where maybeGetRange l w = case or [(isJust l),(isJust w)] of False -> Nothing True -> maybeGetRange1 l w maybeGet...
798
false
false
4
13
240
372
175
197
null
null
keithodulaigh/Hets
Taxonomy/MMiSSOntology.hs
gpl-2.0
gselType :: (OntoObjectType -> Bool) -> ClassGraph -> [Context (String, String, OntoObjectType) String] gselType f = gselLab ( \ (_, _, t) -> f t)
155
gselType :: (OntoObjectType -> Bool) -> ClassGraph -> [Context (String, String, OntoObjectType) String] gselType f = gselLab ( \ (_, _, t) -> f t)
155
gselType f = gselLab ( \ (_, _, t) -> f t)
42
false
true
0
9
33
69
38
31
null
null
wavewave/madgraph-auto-dataset
src/HEP/Automation/MadGraph/Dataset/Set20110428set3.hs
gpl-3.0
-- [101] zptasklist :: ScriptSetup -> ClusterSetup ZpHFull -> [WorkSetup ZpHFull] zptasklist ssetup csetup = [ WS ssetup (psetup_zphfull_TZpLep) (RS { param = p , numevent = 10000 , machine = TeVatron , rgrun = Fixed , rgscale = 200.0 , match = No...
617
zptasklist :: ScriptSetup -> ClusterSetup ZpHFull -> [WorkSetup ZpHFull] zptasklist ssetup csetup = [ WS ssetup (psetup_zphfull_TZpLep) (RS { param = p , numevent = 10000 , machine = TeVatron , rgrun = Fixed , rgscale = 200.0 , match = NoMatch ...
607
zptasklist ssetup csetup = [ WS ssetup (psetup_zphfull_TZpLep) (RS { param = p , numevent = 10000 , machine = TeVatron , rgrun = Fixed , rgscale = 200.0 , match = NoMatch , cut = DefCut , pythia = RunPYTHIA , ...
534
true
true
0
9
250
144
84
60
null
null
PavelClaudiuStefan/FMI
An_3_Semestru_1/ProgramareDeclarativa/Laboratoare/Laborator2/lab2chess.hs
cc0-1.0
fenCharToPicture 'k' = king
27
fenCharToPicture 'k' = king
27
fenCharToPicture 'k' = king
27
false
false
0
4
3
10
4
6
null
null
sherwoodwang/wxHaskell
wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs
lgpl-2.1
withCSizeDouble :: Size2D Double -> (CDouble -> CDouble -> IO a) -> IO a withCSizeDouble (Size w h) f = f (toCDouble w) (toCDouble h)
135
withCSizeDouble :: Size2D Double -> (CDouble -> CDouble -> IO a) -> IO a withCSizeDouble (Size w h) f = f (toCDouble w) (toCDouble h)
135
withCSizeDouble (Size w h) f = f (toCDouble w) (toCDouble h)
62
false
true
0
10
26
70
33
37
null
null
allanderek/ipclib
Smc/SmcGraph.hs
gpl-2.0
makeLatexDocument :: CliOptions -- | String representation of the original srmc model -> String -> [ SensitivityGroup SensitivityPdfs ] -> [ CandleGraph ] -> [ TimeGraphGroup ] -> String makeLatexDocument...
8,593
makeLatexDocument :: CliOptions -- | String representation of the original srmc model -> String -> [ SensitivityGroup SensitivityPdfs ] -> [ CandleGraph ] -> [ TimeGraphGroup ] -> String makeLatexDocument...
8,593
makeLatexDocument options stringModel sgroups candles timeGroups = unlines [ "\\documentclass[10pt,a4paper]{article}" , "\\usepackage{amssymb,amsbsy,verbatim,fancybox}" , "\\usepackage{graphicx}" , "\\usepackage[pdftex]{hyperref}" , "%" , "" , "% For display...
8,290
false
true
0
13
3,232
1,336
723
613
null
null
shlevy/ghc
compiler/simplCore/CSE.hs
bsd-3-clause
cseOneExpr :: InExpr -> OutExpr cseOneExpr e = cseExpr env e where env = emptyCSEnv {cs_subst = mkEmptySubst (mkInScopeSet (exprFreeVars e)) }
144
cseOneExpr :: InExpr -> OutExpr cseOneExpr e = cseExpr env e where env = emptyCSEnv {cs_subst = mkEmptySubst (mkInScopeSet (exprFreeVars e)) }
144
cseOneExpr e = cseExpr env e where env = emptyCSEnv {cs_subst = mkEmptySubst (mkInScopeSet (exprFreeVars e)) }
112
false
true
0
12
23
59
28
31
null
null
Megaleo/Minehack
src/Tile/TileType.hs
bsd-3-clause
name (TEntity (E.EPlayer EP.Human)) = "Human"
49
name (TEntity (E.EPlayer EP.Human)) = "Human"
49
name (TEntity (E.EPlayer EP.Human)) = "Human"
49
false
false
0
10
9
25
12
13
null
null
Blaisorblade/pts
src-lib/PTS/Dynamics/Evaluation.hs
bsd-3-clause
close :: Name -> Value Eval -> Maybe C -> Value Eval -> Eval (Function Eval) close name typ sort value = do term <- reify value abstract (\arg -> do withEnvironment [] $ do bind name (Binding False arg typ sort) $ do eval term)
249
close :: Name -> Value Eval -> Maybe C -> Value Eval -> Eval (Function Eval) close name typ sort value = do term <- reify value abstract (\arg -> do withEnvironment [] $ do bind name (Binding False arg typ sort) $ do eval term)
249
close name typ sort value = do term <- reify value abstract (\arg -> do withEnvironment [] $ do bind name (Binding False arg typ sort) $ do eval term)
172
false
true
0
18
67
120
54
66
null
null
shayan-najd/Haskell-Desugar-Generic
Examples/XMonad/SS_noListComp.hs
bsd-3-clause
tagMember :: (Eq i) => i -> StackSet i l a s sd -> Bool tagMember t = elem t . map tag . workspaces
99
tagMember :: (Eq i) => i -> StackSet i l a s sd -> Bool tagMember t = elem t . map tag . workspaces
99
tagMember t = elem t . map tag . workspaces
43
false
true
0
8
24
56
27
29
null
null
nevrenato/HetsAlloy
QBF/Symbol.hs
gpl-2.0
printSymbol :: Symbol -> Doc printSymbol = pretty . symName
59
printSymbol :: Symbol -> Doc printSymbol = pretty . symName
59
printSymbol = pretty . symName
30
false
true
0
5
9
19
10
9
null
null
zrho/pylon
src/Language/Pylon/Util.hs
bsd-3-clause
safeIndex (x:_) 0 = Just x
27
safeIndex (x:_) 0 = Just x
27
safeIndex (x:_) 0 = Just x
27
false
false
1
6
6
26
10
16
null
null
urbanslug/ghc
compiler/simplCore/SimplEnv.hs
bsd-3-clause
refineFromInScope :: InScopeSet -> Var -> Var refineFromInScope in_scope v | isLocalId v = case lookupInScope in_scope v of Just v' -> v' Nothing -> WARN( True, ppr v ) v -- This is an error! | otherwise = v
248
refineFromInScope :: InScopeSet -> Var -> Var refineFromInScope in_scope v | isLocalId v = case lookupInScope in_scope v of Just v' -> v' Nothing -> WARN( True, ppr v ) v -- This is an error! | otherwise = v
248
refineFromInScope in_scope v | isLocalId v = case lookupInScope in_scope v of Just v' -> v' Nothing -> WARN( True, ppr v ) v -- This is an error! | otherwise = v
202
false
true
1
11
80
82
38
44
null
null
vikraman/ghc
libraries/template-haskell/Language/Haskell/TH/Lib.hs
bsd-3-clause
arrowT :: TypeQ arrowT = return ArrowT
38
arrowT :: TypeQ arrowT = return ArrowT
38
arrowT = return ArrowT
22
false
true
0
6
6
20
8
12
null
null
toppoint/haskell-alpm
tests/Tests.hs
gpl-2.0
test_optionLocalDatabase :: Assertion test_optionLocalDatabase = withLocalDatabase $ \db -> do name <- databaseGetName db return $ name == "local" -- Tests: Database -----------------------------------------------------------
235
test_optionLocalDatabase :: Assertion test_optionLocalDatabase = withLocalDatabase $ \db -> do name <- databaseGetName db return $ name == "local" -- Tests: Database -----------------------------------------------------------
235
test_optionLocalDatabase = withLocalDatabase $ \db -> do name <- databaseGetName db return $ name == "local" -- Tests: Database -----------------------------------------------------------
197
false
true
0
10
32
42
21
21
null
null
danr/hipspec
testsuite/prod/Properties.hs
gpl-3.0
prop_T22 :: [a] -> [a] -> Prop Bool prop_T22 x y = even (length (x ++ y)) =:= even (length (y ++ x))
100
prop_T22 :: [a] -> [a] -> Prop Bool prop_T22 x y = even (length (x ++ y)) =:= even (length (y ++ x))
100
prop_T22 x y = even (length (x ++ y)) =:= even (length (y ++ x))
64
false
true
0
10
22
73
36
37
null
null
vTurbine/ghc
compiler/hsSyn/HsExpr.hs
bsd-3-clause
ppr_cmd (HsCmdArrApp arrow arg _ HsFirstOrderApp True) = hsep [ppr_lexpr arrow, larrowt, ppr_lexpr arg]
105
ppr_cmd (HsCmdArrApp arrow arg _ HsFirstOrderApp True) = hsep [ppr_lexpr arrow, larrowt, ppr_lexpr arg]
105
ppr_cmd (HsCmdArrApp arrow arg _ HsFirstOrderApp True) = hsep [ppr_lexpr arrow, larrowt, ppr_lexpr arg]
105
false
false
0
6
15
42
20
22
null
null
bgold-cosmos/Tidal
src/Sound/Tidal/UI.hs
gpl-3.0
_euclid' :: Int -> Int -> Pattern a -> Pattern a _euclid' n k p = fastcat $ map (\x -> if x then p else silence) (bjorklund (n,k))
130
_euclid' :: Int -> Int -> Pattern a -> Pattern a _euclid' n k p = fastcat $ map (\x -> if x then p else silence) (bjorklund (n,k))
130
_euclid' n k p = fastcat $ map (\x -> if x then p else silence) (bjorklund (n,k))
81
false
true
0
9
28
78
39
39
null
null
LeventErkok/linearEqSolver
Math/LinearEquationSolver.hs
bsd-3-clause
solveIntegerLinearEqsAll :: Solver -- ^ SMT Solver to use -> Int -- ^ Maximum number of solutions to return, in case infinite -> [[Integer]] -- ^ Coefficient matrix (A) -> [Integer] -- ^ Result vector (b) ...
1,036
solveIntegerLinearEqsAll :: Solver -- ^ SMT Solver to use -> Int -- ^ Maximum number of solutions to return, in case infinite -> [[Integer]] -- ^ Coefficient matrix (A) -> [Integer] -- ^ Result vector (b) ...
1,004
solveIntegerLinearEqsAll s maxNo coeffs res = extractModels `fmap` allSatWith cfg cs where cs = buildConstraints "solveIntegerLinearEqsAll" coeffs res cfg = (defaultSolverConfig s) {allSatMaxModelCount = Just maxNo} -- | Solve a system of linear equations over rationals. Same as the integer -- version `solve...
646
true
true
1
11
303
123
72
51
null
null
tejon/diagrams-contrib
src/Diagrams/TwoD/Tilings.hs
bsd-3-clause
polySin Square = 1
21
polySin Square = 1
21
polySin Square = 1
21
false
false
0
4
6
10
4
6
null
null
mightymoose/liquidhaskell
benchmarks/base-4.5.1.0/System/Posix/Internals.hs
bsd-3-clause
peekFilePath :: CWString -> IO FilePath peekFilePath = peekCWString
67
peekFilePath :: CWString -> IO FilePath peekFilePath = peekCWString
67
peekFilePath = peekCWString
27
false
true
0
7
8
24
10
14
null
null
jaspervdj/lorem-markdownum
lib/LoremMarkdownum/Gen/Markdown.hs
bsd-3-clause
-------------------------------------------------------------------------------- genLink :: MonadGen m => MarkdownGen m Text genLink = do noExternalLinks <- asks mcNoExternalLinks if noExternalLinks then genInternalLink else genExternalLink where genInternalLink :: MonadGen m => MarkdownGen m Text gen...
1,623
genLink :: MonadGen m => MarkdownGen m Text genLink = do noExternalLinks <- asks mcNoExternalLinks if noExternalLinks then genInternalLink else genExternalLink where genInternalLink :: MonadGen m => MarkdownGen m Text genInternalLink = do n <- randomInt (1, 3) linkParts <- repl...
1,542
genLink = do noExternalLinks <- asks mcNoExternalLinks if noExternalLinks then genInternalLink else genExternalLink where genInternalLink :: MonadGen m => MarkdownGen m Text genInternalLink = do n <- randomInt (1, 3) linkParts <- replicateM n genLinkPart return $ "#" <>...
1,498
true
true
0
13
481
458
231
227
null
null
SwiftsNamesake/Southpaw
lib/Southpaw/Picasso/Palette.hs
mit
olivedrab = (0.41960800, 0.55686300, 0.13725500, 1.0)
64
olivedrab = (0.41960800, 0.55686300, 0.13725500, 1.0)
64
olivedrab = (0.41960800, 0.55686300, 0.13725500, 1.0)
64
false
false
0
5
16
18
11
7
null
null
vladimir-ipatov/ganeti
src/Ganeti/Constants.hs
gpl-2.0
nvDrbdlist :: String nvDrbdlist = "drbd-list"
45
nvDrbdlist :: String nvDrbdlist = "drbd-list"
45
nvDrbdlist = "drbd-list"
24
false
true
0
6
5
18
7
11
null
null
TomMD/irc-core
driver/Main.hs
bsd-3-clause
-- exit silently socketLoop :: TChan (UTCTime, MsgFromServer) -> Connection -> Maybe Handle -> IO () socketLoop chan h hErr = forever (atomically . writeTChan chan =<< getOne h hErr) `catches` [ Handler $ \ioe -> do let msg = if isEOFError ioe then "Connection terminated" ...
623
socketLoop :: TChan (UTCTime, MsgFromServer) -> Connection -> Maybe Handle -> IO () socketLoop chan h hErr = forever (atomically . writeTChan chan =<< getOne h hErr) `catches` [ Handler $ \ioe -> do let msg = if isEOFError ioe then "Connection terminated" else Text.e...
605
socketLoop chan h hErr = forever (atomically . writeTChan chan =<< getOne h hErr) `catches` [ Handler $ \ioe -> do let msg = if isEOFError ioe then "Connection terminated" else Text.encodeUtf8 (Text.pack (show ioe)) now <- getCurrentTime atomically ...
521
true
true
0
22
176
231
114
117
null
null
nhibberd/toaster
src/Toaster/main.hs
mit
main :: IO () main = do pool <- mkpool runmigrate pool scotty 3030 $ do middleware logStdoutDev middleware $ staticPolicy (addBase "web") Http.toastermain pool
175
main :: IO () main = do pool <- mkpool runmigrate pool scotty 3030 $ do middleware logStdoutDev middleware $ staticPolicy (addBase "web") Http.toastermain pool
175
main = do pool <- mkpool runmigrate pool scotty 3030 $ do middleware logStdoutDev middleware $ staticPolicy (addBase "web") Http.toastermain pool
161
false
true
0
13
40
69
29
40
null
null
andygill/er-systemf
Language/SystemF/Eval.hs
bsd-3-clause
evalCase env _ _ _ = error "attempting to case a lambda expression"
67
evalCase env _ _ _ = error "attempting to case a lambda expression"
67
evalCase env _ _ _ = error "attempting to case a lambda expression"
67
false
false
1
5
12
19
7
12
null
null
brendanhay/gogol
gogol-blogger/gen/Network/Google/Resource/Blogger/Blogs/Get.hs
mpl-2.0
-- | Creates a value of 'BlogsGet' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'bgXgafv' -- -- * 'bgUploadProtocol' -- -- * 'bgAccessToken' -- -- * 'bgUploadType' -- -- * 'bgBlogId' -- -- * 'bgMaxPosts' -- -- * 'bgView' -- -- * 'bg...
651
blogsGet :: Text -- ^ 'bgBlogId' -> BlogsGet blogsGet pBgBlogId_ = BlogsGet' { _bgXgafv = Nothing , _bgUploadProtocol = Nothing , _bgAccessToken = Nothing , _bgUploadType = Nothing , _bgBlogId = pBgBlogId_ , _bgMaxPosts = Nothing , _bgView = Nothing , _bgCallback = Nothing ...
321
blogsGet pBgBlogId_ = BlogsGet' { _bgXgafv = Nothing , _bgUploadProtocol = Nothing , _bgAccessToken = Nothing , _bgUploadType = Nothing , _bgBlogId = pBgBlogId_ , _bgMaxPosts = Nothing , _bgView = Nothing , _bgCallback = Nothing }
268
true
true
0
6
152
88
62
26
null
null
markus1189/xmonad-contrib-710
XMonad/Hooks/DebugEvents.hs
bsd-3-clause
dumpProp _ "_NET_DESKTOP_GEOMETRY" = dumpArray dump32
73
dumpProp _ "_NET_DESKTOP_GEOMETRY" = dumpArray dump32
73
dumpProp _ "_NET_DESKTOP_GEOMETRY" = dumpArray dump32
73
false
false
0
5
25
14
6
8
null
null
agomezl/fluffy-chainsaw
test/Main.hs
mit
prop5 ∷ Property prop5 = forAll (listOf $ choose (0,1)) rawProp where rawProp x = m5Check x == accepts m5 x
111
prop5 ∷ Property prop5 = forAll (listOf $ choose (0,1)) rawProp where rawProp x = m5Check x == accepts m5 x
111
prop5 = forAll (listOf $ choose (0,1)) rawProp where rawProp x = m5Check x == accepts m5 x
94
false
true
2
9
24
64
27
37
null
null
gbaz/haskell-platform
hptool/src/OS/Internal.hs
bsd-3-clause
genericOS :: BuildConfig -> OS genericOS BuildConfig{..} = OS{..} where HpVersion{..} = bcHpVersion GhcVersion{..} = bcGhcVersion osHpPrefix = "/usr/local/haskell-platform" </> showVersion hpVersion osGhcPrefix = "/usr/local/ghc" </> showVersion ghcVersion osGhcLocalInstall = GhcInstallConfigure ...
1,519
genericOS :: BuildConfig -> OS genericOS BuildConfig{..} = OS{..} where HpVersion{..} = bcHpVersion GhcVersion{..} = bcGhcVersion osHpPrefix = "/usr/local/haskell-platform" </> showVersion hpVersion osGhcPrefix = "/usr/local/ghc" </> showVersion ghcVersion osGhcLocalInstall = GhcInstallConfigure ...
1,519
genericOS BuildConfig{..} = OS{..} where HpVersion{..} = bcHpVersion GhcVersion{..} = bcGhcVersion osHpPrefix = "/usr/local/haskell-platform" </> showVersion hpVersion osGhcPrefix = "/usr/local/ghc" </> showVersion ghcVersion osGhcLocalInstall = GhcInstallConfigure osGhcTargetInstall = GhcInst...
1,488
false
true
19
20
368
418
205
213
null
null
minoki/LambdaQuest
src/LambdaQuest/SystemFsub/Coercion.hs
bsd-3-clause
joinType ctx (TyArr s0 s1) (TyArr t0 t1) = case meetType ctx s0 t0 of Just u -> TyArr u $ joinType (AnonymousBind : ctx) s1 t1 Nothing -> TyTop
157
joinType ctx (TyArr s0 s1) (TyArr t0 t1) = case meetType ctx s0 t0 of Just u -> TyArr u $ joinType (AnonymousBind : ctx) s1 t1 Nothing -> TyTop
157
joinType ctx (TyArr s0 s1) (TyArr t0 t1) = case meetType ctx s0 t0 of Just u -> TyArr u $ joinType (AnonymousBind : ctx) s1 t1 Nothing -> TyTop
157
false
false
0
11
43
76
36
40
null
null
jthornber/language-c-ejt
src/Language/C/Analysis/ConstEval.hs
bsd-3-clause
intOp CXorOp i1 i2 = i1 `xor` i2
32
intOp CXorOp i1 i2 = i1 `xor` i2
32
intOp CXorOp i1 i2 = i1 `xor` i2
32
false
false
0
5
7
19
10
9
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Fortran.hs
gpl-2.0
list_transform'5ffn = Set.fromList $ words $ "repeat trim selected_int_kind selected_real_kind transfer dot_product matmul all any count maxval minval product sum pack unpack reshape spread cshift eoshift transpose maxloc minloc"
229
list_transform'5ffn = Set.fromList $ words $ "repeat trim selected_int_kind selected_real_kind transfer dot_product matmul all any count maxval minval product sum pack unpack reshape spread cshift eoshift transpose maxloc minloc"
229
list_transform'5ffn = Set.fromList $ words $ "repeat trim selected_int_kind selected_real_kind transfer dot_product matmul all any count maxval minval product sum pack unpack reshape spread cshift eoshift transpose maxloc minloc"
229
false
false
0
7
28
16
8
8
null
null
konn/hint-forked
src/Hint/Context.hs
bsd-3-clause
setImports :: MonadInterpreter m => [ModuleName] -> m () setImports ms = setImportsQ $ zip ms (repeat Nothing)
110
setImports :: MonadInterpreter m => [ModuleName] -> m () setImports ms = setImportsQ $ zip ms (repeat Nothing)
110
setImports ms = setImportsQ $ zip ms (repeat Nothing)
53
false
true
2
9
17
55
24
31
null
null
ekmett/ghclive
prototypes/sharededitor/WsTest.hs
bsd-3-clause
sockets :: Editor -> WS.Request -> WS.WebSockets WS.Hybi10 () sockets y req | WS.requestPath req == "/edit" = accept editSocket | otherwise = WS.rejectRequest req "Not found" where accept a = WS.acceptRequest req >> a y
251
sockets :: Editor -> WS.Request -> WS.WebSockets WS.Hybi10 () sockets y req | WS.requestPath req == "/edit" = accept editSocket | otherwise = WS.rejectRequest req "Not found" where accept a = WS.acceptRequest req >> a y
251
sockets y req | WS.requestPath req == "/edit" = accept editSocket | otherwise = WS.rejectRequest req "Not found" where accept a = WS.acceptRequest req >> a y
189
false
true
1
10
67
92
42
50
null
null
olsner/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
floatFromIntegerIdKey = mkPreludeMiscIdUnique 85
56
floatFromIntegerIdKey = mkPreludeMiscIdUnique 85
56
floatFromIntegerIdKey = mkPreludeMiscIdUnique 85
56
false
false
0
5
11
9
4
5
null
null
synsem/texhs
src/Text/TeX/Context/Walk.hs
gpl-3.0
-- | @list bullet p@ parses zero or more occurrences of @p@, each prefixed by @bullet@. -- Returns a list of values returned by @p@. -- -- Note: @p@ must not overlap with @bullet@. list :: Parser a -> Parser b -> Parser [b] list bullet p = many (bullet *> p)
258
list :: Parser a -> Parser b -> Parser [b] list bullet p = many (bullet *> p)
77
list bullet p = many (bullet *> p)
34
true
true
0
8
51
54
27
27
null
null
brendanhay/semver
src/Data/SemVer.hs
mpl-2.0
-- | A default 'Version' which can be used to signify initial development. -- -- Note: Equivalent to @0.0.0@ initial :: Version initial = version 0 0 0 [] []
157
initial :: Version initial = version 0 0 0 [] []
48
initial = version 0 0 0 [] []
29
true
true
0
6
29
29
16
13
null
null
cartazio/HaNS
examples/echo-server/Main.hs
bsd-3-clause
showExceptions :: String -> IO a -> IO a showExceptions l m = m `catch` \ e -> do print (l, e :: SomeException) throwIO e
128
showExceptions :: String -> IO a -> IO a showExceptions l m = m `catch` \ e -> do print (l, e :: SomeException) throwIO e
128
showExceptions l m = m `catch` \ e -> do print (l, e :: SomeException) throwIO e
87
false
true
0
11
32
70
33
37
null
null
laugh-at-me/recurrence
src/Math.hs
gpl-3.0
commutativity SZ (SS n) = unsafeCoerce Refl
43
commutativity SZ (SS n) = unsafeCoerce Refl
43
commutativity SZ (SS n) = unsafeCoerce Refl
43
false
false
0
6
6
22
9
13
null
null
aelve/hslibs
src/Guide/State.hs
bsd-3-clause
-- | Converts 'GlobalState' to 'PublicDB' type stripping private data. toPublicDB :: GlobalState -> PublicDB toPublicDB GlobalState{..} = PublicDB { publicCategories = _categories, publicCategoriesDeleted = _categoriesDeleted, publicActions = _actions, publicPendingEdits = _pendi...
433
toPublicDB :: GlobalState -> PublicDB toPublicDB GlobalState{..} = PublicDB { publicCategories = _categories, publicCategoriesDeleted = _categoriesDeleted, publicActions = _actions, publicPendingEdits = _pendingEdits, publicEditIdCounter = _editIdCounter, publicUsers ...
362
toPublicDB GlobalState{..} = PublicDB { publicCategories = _categories, publicCategoriesDeleted = _categoriesDeleted, publicActions = _actions, publicPendingEdits = _pendingEdits, publicEditIdCounter = _editIdCounter, publicUsers = fmap userToPublic _users...
324
true
true
0
7
106
68
40
28
null
null
wincent/docvim
lib/Text/Docvim/Printer/Vim.hs
mit
slurp :: String -> Env slurp str = do context <- get put (Context (lineBreak context) (partial context)) return [Slurp str] where -- eg. (partialLine context) | str | result -- ----------------------|------------|------- -- "" | "\n" | "" -- "foo" ...
831
slurp :: String -> Env slurp str = do context <- get put (Context (lineBreak context) (partial context)) return [Slurp str] where -- eg. (partialLine context) | str | result -- ----------------------|------------|------- -- "" | "\n" | "" -- "foo" ...
831
slurp str = do context <- get put (Context (lineBreak context) (partial context)) return [Slurp str] where -- eg. (partialLine context) | str | result -- ----------------------|------------|------- -- "" | "\n" | "" -- "foo" | "\n" ...
808
false
true
1
11
334
142
70
72
null
null
vTurbine/ghc
compiler/typecheck/TcRnTypes.hs
bsd-3-clause
pprCtO StandAloneDerivOrigin = text "a 'deriving' declaration"
62
pprCtO StandAloneDerivOrigin = text "a 'deriving' declaration"
62
pprCtO StandAloneDerivOrigin = text "a 'deriving' declaration"
62
false
false
0
5
6
13
5
8
null
null
mumuki/mulang
src/Data/Count.hs
gpl-3.0
encodeMaybe n | n >= 1 = Just $ MoreThanOne (fromIntegral n)
60
encodeMaybe n | n >= 1 = Just $ MoreThanOne (fromIntegral n)
60
encodeMaybe n | n >= 1 = Just $ MoreThanOne (fromIntegral n)
60
false
false
0
9
11
35
15
20
null
null
copumpkin/charm
src/Architecture/ARM/Pretty.hs
bsd-3-clause
showInstruction (SXTB rd d) = printf "SXTB%%s %s, %s" (showRegister rd) (showDataOp d)
103
showInstruction (SXTB rd d) = printf "SXTB%%s %s, %s" (showRegister rd) (showDataOp d)
103
showInstruction (SXTB rd d) = printf "SXTB%%s %s, %s" (showRegister rd) (showDataOp d)
103
false
false
0
7
29
36
17
19
null
null
plaprade/haskoin
haskoin-core/src/Network/Haskoin/Block/Headers.hs
unlicense
connectBlock :: BlockHeaders m => Timestamp -- ^ current time -> BlockHeader -> m (Either String BlockNode) connectBlock t bh = runExceptT $ do par <- ExceptT $ parentBlock bh pars <- lift $ getParents 10 par skM <- lift $ getAncestor (skipHeight (nodeHeight par...
728
connectBlock :: BlockHeaders m => Timestamp -- ^ current time -> BlockHeader -> m (Either String BlockNode) connectBlock t bh = runExceptT $ do par <- ExceptT $ parentBlock bh pars <- lift $ getParents 10 par skM <- lift $ getAncestor (skipHeight (nodeHeight par...
728
connectBlock t bh = runExceptT $ do par <- ExceptT $ parentBlock bh pars <- lift $ getParents 10 par skM <- lift $ getAncestor (skipHeight (nodeHeight par + 1)) par sk <- case skM of Just sk -> return sk Nothing -> throwError $ "BUG: Could not get skip for block " ++ s...
574
false
true
0
16
234
251
114
137
null
null
timsears/species
Math/Combinatorics/Species/Class.hs
bsd-3-clause
elements :: Species s => s elements = element
45
elements :: Species s => s elements = element
45
elements = element
18
false
true
0
6
8
18
9
9
null
null
christiaanb/ghc
compiler/types/InstEnv.hs
bsd-3-clause
-- | Checks for an exact match of ClsInst in the instance environment. -- We use this when we do signature checking in TcRnDriver memberInstEnv :: InstEnv -> ClsInst -> Bool memberInstEnv inst_env ins_item@(ClsInst { is_cls_nm = cls_nm } ) = maybe False (\(ClsIE items) -> any (identicalClsInstHead ins_item) items) ...
357
memberInstEnv :: InstEnv -> ClsInst -> Bool memberInstEnv inst_env ins_item@(ClsInst { is_cls_nm = cls_nm } ) = maybe False (\(ClsIE items) -> any (identicalClsInstHead ins_item) items) (lookupUFM inst_env cls_nm)
227
memberInstEnv inst_env ins_item@(ClsInst { is_cls_nm = cls_nm } ) = maybe False (\(ClsIE items) -> any (identicalClsInstHead ins_item) items) (lookupUFM inst_env cls_nm)
183
true
true
0
10
66
83
43
40
null
null
narurien/ganeti-ceph
src/Ganeti/Confd/Server.hs
gpl-2.0
gntErrorToResult (Ok x) = Ok x
30
gntErrorToResult (Ok x) = Ok x
30
gntErrorToResult (Ok x) = Ok x
30
false
false
0
7
5
18
8
10
null
null
mortberg/cubicaltt
CTT.hs
mit
showDecls :: Decls -> Doc showDecls (MutualDecls _ defs) = hsep $ punctuate comma [ text x <+> equals <+> showTer d | (x,(_,d)) <- defs ]
141
showDecls :: Decls -> Doc showDecls (MutualDecls _ defs) = hsep $ punctuate comma [ text x <+> equals <+> showTer d | (x,(_,d)) <- defs ]
141
showDecls (MutualDecls _ defs) = hsep $ punctuate comma [ text x <+> equals <+> showTer d | (x,(_,d)) <- defs ]
115
false
true
0
9
30
73
37
36
null
null
coolhacks/scripts-hacks
examples/shellcheck-master/ShellCheck/Analytics.hs
mit
prop_getBracedReference9 = getBracedReference "foo:-bar" == "foo"
65
prop_getBracedReference9 = getBracedReference "foo:-bar" == "foo"
65
prop_getBracedReference9 = getBracedReference "foo:-bar" == "foo"
65
false
false
0
6
5
13
6
7
null
null
apyrgio/snf-ganeti
src/Ganeti/OpParams.hs
bsd-2-clause
pRequiredNodes :: Field pRequiredNodes = withDoc "Required list of node names" . renameField "ReqNodes " $ simpleField "nodes" [t| [NonEmptyString] |]
154
pRequiredNodes :: Field pRequiredNodes = withDoc "Required list of node names" . renameField "ReqNodes " $ simpleField "nodes" [t| [NonEmptyString] |]
154
pRequiredNodes = withDoc "Required list of node names" . renameField "ReqNodes " $ simpleField "nodes" [t| [NonEmptyString] |]
130
false
true
0
7
24
34
18
16
null
null
ttsiodras/Score4
Haskell/score4.hs
gpl-2.0
(width,height) = (7,6)
22
(width,height) = (7,6)
22
(width,height) = (7,6)
22
false
false
0
5
2
19
11
8
null
null
DanielWaterworth/Idris-dev
src/IRTS/CodegenLLVM.hs
bsd-3-clause
cgOp (LSHL ITBig) [x,y] = mpzBit "mul_2exp" x y
49
cgOp (LSHL ITBig) [x,y] = mpzBit "mul_2exp" x y
49
cgOp (LSHL ITBig) [x,y] = mpzBit "mul_2exp" x y
49
false
false
0
7
10
30
15
15
null
null
gnn/Hets
Driver/Options.hs
gpl-2.0
-- | 'parseTransOpt' parses a 'Trans' Flag from user input parseTransOpt :: String -> Flag parseTransOpt = Trans . map mkSimpleId . splitPaths
142
parseTransOpt :: String -> Flag parseTransOpt = Trans . map mkSimpleId . splitPaths
83
parseTransOpt = Trans . map mkSimpleId . splitPaths
51
true
true
0
7
22
34
15
19
null
null
apyrgio/ganeti
src/Ganeti/Utils.hs
bsd-2-clause
-- | Ensure a value is quoted if needed. ensureQuoted :: String -> String ensureQuoted v = if not (all (\c -> isAlphaNum c || c == '.') v) then '\'':v ++ "'" else v
198
ensureQuoted :: String -> String ensureQuoted v = if not (all (\c -> isAlphaNum c || c == '.') v) then '\'':v ++ "'" else v
157
ensureQuoted v = if not (all (\c -> isAlphaNum c || c == '.') v) then '\'':v ++ "'" else v
124
true
true
0
13
68
65
34
31
null
null
ssaavedra/liquidhaskell
benchmarks/vector-0.10.0.1/Data/Vector.hs
bsd-3-clause
prescanr' = G.prescanr'
23
prescanr' = G.prescanr'
23
prescanr' = G.prescanr'
23
false
false
0
5
2
8
4
4
null
null
quephird/todo.hs
src/Models/Task.hs
mit
toKey :: ToBackendKey SqlBackend a => Integer -> Key a toKey i = toSqlKey $ fromIntegral (i :: Integer)
103
toKey :: ToBackendKey SqlBackend a => Integer -> Key a toKey i = toSqlKey $ fromIntegral (i :: Integer)
103
toKey i = toSqlKey $ fromIntegral (i :: Integer)
48
false
true
2
8
18
48
22
26
null
null
E2LP/e2asm
src/E2ASM/Assembler/Lexer.hs
gpl-3.0
tokenizeSpacesLeft :: PT.Parser a -> PT.Parser a tokenizeSpacesLeft p = (P.spaces >> P.optional tokenizeComment >> P.spaces) *> p
129
tokenizeSpacesLeft :: PT.Parser a -> PT.Parser a tokenizeSpacesLeft p = (P.spaces >> P.optional tokenizeComment >> P.spaces) *> p
129
tokenizeSpacesLeft p = (P.spaces >> P.optional tokenizeComment >> P.spaces) *> p
80
false
true
0
10
17
52
25
27
null
null
sdiehl/ghc
compiler/typecheck/FamInst.hs
bsd-3-clause
newFamInst :: FamFlavor -> CoAxiom Unbranched -> TcM FamInst -- Freshen the type variables of the FamInst branches newFamInst flavor axiom@(CoAxiom { co_ax_tc = fam_tc }) = ASSERT2( tyCoVarsOfTypes lhs `subVarSet` tcv_set, text "lhs" <+> pp_ax ) ASSERT2( lhs_kind `eqType` rhs_kind, text "kind" <+> pp_ax $$ ppr lh...
7,290
newFamInst :: FamFlavor -> CoAxiom Unbranched -> TcM FamInst newFamInst flavor axiom@(CoAxiom { co_ax_tc = fam_tc }) = ASSERT2( tyCoVarsOfTypes lhs `subVarSet` tcv_set, text "lhs" <+> pp_ax ) ASSERT2( lhs_kind `eqType` rhs_kind, text "kind" <+> pp_ax $$ ppr lhs_kind $$ ppr rhs_kind ) -- We used to have an ass...
7,236
newFamInst flavor axiom@(CoAxiom { co_ax_tc = fam_tc }) = ASSERT2( tyCoVarsOfTypes lhs `subVarSet` tcv_set, text "lhs" <+> pp_ax ) ASSERT2( lhs_kind `eqType` rhs_kind, text "kind" <+> pp_ax $$ ppr lhs_kind $$ ppr rhs_kind ) -- We used to have an assertion that the tyvars of the RHS were bound -- by tcv_se...
7,175
true
true
3
15
2,307
493
260
233
null
null
f1u77y/xmonad-contrib
XMonad/Config/Droundy.hs
bsd-3-clause
dropFromHead h s | take (length h) s == h = Just $ drop (length h) s | otherwise = Nothing
107
dropFromHead h s | take (length h) s == h = Just $ drop (length h) s | otherwise = Nothing
107
dropFromHead h s | take (length h) s == h = Just $ drop (length h) s | otherwise = Nothing
107
false
false
0
11
37
63
27
36
null
null
diminishedprime/.org
programmey_stuff/write_yourself_a_scheme/ch_08/wyas/app/Parser.hs
mit
parseExpr :: Parser LispVal parseExpr = parseAtom <|> parseString <|> try parseRatio <|> try parseFloat <|> try parseComplex <|> try parseNumber <|> try parseBool <|> try parseCharacter <|> parseQuasiQuoted <|> parseUnQuote <|> pa...
402
parseExpr :: Parser LispVal parseExpr = parseAtom <|> parseString <|> try parseRatio <|> try parseFloat <|> try parseComplex <|> try parseNumber <|> try parseBool <|> try parseCharacter <|> parseQuasiQuoted <|> parseUnQuote <|> pa...
402
parseExpr = parseAtom <|> parseString <|> try parseRatio <|> try parseFloat <|> try parseComplex <|> try parseNumber <|> try parseBool <|> try parseCharacter <|> parseQuasiQuoted <|> parseUnQuote <|> parseQuoted <|> char ...
374
false
true
35
8
142
140
70
70
null
null
sinelaw/cv-combinators
src/Test.hs
gpl-2.0
edges :: ImageProcessor edges = canny 30 190 3
46
edges :: ImageProcessor edges = canny 30 190 3
46
edges = canny 30 190 3
22
false
true
0
5
8
18
9
9
null
null
kmels/dart-haskell
examples/interpreter/Lists.hs
bsd-3-clause
mytake n (x:xs) = x : mytake (n-1) xs
47
mytake n (x:xs) = x : mytake (n-1) xs
47
mytake n (x:xs) = x : mytake (n-1) xs
47
false
false
2
7
18
37
17
20
null
null
bordaigorl/jamesbound
src/Language/PiCalc/Analysis/Hierarchical.hs
gpl-2.0
reach :: Ord n => AdjMap n -> (n, Set n) -> Either (Set n) (AdjMap n) reach graph (n, adj) | n ∊ new = Left $ Set.filter connected new | otherwise = Right $ Map.mapWithKey insNew graph' where new = adj ∪ Set.unions [ adjacent x graph | x <- Set.elems adj ] graph' = Map.insertWith (∪) n new graph ...
448
reach :: Ord n => AdjMap n -> (n, Set n) -> Either (Set n) (AdjMap n) reach graph (n, adj) | n ∊ new = Left $ Set.filter connected new | otherwise = Right $ Map.mapWithKey insNew graph' where new = adj ∪ Set.unions [ adjacent x graph | x <- Set.elems adj ] graph' = Map.insertWith (∪) n new graph ...
448
reach graph (n, adj) | n ∊ new = Left $ Set.filter connected new | otherwise = Right $ Map.mapWithKey insNew graph' where new = adj ∪ Set.unions [ adjacent x graph | x <- Set.elems adj ] graph' = Map.insertWith (∪) n new graph insNew x rs | n ∊ rs = Set.union rs new | otherwis...
378
false
true
5
11
131
241
109
132
null
null
futtetennista/IntroductionToFunctionalProgramming
itfp/src/Chapter3.hs
mit
rev2 xs = xs
14
rev2 xs = xs
14
rev2 xs = xs
14
false
false
1
5
5
13
4
9
null
null
tjakway/ghcjvm
compiler/nativeGen/Dwarf/Constants.hs
bsd-3-clause
dW_CFA_same_value = 0x08
32
dW_CFA_same_value = 0x08
32
dW_CFA_same_value = 0x08
32
false
false
0
4
10
6
3
3
null
null
unisonweb/platform
parser-typechecker/src/Unison/Codebase/FileCodebase/Common.hs
mit
touchIdFile :: MonadIO m => Reference.Id -> FilePath -> m () touchIdFile id fp = touchFile (fp </> encodeFileName (componentIdToString id))
141
touchIdFile :: MonadIO m => Reference.Id -> FilePath -> m () touchIdFile id fp = touchFile (fp </> encodeFileName (componentIdToString id))
141
touchIdFile id fp = touchFile (fp </> encodeFileName (componentIdToString id))
80
false
true
0
10
22
57
27
30
null
null
nightscape/platform
shared/src/Unison/ABT.hs
mit
freshNamed' :: Var v => Set v -> Text -> v freshNamed' used n = fresh' used (v' n)
82
freshNamed' :: Var v => Set v -> Text -> v freshNamed' used n = fresh' used (v' n)
82
freshNamed' used n = fresh' used (v' n)
39
false
true
0
7
18
45
21
24
null
null
bitemyapp/machines
src/Data/Machine/Process.hs
bsd-3-clause
-- | Feed a 'Process' some input. supply :: forall f m a b . (Foldable f, Monad m) => f a -> ProcessT m a b -> ProcessT m a b supply xs = foldr go id xs where go :: a -> (ProcessT m a b -> ProcessT m a b) -> ProcessT m a b -> ProcessT m a b go x r m = MachineT $ do ...
883
supply :: forall f m a b . (Foldable f, Monad m) => f a -> ProcessT m a b -> ProcessT m a b supply xs = foldr go id xs where go :: a -> (ProcessT m a b -> ProcessT m a b) -> ProcessT m a b -> ProcessT m a b go x r m = MachineT $ do v <- runMachineT m ...
849
supply xs = foldr go id xs where go :: a -> (ProcessT m a b -> ProcessT m a b) -> ProcessT m a b -> ProcessT m a b go x r m = MachineT $ do v <- runMachineT m case v of Stop -> return Stop Await f Refl _ -> runMachineT $ r (f x)...
757
true
true
2
14
262
243
117
126
null
null
sdiehl/ghc
compiler/coreSyn/PprCore.hs
bsd-3-clause
pprUntypedBinder :: Var -> SDoc pprUntypedBinder binder | isTyVar binder = text "@" <> ppr binder -- NB: don't print kind | otherwise = pprIdBndr binder
164
pprUntypedBinder :: Var -> SDoc pprUntypedBinder binder | isTyVar binder = text "@" <> ppr binder -- NB: don't print kind | otherwise = pprIdBndr binder
164
pprUntypedBinder binder | isTyVar binder = text "@" <> ppr binder -- NB: don't print kind | otherwise = pprIdBndr binder
132
false
true
1
8
37
48
22
26
null
null
olsner/ghc
testsuite/tests/programs/galois_raytrace/Interval.hs
bsd-3-clause
cmpI :: Intersection a -> Intersection a -> Ordering cmpI (i, _, _) (j, _, _) | i `near` j = EQ | i < j = LT | otherwise = GT
137
cmpI :: Intersection a -> Intersection a -> Ordering cmpI (i, _, _) (j, _, _) | i `near` j = EQ | i < j = LT | otherwise = GT
137
cmpI (i, _, _) (j, _, _) | i `near` j = EQ | i < j = LT | otherwise = GT
84
false
true
2
8
43
81
42
39
null
null
ice1000/OI-codes
codewars/301-400/esolang-interpreters-number-3-custom-paintf-star-star-k-interpreter-giveup.hs
agpl-3.0
interpreter code x y = undefined where initialize x y = take y $ repeat $ const 0 <$> [1..x] --
97
interpreter code x y = undefined where initialize x y = take y $ repeat $ const 0 <$> [1..x] --
97
interpreter code x y = undefined where initialize x y = take y $ repeat $ const 0 <$> [1..x] --
97
false
false
0
8
22
49
24
25
null
null
ecaustin/haskhol-core
src/HaskHOL/Core/State.hs
bsd-2-clause
mkBinary :: (HOLTermRep tm1 cls thry, HOLTermRep tm2 cls thry) => Text -> tm1 -> tm2 -> HOL cls thry HOLTerm mkBinary op = let ?constsFun = constants in overload2 (O.mkBinary op)
187
mkBinary :: (HOLTermRep tm1 cls thry, HOLTermRep tm2 cls thry) => Text -> tm1 -> tm2 -> HOL cls thry HOLTerm mkBinary op = let ?constsFun = constants in overload2 (O.mkBinary op)
187
mkBinary op = let ?constsFun = constants in overload2 (O.mkBinary op)
69
false
true
0
10
40
82
39
43
null
null
codygman/Frames
demo/TimeZones/src/TimeIn.hs
bsd-3-clause
-- | Try to parse a 'LocalTime' value using common formats. parseLocalTime :: MonadPlus m => T.Text -> m LocalTime parseLocalTime t = msum (map (($ T.unpack t) . mkParser) formats) where formats = ["%F %T", "%F"] mkParser = parseTimeM True defaultTimeLocale -- | @zonedTime "America/Chicago"@ will create a 'P...
431
parseLocalTime :: MonadPlus m => T.Text -> m LocalTime parseLocalTime t = msum (map (($ T.unpack t) . mkParser) formats) where formats = ["%F %T", "%F"] mkParser = parseTimeM True defaultTimeLocale -- | @zonedTime "America/Chicago"@ will create a 'Parseable' instance -- for the type @TimeIn "America/Chicago"...
371
parseLocalTime t = msum (map (($ T.unpack t) . mkParser) formats) where formats = ["%F %T", "%F"] mkParser = parseTimeM True defaultTimeLocale -- | @zonedTime "America/Chicago"@ will create a 'Parseable' instance -- for the type @TimeIn "America/Chicago"@. You can then use this type -- when loading data.
316
true
true
1
12
77
86
45
41
null
null
janschulz/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
trimInlinesF :: F Inlines -> F Inlines trimInlinesF = liftM trimInlines
71
trimInlinesF :: F Inlines -> F Inlines trimInlinesF = liftM trimInlines
71
trimInlinesF = liftM trimInlines
32
false
true
0
6
10
24
11
13
null
null
Happstack/happstack-server
src/Happstack/Server/RqData.hs
bsd-3-clause
apEither :: (Monoid e) => Either e (a -> b) -> Either e a -> Either e b apEither (Left errs1) (Left errs2) = Left (errs1 `mappend` errs2)
137
apEither :: (Monoid e) => Either e (a -> b) -> Either e a -> Either e b apEither (Left errs1) (Left errs2) = Left (errs1 `mappend` errs2)
137
apEither (Left errs1) (Left errs2) = Left (errs1 `mappend` errs2)
65
false
true
0
9
27
79
40
39
null
null
jeremyong/Yaiba
Yaiba/Monomial.hs
bsd-3-clause
gcdMon Constant _ = Constant
35
gcdMon Constant _ = Constant
35
gcdMon Constant _ = Constant
35
false
false
0
5
11
11
5
6
null
null
5outh/textlunky
src/Types/Entity.hs
mit
canPickUp (Item' _) = True
32
canPickUp (Item' _) = True
32
canPickUp (Item' _) = True
32
false
false
0
6
10
16
7
9
null
null
JamieBeverley/InnerEar
src/InnerEar/Types/Data.hs
gpl-3.0
toDatum :: (JSON c, JSON q, JSON a, JSON e, JSON s) => ExerciseDatum -> Result (Datum c q a e s) toDatum ExerciseStarted = return Started
137
toDatum :: (JSON c, JSON q, JSON a, JSON e, JSON s) => ExerciseDatum -> Result (Datum c q a e s) toDatum ExerciseStarted = return Started
137
toDatum ExerciseStarted = return Started
40
false
true
0
9
26
71
35
36
null
null
technogeeky/d-A
include/containers-0.5.0.0/Data/Map/Base.hs
gpl-3.0
maxViewWithKey x = Just (deleteFindMax x)
43
maxViewWithKey x = Just (deleteFindMax x)
43
maxViewWithKey x = Just (deleteFindMax x)
43
false
false
1
7
7
22
8
14
null
null
UCSD-PL/RefScript
src/Language/Rsc/SSA/SSA.hs
bsd-3-clause
ssaStmt g (WhileStmt l cnd body) = do (gc, sc, cnd') <- ssaExpr g cnd -- Do not allow updates in the conditional unless (null sc) (ssaError $ errorUpdateInExpr (srcPos l) cnd) (gNopt, body') <- ssaStmt gc body case gNopt of Just gN -> do let (_, δ, ν) = envProgress (mSSA g) (mSSA g...
538
ssaStmt g (WhileStmt l cnd body) = do (gc, sc, cnd') <- ssaExpr g cnd -- Do not allow updates in the conditional unless (null sc) (ssaError $ errorUpdateInExpr (srcPos l) cnd) (gNopt, body') <- ssaStmt gc body case gNopt of Just gN -> do let (_, δ, ν) = envProgress (mSSA g) (mSSA g...
538
ssaStmt g (WhileStmt l cnd body) = do (gc, sc, cnd') <- ssaExpr g cnd -- Do not allow updates in the conditional unless (null sc) (ssaError $ errorUpdateInExpr (srcPos l) cnd) (gNopt, body') <- ssaStmt gc body case gNopt of Just gN -> do let (_, δ, ν) = envProgress (mSSA g) (mSSA g...
538
false
false
0
17
173
230
110
120
null
null
shockkolate/containers
Data/IntMap/Base.hs
bsd-3-clause
updateMaxWithKey :: (Key -> a -> Maybe a) -> IntMap a -> IntMap a updateMaxWithKey f t = case t of Bin p m l r | m < 0 -> bin p m (go f l) r _ -> go f t where go f' (Bin p m l r) = bin p m l (go f' r) go f' (Tip k y) = case f' k y of Just y' -> Tip k y' ...
659
updateMaxWithKey :: (Key -> a -> Maybe a) -> IntMap a -> IntMap a updateMaxWithKey f t = case t of Bin p m l r | m < 0 -> bin p m (go f l) r _ -> go f t where go f' (Bin p m l r) = bin p m l (go f' r) go f' (Tip k y) = case f' k y of Just y' -> Tip k y' ...
659
updateMaxWithKey f t = case t of Bin p m l r | m < 0 -> bin p m (go f l) r _ -> go f t where go f' (Bin p m l r) = bin p m l (go f' r) go f' (Tip k y) = case f' k y of Just y' -> Tip k y' Nothing -> Nil go _ Nil = error "updateMaxWithKey Nil" ...
593
false
true
1
11
207
219
101
118
null
null
mrmonday/Idris-dev
src/IRTS/JavaScript/AST.hs
bsd-3-clause
compileJS' indent (JSNum num) | JSInt i <- num = T.pack (show i) | JSFloat f <- num = T.pack (show f) | JSInteger JSBigZero <- num = T.pack "i$ZERO" | JSInteger JSBigOne <- num = T.pack "i$ONE" | JSInteger (JSBigInt i) <- num = T.pack (show i) | JSInteg...
412
compileJS' indent (JSNum num) | JSInt i <- num = T.pack (show i) | JSFloat f <- num = T.pack (show f) | JSInteger JSBigZero <- num = T.pack "i$ZERO" | JSInteger JSBigOne <- num = T.pack "i$ONE" | JSInteger (JSBigInt i) <- num = T.pack (show i) | JSInteg...
412
compileJS' indent (JSNum num) | JSInt i <- num = T.pack (show i) | JSFloat f <- num = T.pack (show f) | JSInteger JSBigZero <- num = T.pack "i$ZERO" | JSInteger JSBigOne <- num = T.pack "i$ONE" | JSInteger (JSBigInt i) <- num = T.pack (show i) | JSInteg...
412
false
false
0
11
134
197
90
107
null
null