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
supermario/stack
src/main/Main.hs
bsd-3-clause
-- | List the dependencies listDependenciesCmd :: Text -> GlobalOpts -> IO () listDependenciesCmd sep go = withBuildConfig go (listDependencies sep') where sep' = T.replace "\\t" "\t" (T.replace "\\n" "\n" sep) -- | Query build information
242
listDependenciesCmd :: Text -> GlobalOpts -> IO () listDependenciesCmd sep go = withBuildConfig go (listDependencies sep') where sep' = T.replace "\\t" "\t" (T.replace "\\n" "\n" sep) -- | Query build information
215
listDependenciesCmd sep go = withBuildConfig go (listDependencies sep') where sep' = T.replace "\\t" "\t" (T.replace "\\n" "\n" sep) -- | Query build information
164
true
true
0
8
38
71
35
36
null
null
charlesrosenbauer/Bzo-Compiler
src/Tokens.hs
gpl-3.0
showTk (TkFlt _ x) = "F:" ++ show x
45
showTk (TkFlt _ x) = "F:" ++ show x
45
showTk (TkFlt _ x) = "F:" ++ show x
45
false
false
0
6
18
25
11
14
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/SVGAngle.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/SVGAngle.value Mozilla SVGAngle.value documentation> getValue :: (MonadDOM m) => SVGAngle -> m Float getValue self = liftDOM (realToFrac <$> ((self ^. js "value") >>= valToNumber))
238
getValue :: (MonadDOM m) => SVGAngle -> m Float getValue self = liftDOM (realToFrac <$> ((self ^. js "value") >>= valToNumber))
129
getValue self = liftDOM (realToFrac <$> ((self ^. js "value") >>= valToNumber))
81
true
true
0
12
29
58
30
28
null
null
thewoolleyman/haskellbook
10/10/haskell-club/ch10exercises.hs
unlicense
myOr' (x:xs) = x || myOr' xs
28
myOr' (x:xs) = x || myOr' xs
28
myOr' (x:xs) = x || myOr' xs
28
false
false
0
7
6
23
11
12
null
null
jfischoff/hs-mitsuba
src/Mitsuba/Element/Class.hs
bsd-3-clause
allAttribute :: Element -> Element allAttribute = set (elementChildrenL . mapped . childItemTypeL) defaultAttribute
115
allAttribute :: Element -> Element allAttribute = set (elementChildrenL . mapped . childItemTypeL) defaultAttribute
115
allAttribute = set (elementChildrenL . mapped . childItemTypeL) defaultAttribute
80
false
true
0
8
13
38
17
21
null
null
fredcy/elm-format
parser/src/Reporting/Report.hs
bsd-3-clause
toJson :: [Json.Pair] -> Report -> (Maybe R.Region, [Json.Pair]) toJson extraFields (Report title subregion pre post) = let fields = [ "tag" .= title , "overview" .= pre , "details" .= post ] in (subregion, fields ++ extraFields)
265
toJson :: [Json.Pair] -> Report -> (Maybe R.Region, [Json.Pair]) toJson extraFields (Report title subregion pre post) = let fields = [ "tag" .= title , "overview" .= pre , "details" .= post ] in (subregion, fields ++ extraFields)
265
toJson extraFields (Report title subregion pre post) = let fields = [ "tag" .= title , "overview" .= pre , "details" .= post ] in (subregion, fields ++ extraFields)
200
false
true
0
11
73
105
54
51
null
null
forked-upstream-packages-for-ghcjs/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
pprUserTypeCtxt (TySynCtxt c) = ptext (sLit "the RHS of the type synonym") <+> quotes (ppr c)
97
pprUserTypeCtxt (TySynCtxt c) = ptext (sLit "the RHS of the type synonym") <+> quotes (ppr c)
97
pprUserTypeCtxt (TySynCtxt c) = ptext (sLit "the RHS of the type synonym") <+> quotes (ppr c)
97
false
false
0
8
19
37
17
20
null
null
haroldcarr/learn-haskell-coq-ml-etc
haskell/book/2021-05-06-Algebra_Driven_Design-Sandy_Maguire/src/Lib.hs
unlicense
quad :: Tile -> Tile -> Tile -> Tile -> Tile quad = undefined
62
quad :: Tile -> Tile -> Tile -> Tile -> Tile quad = undefined
62
quad = undefined
17
false
true
0
8
14
27
14
13
null
null
osa1/hslua
src/Foreign/Lua/Core/Functions.hs
mit
-- | Pushes a new C closure onto the stack. -- -- When a C function is created, it is possible to associate some values with -- it, thus creating a C closure (see -- <https://www.lua.org/manual/5.1/manual.html#3.4 §3.4>); these values are then -- accessible to the function whenever it is called. To associate values wit...
936
pushcclosure :: CFunction -> NumArgs -> Lua () pushcclosure f n = liftLua $ \l -> lua_pushcclosure l f n
104
pushcclosure f n = liftLua $ \l -> lua_pushcclosure l f n
57
true
true
0
8
153
61
38
23
null
null
xie-dongping/modelicaparser
src/Language/Modelica/Parser/Lexer.hs
bsd-3-clause
------------------------------------------------------------------ commaList :: Parser a -> Parser [a] commaList = followedBy comma
132
commaList :: Parser a -> Parser [a] commaList = followedBy comma
64
commaList = followedBy comma
28
true
true
0
8
12
33
15
18
null
null
kaizhang/igraph
Data/IGraph/Internal.hs
bsd-3-clause
numberOfEdges :: Graph d a -> Int numberOfEdges (G g) = graphEdgeNumber g
73
numberOfEdges :: Graph d a -> Int numberOfEdges (G g) = graphEdgeNumber g
73
numberOfEdges (G g) = graphEdgeNumber g
39
false
true
0
7
12
32
15
17
null
null
zaxtax/hakaru
haskell/Tests/Disintegrate.hs
bsd-3-clause
testDisintegrateEasyRoad :: [Cond (HPair 'HReal 'HReal) (HPair 'HProb 'HProb)] testDisintegrateEasyRoad = disintegrate easyRoad
131
testDisintegrateEasyRoad :: [Cond (HPair 'HReal 'HReal) (HPair 'HProb 'HProb)] testDisintegrateEasyRoad = disintegrate easyRoad
131
testDisintegrateEasyRoad = disintegrate easyRoad
48
false
true
1
8
16
45
23
22
null
null
kmilner/tamarin-prover
lib/theory/src/Theory/Text/Parser/Token.hs
gpl-3.0
-- | Between angular brackets. angled :: Parser a -> Parser a angled = T.angles spthy
85
angled :: Parser a -> Parser a angled = T.angles spthy
54
angled = T.angles spthy
23
true
true
0
6
15
27
13
14
null
null
garetxe/cabal
cabal-install/Distribution/Client/Dependency/Modular/Preference.hs
bsd-3-clause
-- | Compare instances by their version numbers. preferLatestOrdering :: I -> I -> Ordering preferLatestOrdering (I v1 _) (I v2 _) = compare v1 v2
146
preferLatestOrdering :: I -> I -> Ordering preferLatestOrdering (I v1 _) (I v2 _) = compare v1 v2
97
preferLatestOrdering (I v1 _) (I v2 _) = compare v1 v2
54
true
true
0
7
25
46
23
23
null
null
allanderek/ipclib
Ipc/Main.hs
gpl-2.0
ipcOptions :: [ OptDescr ( CliOpt () ) ] ipcOptions = baseCliOptions
68
ipcOptions :: [ OptDescr ( CliOpt () ) ] ipcOptions = baseCliOptions
68
ipcOptions = baseCliOptions
27
false
true
0
9
11
25
13
12
null
null
oldmanmike/ghc
compiler/codeGen/StgCmmPrim.hs
bsd-3-clause
doWriteSmallPtrArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> FCode () doWriteSmallPtrArrayOp addr idx val = do dflags <- getDynFlags let ty = cmmExprType dflags val mkBasicIndexedWrite (smallArrPtrsHdrSize dflags) Nothing addr ty idx val ...
647
doWriteSmallPtrArrayOp :: CmmExpr -> CmmExpr -> CmmExpr -> FCode () doWriteSmallPtrArrayOp addr idx val = do dflags <- getDynFlags let ty = cmmExprType dflags val mkBasicIndexedWrite (smallArrPtrsHdrSize dflags) Nothing addr ty idx val ...
647
doWriteSmallPtrArrayOp addr idx val = do dflags <- getDynFlags let ty = cmmExprType dflags val mkBasicIndexedWrite (smallArrPtrsHdrSize dflags) Nothing addr ty idx val emit (setInfo addr (CmmLit (CmmLabel mkSMAP_DIRTY_infoLabel))) ------------------------------------------------------------------------...
510
false
true
0
13
157
109
53
56
null
null
stites/composition
src/MoreReaderT.hs
bsd-3-clause
isValid :: String -> Bool isValid v = '!' `elem` v
50
isValid :: String -> Bool isValid v = '!' `elem` v
50
isValid v = '!' `elem` v
24
false
true
0
5
10
24
13
11
null
null
NorfairKing/eden
src/Generate.hs
gpl-2.0
generateSolution :: Problem -> Language -> EdenGenerate () generateSolution p l = do dir <- solutionDir p l liftIO $ createDirectoryIfMissing True dir
158
generateSolution :: Problem -> Language -> EdenGenerate () generateSolution p l = do dir <- solutionDir p l liftIO $ createDirectoryIfMissing True dir
158
generateSolution p l = do dir <- solutionDir p l liftIO $ createDirectoryIfMissing True dir
99
false
true
0
8
30
53
24
29
null
null
orezpraw/gitit2
Network/Gitit2.hs
gpl-2.0
isDiscussPage :: Page -> Bool isDiscussPage (Page xs) = case reverse xs of (x:_) -> "@" `T.isPrefixOf` x _ -> False
181
isDiscussPage :: Page -> Bool isDiscussPage (Page xs) = case reverse xs of (x:_) -> "@" `T.isPrefixOf` x _ -> False
181
isDiscussPage (Page xs) = case reverse xs of (x:_) -> "@" `T.isPrefixOf` x _ -> False
151
false
true
0
9
86
64
31
33
null
null
gibiansky/jupyter-haskell
src/Jupyter/Install/Internal.hs
mit
-- | Given a directory, populate it with all necessary files to run @jupyter kernelspec install@. -- -- Currently created files include: -- * @kernel.js@: (optional) Javascript to include in the notebook frontend. -- * @logo-64x64.png@: (optional) Small logo PNG to include in the notebook frontend UI. -- * @kernel.j...
2,115
prepareKernelspecDirectory :: Kernelspec -> FilePath -> IO () prepareKernelspecDirectory kernelspec dir = do -- Make sure the directory doesn't already exist. If we didn't delete the directory, then later -- kernelspec installs may inherit files created by previous kernelspec installs. exists <- doesDirectoryExis...
1,603
prepareKernelspecDirectory kernelspec dir = do -- Make sure the directory doesn't already exist. If we didn't delete the directory, then later -- kernelspec installs may inherit files created by previous kernelspec installs. exists <- doesDirectoryExist dir when exists $ removeDirectoryRecursive dir createDi...
1,541
true
true
15
11
466
322
166
156
null
null
josefs/sbv
Data/SBV/Core/Symbolic.hs
bsd-3-clause
eqSArr :: SArr -> SArr -> SVal eqSArr (SArr _ a) (SArr _ b) = SVal KBool $ Right $ cache c where c st = do ai <- uncacheAI a st bi <- uncacheAI b st newExpr st KBool (SBVApp (ArrEq ai bi) []) --------------------------------------------------------------------------------- -- * Ca...
1,155
eqSArr :: SArr -> SArr -> SVal eqSArr (SArr _ a) (SArr _ b) = SVal KBool $ Right $ cache c where c st = do ai <- uncacheAI a st bi <- uncacheAI b st newExpr st KBool (SBVApp (ArrEq ai bi) []) --------------------------------------------------------------------------------- -- * Ca...
1,155
eqSArr (SArr _ a) (SArr _ b) = SVal KBool $ Right $ cache c where c st = do ai <- uncacheAI a st bi <- uncacheAI b st newExpr st KBool (SBVApp (ArrEq ai bi) []) --------------------------------------------------------------------------------- -- * Cached values -------------------...
1,124
false
true
1
12
209
141
70
71
null
null
achirkin/ghcjs-webgl
src/JavaScript/WebGL/Const.hs
mit
gl_LUMINANCE_ALPHA :: GLenum gl_LUMINANCE_ALPHA = 0x190A
56
gl_LUMINANCE_ALPHA :: GLenum gl_LUMINANCE_ALPHA = 0x190A
56
gl_LUMINANCE_ALPHA = 0x190A
27
false
true
0
4
5
11
6
5
null
null
secret-adventure/pipes-frp
Control/Proxy/FRP.hs
bsd-3-clause
behaveIO :: IO a -> Event a -> Behavior a behaveIO startAction e = Behavior $ do start <- startAction tvar <- newTVarIO start let toTVar () = runIdentityP $ forever $ do x <- request () lift $ atomically $ writeTVar tvar x a <- async $ runProxy $ runEvent e >-> toTVar link a ...
404
behaveIO :: IO a -> Event a -> Behavior a behaveIO startAction e = Behavior $ do start <- startAction tvar <- newTVarIO start let toTVar () = runIdentityP $ forever $ do x <- request () lift $ atomically $ writeTVar tvar x a <- async $ runProxy $ runEvent e >-> toTVar link a ...
404
behaveIO startAction e = Behavior $ do start <- startAction tvar <- newTVarIO start let toTVar () = runIdentityP $ forever $ do x <- request () lift $ atomically $ writeTVar tvar x a <- async $ runProxy $ runEvent e >-> toTVar link a return (readTVar tvar) -- | Creates a...
362
false
true
0
16
119
145
64
81
null
null
gcampax/ghc
compiler/basicTypes/BasicTypes.hs
bsd-3-clause
hasNoOneShotInfo NoOneShotInfo = True
37
hasNoOneShotInfo NoOneShotInfo = True
37
hasNoOneShotInfo NoOneShotInfo = True
37
false
false
0
4
3
10
4
6
null
null
jwiegley/ghc-release
compiler/nativeGen/RegAlloc/Liveness.hs
gpl-3.0
mapBlockTop :: (LiveBasicBlock instr -> LiveBasicBlock instr) -> LiveCmmDecl statics instr -> LiveCmmDecl statics instr mapBlockTop f cmm = evalState (mapBlockTopM (\x -> return $ f x) cmm) ()
217
mapBlockTop :: (LiveBasicBlock instr -> LiveBasicBlock instr) -> LiveCmmDecl statics instr -> LiveCmmDecl statics instr mapBlockTop f cmm = evalState (mapBlockTopM (\x -> return $ f x) cmm) ()
216
mapBlockTop f cmm = evalState (mapBlockTopM (\x -> return $ f x) cmm) ()
80
false
true
0
11
53
81
38
43
null
null
deynekalex/Money-Haskell-Project-
src/Utils.hs
gpl-2.0
getItemList :: Query ItemList [Item] getItemList = do ItemList ns <- ask return ns
90
getItemList :: Query ItemList [Item] getItemList = do ItemList ns <- ask return ns
90
getItemList = do ItemList ns <- ask return ns
53
false
true
1
9
21
40
16
24
null
null
nblythe/MUB-Search
Polynomial.hs
mit
int2Monomial :: Integer -> Monomial int2Monomial x = genericIndex int2Monomial_ x
81
int2Monomial :: Integer -> Monomial int2Monomial x = genericIndex int2Monomial_ x
81
int2Monomial x = genericIndex int2Monomial_ x
45
false
true
0
5
10
23
11
12
null
null
timtylin/scholdoc-texmath
extra/texmath.hs
gpl-2.0
main :: IO () main = do progname <- getProgName let cgi = progname == "texmath-cgi" if cgi then runCGI else runCommandLine
138
main :: IO () main = do progname <- getProgName let cgi = progname == "texmath-cgi" if cgi then runCGI else runCommandLine
138
main = do progname <- getProgName let cgi = progname == "texmath-cgi" if cgi then runCGI else runCommandLine
124
false
true
0
10
37
53
24
29
null
null
vikraman/ghc
libraries/template-haskell/Language/Haskell/TH/Ppr.hs
bsd-3-clause
ppr_dec _ (NewtypeD ctxt t xs ksig c decs) = ppr_newtype empty ctxt t (sep (map ppr xs)) ksig c decs
102
ppr_dec _ (NewtypeD ctxt t xs ksig c decs) = ppr_newtype empty ctxt t (sep (map ppr xs)) ksig c decs
102
ppr_dec _ (NewtypeD ctxt t xs ksig c decs) = ppr_newtype empty ctxt t (sep (map ppr xs)) ksig c decs
102
false
false
0
9
22
56
27
29
null
null
vTurbine/ghc
compiler/types/InstEnv.hs
bsd-3-clause
pprInstances :: [ClsInst] -> SDoc pprInstances ispecs = vcat (map pprInstance ispecs)
85
pprInstances :: [ClsInst] -> SDoc pprInstances ispecs = vcat (map pprInstance ispecs)
85
pprInstances ispecs = vcat (map pprInstance ispecs)
51
false
true
0
7
11
32
16
16
null
null
google-research/dex-lang
src/lib/Parser.hs
bsd-3-clause
instanceDef :: Bool -> Parser (UDecl VoidS VoidS) instanceDef isNamed = do name <- case isNamed of False -> keyWord InstanceKW $> NothingB True -> keyWord NamedInstanceKW *> (JustB . fromString <$> anyName) <* sym ":" argBinders <- concat <$> many (argInParens [parensExplicitArg, parensImplicitArg, par...
532
instanceDef :: Bool -> Parser (UDecl VoidS VoidS) instanceDef isNamed = do name <- case isNamed of False -> keyWord InstanceKW $> NothingB True -> keyWord NamedInstanceKW *> (JustB . fromString <$> anyName) <* sym ":" argBinders <- concat <$> many (argInParens [parensExplicitArg, parensImplicitArg, par...
532
instanceDef isNamed = do name <- case isNamed of False -> keyWord InstanceKW $> NothingB True -> keyWord NamedInstanceKW *> (JustB . fromString <$> anyName) <* sym ":" argBinders <- concat <$> many (argInParens [parensExplicitArg, parensImplicitArg, parensIfaceArg] <?> "instance arg") className <- up...
482
false
true
0
16
93
179
83
96
null
null
AndrasKovacs/trie-vector
Data/TrieVector/ArrayPrimWrap.hs
mit
read = readSmallArray#
22
read = readSmallArray#
22
read = readSmallArray#
22
false
false
0
4
2
6
3
3
null
null
lambdageek/insomnia
src/Insomnia/Typecheck/Env.hs
bsd-3-clause
formatErr :: (Pretty a) => a -> F.Doc formatErr = format . ppDefault
68
formatErr :: (Pretty a) => a -> F.Doc formatErr = format . ppDefault
68
formatErr = format . ppDefault
30
false
true
1
9
12
38
17
21
null
null
HIPERFIT/language-c-quote
Language/C/Parser/Monad.hs
bsd-3-clause
useExts :: ExtensionsInt -> P Bool useExts ext = gets $ \s -> extensions s .&. ext /= 0
91
useExts :: ExtensionsInt -> P Bool useExts ext = gets $ \s -> extensions s .&. ext /= 0
91
useExts ext = gets $ \s -> extensions s .&. ext /= 0
56
false
true
0
9
22
41
20
21
null
null
spacekitteh/smcghc
compiler/nativeGen/PPC/CodeGen.hs
bsd-3-clause
iselExpr64 (CmmMachOp (MO_Add _) [e1,e2]) = do ChildCode64 code1 r1lo <- iselExpr64 e1 ChildCode64 code2 r2lo <- iselExpr64 e2 (rlo,rhi) <- getNewRegPairNat II32 let r1hi = getHiVRegFromLo r1lo r2hi = getHiVRegFromLo r2lo code = code1 `appOL` code2 `appOL` ...
429
iselExpr64 (CmmMachOp (MO_Add _) [e1,e2]) = do ChildCode64 code1 r1lo <- iselExpr64 e1 ChildCode64 code2 r2lo <- iselExpr64 e2 (rlo,rhi) <- getNewRegPairNat II32 let r1hi = getHiVRegFromLo r1lo r2hi = getHiVRegFromLo r2lo code = code1 `appOL` code2 `appOL` ...
429
iselExpr64 (CmmMachOp (MO_Add _) [e1,e2]) = do ChildCode64 code1 r1lo <- iselExpr64 e1 ChildCode64 code2 r2lo <- iselExpr64 e2 (rlo,rhi) <- getNewRegPairNat II32 let r1hi = getHiVRegFromLo r1lo r2hi = getHiVRegFromLo r2lo code = code1 `appOL` code2 `appOL` ...
429
false
false
0
13
147
149
72
77
null
null
karamellpelle/grid
source/OpenGL/ES2/Values.hs
gpl-3.0
gl_TEXTURE27 :: GLenum gl_TEXTURE27 = 0x84DB
63
gl_TEXTURE27 :: GLenum gl_TEXTURE27 = 0x84DB
63
gl_TEXTURE27 = 0x84DB
40
false
true
0
4
24
11
6
5
null
null
tchagnon/cs636-raytracer
a4/Math.hs
apache-2.0
-- Raise Vec3f to Vec4f with w=0 direction4f :: Vec3f -> Vec4f direction4f (Vec3f x y z) = Vec4f x y z 0
104
direction4f :: Vec3f -> Vec4f direction4f (Vec3f x y z) = Vec4f x y z 0
71
direction4f (Vec3f x y z) = Vec4f x y z 0
41
true
true
0
7
22
38
19
19
null
null
lukexi/glfw-pal
src/Graphics/UI/GLFW/Pal.hs
bsd-2-clause
createWindow :: String -> Int -> Int -> IO (Window, Window, Events) createWindow = createWindow' False
102
createWindow :: String -> Int -> Int -> IO (Window, Window, Events) createWindow = createWindow' False
102
createWindow = createWindow' False
34
false
true
0
9
15
38
20
18
null
null
goldfirere/glambda
src/Language/Glambda/Type.hs
bsd-3-clause
pretty_ty :: Prec -> Ty -> Doc pretty_ty prec (Arr arg res) = maybeParens (prec >= arrowPrec) $ hsep [ pretty_ty arrowLeftPrec arg , text "->" , pretty_ty arrowRightPrec res ]
278
pretty_ty :: Prec -> Ty -> Doc pretty_ty prec (Arr arg res) = maybeParens (prec >= arrowPrec) $ hsep [ pretty_ty arrowLeftPrec arg , text "->" , pretty_ty arrowRightPrec res ]
278
pretty_ty prec (Arr arg res) = maybeParens (prec >= arrowPrec) $ hsep [ pretty_ty arrowLeftPrec arg , text "->" , pretty_ty arrowRightPrec res ]
247
false
true
0
8
133
71
35
36
null
null
jthornber/language-c-ejt
src/Language/C/Analysis/ConstEval.hs
bsd-3-clause
intOp :: CBinaryOp -> Integer -> Integer -> Integer intOp CAddOp i1 i2 = i1 + i2
80
intOp :: CBinaryOp -> Integer -> Integer -> Integer intOp CAddOp i1 i2 = i1 + i2
80
intOp CAddOp i1 i2 = i1 + i2
28
false
true
0
7
16
34
17
17
null
null
DeTeam/bitoinc-haskell-server
src/Oinc/API/Routes.hs
mit
addUser :: Connection -> ActionM () addUser conn = do -- Automatic decode into Maybe NewUserSchema maybeUser <- fmap decode body case maybeUser of Nothing -> status status500 >> json errorMessage Just user -> do liftIO $ insertNewUser conn user json successMessage
291
addUser :: Connection -> ActionM () addUser conn = do -- Automatic decode into Maybe NewUserSchema maybeUser <- fmap decode body case maybeUser of Nothing -> status status500 >> json errorMessage Just user -> do liftIO $ insertNewUser conn user json successMessage
291
addUser conn = do -- Automatic decode into Maybe NewUserSchema maybeUser <- fmap decode body case maybeUser of Nothing -> status status500 >> json errorMessage Just user -> do liftIO $ insertNewUser conn user json successMessage
255
false
true
0
13
68
86
38
48
null
null
adept/hledger
hledger-lib/Hledger/Reports/MultiBalanceReport.hs
gpl-3.0
calculateReportMatrix :: ReportSpec -> Journal -> PriceOracle -> HashMap ClippedAccountName Account -> [(DateSpan, [Posting])] -> HashMap ClippedAccountName (Map DateSpan Account) calculateReportMatrix rspec@ReportSpec{_rsReportOpts=ropts} j priceoracle ...
2,573
calculateReportMatrix :: ReportSpec -> Journal -> PriceOracle -> HashMap ClippedAccountName Account -> [(DateSpan, [Posting])] -> HashMap ClippedAccountName (Map DateSpan Account) calculateReportMatrix rspec@ReportSpec{_rsReportOpts=ropts} j priceoracle ...
2,573
calculateReportMatrix rspec@ReportSpec{_rsReportOpts=ropts} j priceoracle startbals colps = -- PARTIAL: -- Ensure all columns have entries, including those with starting balances HM.mapWithKey rowbals allchanges where -- The valued row amounts to be displayed: per-period changes, -- zero-based cumula...
2,327
false
true
14
13
597
328
194
134
null
null
xmonad/xmonad-contrib
XMonad/Layout/Magnifier.hs
bsd-3-clause
fit :: Rectangle -> Rectangle -> Rectangle fit (Rectangle sx sy sw sh) (Rectangle x y w h) = Rectangle x' y' w' h' where x' = max sx (x - max 0 (x + fi w - sx - fi sw)) y' = max sy (y - max 0 (y + fi h - sy - fi sh)) w' = min sw w h' = min sh h
278
fit :: Rectangle -> Rectangle -> Rectangle fit (Rectangle sx sy sw sh) (Rectangle x y w h) = Rectangle x' y' w' h' where x' = max sx (x - max 0 (x + fi w - sx - fi sw)) y' = max sy (y - max 0 (y + fi h - sy - fi sh)) w' = min sw w h' = min sh h
278
fit (Rectangle sx sy sw sh) (Rectangle x y w h) = Rectangle x' y' w' h' where x' = max sx (x - max 0 (x + fi w - sx - fi sw)) y' = max sy (y - max 0 (y + fi h - sy - fi sh)) w' = min sw w h' = min sh h
235
false
true
3
13
102
171
82
89
null
null
kolmodin/cabal
cabal-install/Distribution/Client/Setup.hs
bsd-3-clause
-- ------------------------------------------------------------ -- * GetOpt Utils -- ------------------------------------------------------------ reqArgFlag :: ArgPlaceHolder -> MkOptDescr (b -> Flag String) (Flag String -> b -> b) b reqArgFlag ad = reqArg ad (succeedReadE Flag) flagToList
305
reqArgFlag :: ArgPlaceHolder -> MkOptDescr (b -> Flag String) (Flag String -> b -> b) b reqArgFlag ad = reqArg ad (succeedReadE Flag) flagToList
158
reqArgFlag ad = reqArg ad (succeedReadE Flag) flagToList
56
true
true
0
9
46
65
33
32
null
null
felixgb/system-f-omega-lt
app/Main.hs
bsd-3-clause
getMain :: TyCtx -> ThrowsError Type getMain ctx = case Map.lookup "main" ctx of (Just main) -> return main Nothing -> throwError NoMain
144
getMain :: TyCtx -> ThrowsError Type getMain ctx = case Map.lookup "main" ctx of (Just main) -> return main Nothing -> throwError NoMain
144
getMain ctx = case Map.lookup "main" ctx of (Just main) -> return main Nothing -> throwError NoMain
107
false
true
0
9
30
56
26
30
null
null
alanz/htelehash
src/Network/TeleHash/Ext/Chat.hs
bsd-3-clause
chat_get :: Maybe String -> TeleHash (Maybe Chat) chat_get mid = do logT $ "chat_get:mid=" ++ show mid sw <- get mcid <- case mid of Just sid -> do -- if there's an id, validate and optionally parse out originator case parseChatId sid of Nothing -> do logT $ "invalid chatid:" ++ ...
4,433
chat_get :: Maybe String -> TeleHash (Maybe Chat) chat_get mid = do logT $ "chat_get:mid=" ++ show mid sw <- get mcid <- case mid of Just sid -> do -- if there's an id, validate and optionally parse out originator case parseChatId sid of Nothing -> do logT $ "invalid chatid:" ++ ...
4,433
chat_get mid = do logT $ "chat_get:mid=" ++ show mid sw <- get mcid <- case mid of Just sid -> do -- if there's an id, validate and optionally parse out originator case parseChatId sid of Nothing -> do logT $ "invalid chatid:" ++ sid return Nothing Just cid -> d...
4,383
false
true
0
28
1,369
780
376
404
null
null
mcschroeder/ghc
compiler/main/DynFlags.hs
bsd-3-clause
wORD_SIZE_IN_BITS :: DynFlags -> Int wORD_SIZE_IN_BITS dflags = wORD_SIZE dflags * 8
84
wORD_SIZE_IN_BITS :: DynFlags -> Int wORD_SIZE_IN_BITS dflags = wORD_SIZE dflags * 8
84
wORD_SIZE_IN_BITS dflags = wORD_SIZE dflags * 8
47
false
true
0
6
11
25
12
13
null
null
gregsymons/learn-you-a-haskell
chapter-3.hs
apache-2.0
head' (h:_) = h
15
head' (h:_) = h
15
head' (h:_) = h
15
false
false
0
6
3
17
8
9
null
null
MaxGabriel/yesod
yesod/Yesod/Default/Config2.hs
mit
applyEnvValue :: Bool -- ^ require an environment variable to be present? -> H.HashMap Text Text -> Value -> Value applyEnvValue requireEnv' env = goV where goV (Object o) = Object $ goV <$> o goV (Array a) = Array (goV <$> a) goV (String t1) = fromMaybe (String t1) $ do t2 <- T....
1,348
applyEnvValue :: Bool -- ^ require an environment variable to be present? -> H.HashMap Text Text -> Value -> Value applyEnvValue requireEnv' env = goV where goV (Object o) = Object $ goV <$> o goV (Array a) = Array (goV <$> a) goV (String t1) = fromMaybe (String t1) $ do t2 <- T....
1,348
applyEnvValue requireEnv' env = goV where goV (Object o) = Object $ goV <$> o goV (Array a) = Array (goV <$> a) goV (String t1) = fromMaybe (String t1) $ do t2 <- T.stripPrefix "_env:" t1 let (name, t3) = T.break (== ':') t2 mdef = fmap parseValue $ T.stripPrefix ":" t3 ...
1,219
false
true
0
18
526
310
151
159
null
null
kim/amazonka
amazonka-route53/gen/Network/AWS/Route53/Types.hs
mpl-2.0
-- | The value for a 'Tag'. tagValue :: Lens' Tag (Maybe Text) tagValue = lens _tagValue (\s a -> s { _tagValue = a })
118
tagValue :: Lens' Tag (Maybe Text) tagValue = lens _tagValue (\s a -> s { _tagValue = a })
90
tagValue = lens _tagValue (\s a -> s { _tagValue = a })
55
true
true
0
9
25
46
25
21
null
null
triplepointfive/soten
test/Codec/Soten/PostProcess/FixInfacingNormalsTest.hs
mit
vertices = V.fromList [V3 1 0 0, V3 0 1 0, V3 0 0 1, V3 (-1) 0 0, V3 0 (-1) 0, V3 0 0 (-1)]
91
vertices = V.fromList [V3 1 0 0, V3 0 1 0, V3 0 0 1, V3 (-1) 0 0, V3 0 (-1) 0, V3 0 0 (-1)]
91
vertices = V.fromList [V3 1 0 0, V3 0 1 0, V3 0 0 1, V3 (-1) 0 0, V3 0 (-1) 0, V3 0 0 (-1)]
91
false
false
1
8
26
89
44
45
null
null
mcschroeder/ghc
compiler/nativeGen/Dwarf/Types.hs
bsd-3-clause
pprSetUnwind plat g (_, uw) = pprByte dW_CFA_val_expression $$ pprLEBWord (fromIntegral (dwarfGlobalRegNo plat g)) $$ pprUnwindExpr True uw
150
pprSetUnwind plat g (_, uw) = pprByte dW_CFA_val_expression $$ pprLEBWord (fromIntegral (dwarfGlobalRegNo plat g)) $$ pprUnwindExpr True uw
150
pprSetUnwind plat g (_, uw) = pprByte dW_CFA_val_expression $$ pprLEBWord (fromIntegral (dwarfGlobalRegNo plat g)) $$ pprUnwindExpr True uw
150
false
false
0
9
28
56
25
31
null
null
brendanhay/gogol
gogol-videointelligence/gen/Network/Google/VideoIntelligence/Types/Product.hs
mpl-2.0
-- | Left X coordinate. gooLeft :: Lens' GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox (Maybe Double) gooLeft = lens _gooLeft (\ s a -> s{_gooLeft = a}) . mapping _Coerce
190
gooLeft :: Lens' GoogleCloudVideointelligenceV1beta2_NormalizedBoundingBox (Maybe Double) gooLeft = lens _gooLeft (\ s a -> s{_gooLeft = a}) . mapping _Coerce
166
gooLeft = lens _gooLeft (\ s a -> s{_gooLeft = a}) . mapping _Coerce
76
true
true
0
10
32
55
28
27
null
null
achernyak/stack
src/Stack/BuildPlan.hs
bsd-3-clause
compareBuildPlanCheck _ _ = LT
74
compareBuildPlanCheck _ _ = LT
74
compareBuildPlanCheck _ _ = LT
74
false
false
0
5
48
11
5
6
null
null
SoftwareHeritage/swh-web-ui
swh/web/tests/resources/contents/code/extensions/test.hs
agpl-3.0
pingUDPPort :: Socket -> SockAddr -> IO () pingUDPPort s a = sendTo s (Strict.singleton 0) a >> return ()
105
pingUDPPort :: Socket -> SockAddr -> IO () pingUDPPort s a = sendTo s (Strict.singleton 0) a >> return ()
105
pingUDPPort s a = sendTo s (Strict.singleton 0) a >> return ()
62
false
true
0
9
19
57
26
31
null
null
fffej/HS-Poker
LookupPatternMatch.hs
bsd-3-clause
getValueFromProduct 20295 = 5796
32
getValueFromProduct 20295 = 5796
32
getValueFromProduct 20295 = 5796
32
false
false
0
5
3
9
4
5
null
null
ku-fpg/diagrams-canvas
examples/Arrowtest.hs
bsd-3-clause
example :: Diagram B R2 example = connect' arrow1 "1" "2" . connect' arrow2 "4" "3" . connect' arrow3 "1" "6" . connectOutside' arrow4 "4" "8" . connect' arrow5 "9" "5" . connectOutside' arrow6 "8" "9" . connectOutside' arrow7 "8" "7" $...
1,786
example :: Diagram B R2 example = connect' arrow1 "1" "2" . connect' arrow2 "4" "3" . connect' arrow3 "1" "6" . connectOutside' arrow4 "4" "8" . connect' arrow5 "9" "5" . connectOutside' arrow6 "8" "9" . connectOutside' arrow7 "8" "7" $...
1,786
example = connect' arrow1 "1" "2" . connect' arrow2 "4" "3" . connect' arrow3 "1" "6" . connectOutside' arrow4 "4" "8" . connect' arrow5 "9" "5" . connectOutside' arrow6 "8" "9" . connectOutside' arrow7 "8" "7" $ cGrid where -- T...
1,762
false
true
6
89
688
549
263
286
null
null
mariefarrell/Hets
CASL/QuickCheck.hs
gpl-2.0
ternaryOr (Result d1 Nothing) b2 = Result d1 (Just ()) >> b2 >> Result [] Nothing
83
ternaryOr (Result d1 Nothing) b2 = Result d1 (Just ()) >> b2 >> Result [] Nothing
83
ternaryOr (Result d1 Nothing) b2 = Result d1 (Just ()) >> b2 >> Result [] Nothing
83
false
false
0
10
17
47
22
25
null
null
badp/ganeti
src/Ganeti/Constants.hs
gpl-2.0
idiskParamsTypes :: Map String VType idiskParamsTypes = Map.fromList [(idiskSize, VTypeSize), (idiskSpindles, VTypeInt), (idiskMode, VTypeString), (idiskAdopt, VTypeString), (idiskVg, VTypeString), (idiskMetavg, VTypeString), ...
400
idiskParamsTypes :: Map String VType idiskParamsTypes = Map.fromList [(idiskSize, VTypeSize), (idiskSpindles, VTypeInt), (idiskMode, VTypeString), (idiskAdopt, VTypeString), (idiskVg, VTypeString), (idiskMetavg, VTypeString), ...
400
idiskParamsTypes = Map.fromList [(idiskSize, VTypeSize), (idiskSpindles, VTypeInt), (idiskMode, VTypeString), (idiskAdopt, VTypeString), (idiskVg, VTypeString), (idiskMetavg, VTypeString), (idiskProvider, VTypeString), ...
363
false
true
0
7
137
93
58
35
null
null
melted/llvm-pretty
src/Text/LLVM/AST.hs
bsd-3-clause
stmtInstr (Effect i _) = i
28
stmtInstr (Effect i _) = i
28
stmtInstr (Effect i _) = i
28
false
false
0
6
7
18
8
10
null
null
rueshyna/gogol
gogol-resourceviews/gen/Network/Google/ResourceViews/Types/Product.hs
mpl-2.0
-- | The name of the resource view. rvName :: Lens' ResourceView (Maybe Text) rvName = lens _rvName (\ s a -> s{_rvName = a})
125
rvName :: Lens' ResourceView (Maybe Text) rvName = lens _rvName (\ s a -> s{_rvName = a})
89
rvName = lens _rvName (\ s a -> s{_rvName = a})
47
true
true
0
9
24
46
25
21
null
null
loadimpact/http2-test
hs-src/Rede/SpdyProtocol/Framing/ChunkProducer.hs
bsd-3-clause
chunkProducerHelper :: Monad m => LB.ByteString -> m B.ByteString -- Generator -> Maybe Int -- Length to read -> m (LB.ByteString, LB.ByteString) -- To yield, left-overs... chunkProducerHelper pieces gen No...
778
chunkProducerHelper :: Monad m => LB.ByteString -> m B.ByteString -- Generator -> Maybe Int -- Length to read -> m (LB.ByteString, LB.ByteString) chunkProducerHelper pieces gen Nothing = let la...
750
chunkProducerHelper pieces gen Nothing = let lazy = pieces length_lazy = LB.length lazy perfunctory_classif = perfunctoryClassify lazy total_length = lengthFromPerfunct perfunctory_classif in if length_lazy >= 8 then chunkProducerHelper pieces gen (Just total_length)...
491
true
true
0
15
282
171
84
87
null
null
z0isch/ten-twenty-five
Game.hs
mit
getAvgRoundPercents :: [GameSave] -> [RoundPercent] getAvgRoundPercents gs = map avgRPercents $ L.transpose rMakes where rMakes = map getRoundMakes gs avgRPercents :: [RoundMake] -> RoundPercent avgRPercents rms = RoundPercent (100 * fromIntegral (sum $ map roundMakeMakes rms) / fromIntegral (sum $ ma...
376
getAvgRoundPercents :: [GameSave] -> [RoundPercent] getAvgRoundPercents gs = map avgRPercents $ L.transpose rMakes where rMakes = map getRoundMakes gs avgRPercents :: [RoundMake] -> RoundPercent avgRPercents rms = RoundPercent (100 * fromIntegral (sum $ map roundMakeMakes rms) / fromIntegral (sum $ ma...
376
getAvgRoundPercents gs = map avgRPercents $ L.transpose rMakes where rMakes = map getRoundMakes gs avgRPercents :: [RoundMake] -> RoundPercent avgRPercents rms = RoundPercent (100 * fromIntegral (sum $ map roundMakeMakes rms) / fromIntegral (sum $ map roundMakeAttempts rms)) $ roundMakeDistance $ head...
324
false
true
1
14
65
138
63
75
null
null
green-haskell/ghc
compiler/typecheck/TcType.hs
bsd-3-clause
tcSplitTyConApp_maybe (FunTy arg res) = Just (funTyCon, [arg,res])
68
tcSplitTyConApp_maybe (FunTy arg res) = Just (funTyCon, [arg,res])
68
tcSplitTyConApp_maybe (FunTy arg res) = Just (funTyCon, [arg,res])
68
false
false
0
7
9
33
17
16
null
null
konn/omaketex
omaketex.hs
bsd-3-clause
gitmessage False = ""
21
gitmessage False = ""
21
gitmessage False = ""
21
false
false
0
5
3
9
4
5
null
null
florianpilz/autotool
src/Prolog/Eval.hs
gpl-2.0
cleanup vs sub = M.filterWithKey ( \ v _ -> S.notMember v vs ) sub
71
cleanup vs sub = M.filterWithKey ( \ v _ -> S.notMember v vs ) sub
71
cleanup vs sub = M.filterWithKey ( \ v _ -> S.notMember v vs ) sub
71
false
false
0
9
19
35
17
18
null
null
kojiromike/Idris-dev
src/Idris/Core/CaseTree.hs
bsd-3-clause
prune :: Bool -- ^ Convert single branches to projections (only useful at runtime) -> SC -> SC prune proj (Case up n alts) = case alts' of [] -> ImpossibleCase -- Projection transformations prevent us from seeing some uses of ctor fields -- because they delete information about which ctor is being us...
2,754
prune :: Bool -- ^ Convert single branches to projections (only useful at runtime) -> SC -> SC prune proj (Case up n alts) = case alts' of [] -> ImpossibleCase -- Projection transformations prevent us from seeing some uses of ctor fields -- because they delete information about which ctor is being us...
2,754
prune proj (Case up n alts) = case alts' of [] -> ImpossibleCase -- Projection transformations prevent us from seeing some uses of ctor fields -- because they delete information about which ctor is being used. -- Consider: -- f (X x) = ... x ... -- vs. -- f x = ... x!0 ... -- ...
2,653
false
true
1
14
888
1,043
489
554
null
null
badp/ganeti
src/Ganeti/HTools/Loader.hs
gpl-2.0
longestDomain (x:xs) = foldr (\ suffix accu -> if all (isSuffixOf suffix) xs then suffix else accu) "" $ filter (isPrefixOf ".") (tails x)
206
longestDomain (x:xs) = foldr (\ suffix accu -> if all (isSuffixOf suffix) xs then suffix else accu) "" $ filter (isPrefixOf ".") (tails x)
206
longestDomain (x:xs) = foldr (\ suffix accu -> if all (isSuffixOf suffix) xs then suffix else accu) "" $ filter (isPrefixOf ".") (tails x)
206
false
false
0
12
91
71
36
35
null
null
pascalpoizat/vecahaskell
src/Models/Events.hs
apache-2.0
liftToTIOEvent (Send a) = TSend a
33
liftToTIOEvent (Send a) = TSend a
33
liftToTIOEvent (Send a) = TSend a
33
false
false
0
7
5
18
8
10
null
null
ComputationWithBoundedResources/ara-inference
doc/tpdb_trs/Haskell/basic_haskell/CARET_1.hs
mit
primMulInt (Neg x) (Pos y) = Neg (primMulNat x y)
49
primMulInt (Neg x) (Pos y) = Neg (primMulNat x y)
49
primMulInt (Neg x) (Pos y) = Neg (primMulNat x y)
49
false
false
0
7
9
34
16
18
null
null
ribag/ganeti-experiments
src/Ganeti/Locking/Locks.hs
gpl-2.0
lockName NAL = "node-alloc/NAL"
31
lockName NAL = "node-alloc/NAL"
31
lockName NAL = "node-alloc/NAL"
31
false
false
1
5
3
13
4
9
null
null
sos22/ppres
ppres/driver/Classifier.hs
gpl-2.0
boolOr _ (BooleanConst True) = BooleanConst True
48
boolOr _ (BooleanConst True) = BooleanConst True
48
boolOr _ (BooleanConst True) = BooleanConst True
48
false
false
0
7
6
20
9
11
null
null
unknownloner/aoc2016
src/Days/Day1.hs
mit
rotate :: Char -> Dir -> Dir rotate 'R' W = N
45
rotate :: Char -> Dir -> Dir rotate 'R' W = N
45
rotate 'R' W = N
16
false
true
0
6
11
24
12
12
null
null
nevrenato/Hets_Fork
SoftFOL/ProveDarwin.hs
gpl-2.0
runDarwin :: ProverBinary -> SoftFOLProverState {- ^ logical part containing the input Sign and axioms and possibly goals that have been proved earlier as additional axioms -} -> GenericConfig ProofTree -- ^ configuration to use -> Bool -- ^ True means save TPTP file -> String -- ^ name of the theory in t...
2,504
runDarwin :: ProverBinary -> SoftFOLProverState {- ^ logical part containing the input Sign and axioms and possibly goals that have been proved earlier as additional axioms -} -> GenericConfig ProofTree -- ^ configuration to use -> Bool -- ^ True means save TPTP file -> String -- ^ name of the theory in t...
2,432
runDarwin b sps cfg saveTPTP thName nGoal = do let bin = darwinExe b options = extraOpts cfg tl = maybe "10" show $ timeLimit cfg tOut = toOpt ++ tl extraOptions = unwords $ case b of EProver -> eproverOpts ++ tl Leo -> "-t " ++ tl Darwin -> darOpt...
2,010
true
true
0
19
811
588
304
284
null
null
DanielSchuessler/hstri
Latexable.hs
gpl-3.0
(&) :: (Latexable a, Latexable a1) => a -> a1 -> [Char] x & y = toLatex x ++"&"++toLatex y
91
(&) :: (Latexable a, Latexable a1) => a -> a1 -> [Char] x & y = toLatex x ++"&"++toLatex y
91
x & y = toLatex x ++"&"++toLatex y
34
false
true
0
11
20
63
31
32
null
null
copton/hgdbmi
src/Gdbmi/Semantics.hs
bsd-3-clause
responseStopReason :: [Result] -> Maybe StopReason -- {{{2 responseStopReason rs = do reason <- find (("reason"==) . resVariable) rs >>= asConst . resValue case reason of "breakpoint-hit" -> BreakpointHit <$> get rs tryRead "disp" <*> get rs tryRead "bkptno" "end-stepping-range" -> J...
408
responseStopReason :: [Result] -> Maybe StopReason responseStopReason rs = do reason <- find (("reason"==) . resVariable) rs >>= asConst . resValue case reason of "breakpoint-hit" -> BreakpointHit <$> get rs tryRead "disp" <*> get rs tryRead "bkptno" "end-stepping-range" -> Just EndSt...
399
responseStopReason rs = do reason <- find (("reason"==) . resVariable) rs >>= asConst . resValue case reason of "breakpoint-hit" -> BreakpointHit <$> get rs tryRead "disp" <*> get rs tryRead "bkptno" "end-stepping-range" -> Just EndSteppingRange "function-finished" -> Just Functi...
348
true
true
0
14
95
120
57
63
null
null
fibsifan/pandoc
src/Text/Pandoc/Readers/Markdown.hs
gpl-2.0
htmlBlock :: MarkdownParser (F Blocks) htmlBlock = do guardEnabled Ext_raw_html try (do (TagOpen t attrs) <- lookAhead $ fst <$> htmlTag isBlockTag (guard (t `elem` ["pre","style","script"]) >> (return . B.rawBlock "html") <$> rawVerbatimBlock) <|> (do guardEnabled Ext_markdown_attribu...
1,213
htmlBlock :: MarkdownParser (F Blocks) htmlBlock = do guardEnabled Ext_raw_html try (do (TagOpen t attrs) <- lookAhead $ fst <$> htmlTag isBlockTag (guard (t `elem` ["pre","style","script"]) >> (return . B.rawBlock "html") <$> rawVerbatimBlock) <|> (do guardEnabled Ext_markdown_attribu...
1,213
htmlBlock = do guardEnabled Ext_raw_html try (do (TagOpen t attrs) <- lookAhead $ fst <$> htmlTag isBlockTag (guard (t `elem` ["pre","style","script"]) >> (return . B.rawBlock "html") <$> rawVerbatimBlock) <|> (do guardEnabled Ext_markdown_attribute oldMarkdownAttribute...
1,174
false
true
2
26
495
287
140
147
null
null
AlexeyRaga/eta
compiler/ETA/CodeGen/Prim.hs
bsd-3-clause
mkRtsPrimOp LabelThreadOp = (concGroup, "labelThread")
64
mkRtsPrimOp LabelThreadOp = (concGroup, "labelThread")
64
mkRtsPrimOp LabelThreadOp = (concGroup, "labelThread")
64
false
false
0
5
14
15
8
7
null
null
ulricha/algebra-sql
src/Database/Algebra/Table/Render/Dot.hs
bsd-3-clause
renderColor DCSienna = P.text "sienna"
44
renderColor DCSienna = P.text "sienna"
44
renderColor DCSienna = P.text "sienna"
44
false
false
0
6
10
14
6
8
null
null
mumuki/mulang
src/Language/Mulang/Ast/Operator.hs
gpl-3.0
isNotLike :: Operator -> Bool isNotLike NotEqual = True
57
isNotLike :: Operator -> Bool isNotLike NotEqual = True
57
isNotLike NotEqual = True
27
false
true
0
5
10
18
9
9
null
null
dmjio/aeson
src/Data/Aeson/TH.hs
bsd-3-clause
-- Generate a list of fresh names with a common prefix, and numbered suffixes. newNameList :: String -> Int -> Q [Name] newNameList prefix len = mapM newName [prefix ++ show n | n <- [1..len]]
192
newNameList :: String -> Int -> Q [Name] newNameList prefix len = mapM newName [prefix ++ show n | n <- [1..len]]
113
newNameList prefix len = mapM newName [prefix ++ show n | n <- [1..len]]
72
true
true
0
9
35
59
30
29
null
null
butchhoward/xhaskell
factorial_gamma.hs
mit
actorial :: Integer -> Integer -- Point-free style analytic solution factorial = round . exp . lnGamma . fromIntegral . (+1)
126
factorial :: Integer -> Integer factorial = round . exp . lnGamma . fromIntegral . (+1)
87
factorial = round . exp . lnGamma . fromIntegral . (+1)
55
true
true
0
8
22
36
20
16
null
null
AlexanderPankiv/ghc
compiler/prelude/PrelNames.hs
bsd-3-clause
typeSymbolKindConNameKey = mkPreludeTyConUnique 165
52
typeSymbolKindConNameKey = mkPreludeTyConUnique 165
52
typeSymbolKindConNameKey = mkPreludeTyConUnique 165
52
false
false
0
5
4
9
4
5
null
null
bravit/Idris-dev
src/Idris/IBC.hs
bsd-3-clause
processDefs :: Archive -> Idris () processDefs ar = do ds <- getEntry [] "ibc_defs" ar mapM_ (\ (n, d) -> do d' <- updateDef d case d' of TyDecl _ _ -> return () _ -> do logIBC 1 $ "SOLVING " ++ show n solveD...
2,919
processDefs :: Archive -> Idris () processDefs ar = do ds <- getEntry [] "ibc_defs" ar mapM_ (\ (n, d) -> do d' <- updateDef d case d' of TyDecl _ _ -> return () _ -> do logIBC 1 $ "SOLVING " ++ show n solveD...
2,919
processDefs ar = do ds <- getEntry [] "ibc_defs" ar mapM_ (\ (n, d) -> do d' <- updateDef d case d' of TyDecl _ _ -> return () _ -> do logIBC 1 $ "SOLVING " ++ show n solveDeferred emptyFC n updat...
2,884
false
true
19
19
1,321
1,006
474
532
null
null
gbataille/pandoc
src/Text/Pandoc/Writers/HTML.hs
gpl-2.0
-- title beginning with fig: indicates that the image is a figure blockToHtml opts (Para [Image txt (s,'f':'i':'g':':':tit)]) = do img <- inlineToHtml opts (Image txt (s,tit)) let tocapt = if writerHtml5 opts then H5.figcaption else H.p ! A.class_ "caption" capt <- if null txt ...
643
blockToHtml opts (Para [Image txt (s,'f':'i':'g':':':tit)]) = do img <- inlineToHtml opts (Image txt (s,tit)) let tocapt = if writerHtml5 opts then H5.figcaption else H.p ! A.class_ "caption" capt <- if null txt then return mempty else tocapt `fmap` in...
577
blockToHtml opts (Para [Image txt (s,'f':'i':'g':':':tit)]) = do img <- inlineToHtml opts (Image txt (s,tit)) let tocapt = if writerHtml5 opts then H5.figcaption else H.p ! A.class_ "caption" capt <- if null txt then return mempty else tocapt `fmap` in...
577
true
false
0
14
221
226
114
112
null
null
karamellpelle/grid
source/Game/Memory/Helpers.hs
gpl-3.0
-------------------------------------------------------------------------------- -- memoryCamera :: MemoryWorld -> Camera memoryCamera = gridCamera . memoryGrid
169
memoryCamera :: MemoryWorld -> Camera memoryCamera = gridCamera . memoryGrid
82
memoryCamera = gridCamera . memoryGrid
44
true
true
0
5
20
21
12
9
null
null
jaapweel/piffle
src/CIr.hs
gpl-2.0
tBinop Ne = C.Ne
20
tBinop Ne = C.Ne
20
tBinop Ne = C.Ne
20
false
false
1
6
7
15
5
10
null
null
ambiata/highlighting-kate
Text/Highlighting/Kate/Syntax/Javadoc.hs
gpl-2.0
regex_'28'21'7c'5c'3f'29 = compileRegex True "(!|\\?)"
54
regex_'28'21'7c'5c'3f'29 = compileRegex True "(!|\\?)"
54
regex_'28'21'7c'5c'3f'29 = compileRegex True "(!|\\?)"
54
false
false
0
5
4
11
5
6
null
null
leshchevds/ganeti
src/Ganeti/WConfd/Core.hs
bsd-2-clause
-- | Opportunistically allocate locks for a given owner. opportunisticLockUnion :: ClientId -> [(GanetiLocks, L.OwnerState)] -> WConfdMonad [GanetiLocks] opportunisticLockUnion cid req = modifyLockWaiting $ LW.opportunisticLockUnion cid req
288
opportunisticLockUnion :: ClientId -> [(GanetiLocks, L.OwnerState)] -> WConfdMonad [GanetiLocks] opportunisticLockUnion cid req = modifyLockWaiting $ LW.opportunisticLockUnion cid req
231
opportunisticLockUnion cid req = modifyLockWaiting $ LW.opportunisticLockUnion cid req
88
true
true
0
9
74
53
28
25
null
null
jstolarek/slicer
lib/Language/Slicer/Eval.hs
gpl-3.0
-- | Evaluates an expression and forces the result before returning it. Ensures -- strict semantics. evalM' :: Exp -> EvalM Outcome evalM' e = do v <- evalM e v `seq` return v
190
evalM' :: Exp -> EvalM Outcome evalM' e = do v <- evalM e v `seq` return v
88
evalM' e = do v <- evalM e v `seq` return v
57
true
true
0
9
48
50
23
27
null
null
ekmett/transformers
Control/Monad/Trans/RWS/Lazy.hs
bsd-3-clause
-- | Lift a @catchError@ operation to the new monad. liftCatch :: (m (a,s,w) -> (e -> m (a,s,w)) -> m (a,s,w)) -> RWST l w s m a -> (e -> RWST l w s m a) -> RWST l w s m a liftCatch catchError m h = RWST $ \r s -> runRWST m r s `catchError` \e -> runRWST (h e) r s
272
liftCatch :: (m (a,s,w) -> (e -> m (a,s,w)) -> m (a,s,w)) -> RWST l w s m a -> (e -> RWST l w s m a) -> RWST l w s m a liftCatch catchError m h = RWST $ \r s -> runRWST m r s `catchError` \e -> runRWST (h e) r s
219
liftCatch catchError m h = RWST $ \r s -> runRWST m r s `catchError` \e -> runRWST (h e) r s
96
true
true
0
12
74
167
88
79
null
null
technogeeky/cyclotomic
src/Data/Complex/Cyclotomic.hs
gpl-3.0
pqPairs n = map (\(p,k) -> (p,p^k)) (factorise n)
49
pqPairs n = map (\(p,k) -> (p,p^k)) (factorise n)
49
pqPairs n = map (\(p,k) -> (p,p^k)) (factorise n)
49
false
false
0
9
8
44
24
20
null
null
kim/amazonka
amazonka-dynamodb/gen/Network/AWS/DynamoDB/UpdateItem.hs
mpl-2.0
-- | There is a newer parameter available. Use /UpdateExpression/ instead. Note -- that if you use /AttributeUpdates/ and /UpdateExpression/ at the same time, -- DynamoDB will return a /ValidationException/ exception. -- -- This parameter can be used for modifying top-level attributes; however, it -- does not support i...
4,688
uiAttributeUpdates :: Lens' UpdateItem (HashMap Text AttributeValueUpdate) uiAttributeUpdates = lens _uiAttributeUpdates (\s a -> s { _uiAttributeUpdates = a }) . _Map
179
uiAttributeUpdates = lens _uiAttributeUpdates (\s a -> s { _uiAttributeUpdates = a }) . _Map
104
true
true
0
10
847
133
109
24
null
null
mrBliss/haddock
haddock-api/src/Haddock/Backends/Xhtml/Decl.hs
bsd-2-clause
ppLPatSig :: Bool -> LinksInfo -> SrcSpan -> DocForDecl DocName -> Located DocName -> (HsExplicitFlag, LHsTyVarBndrs DocName) -> LHsContext DocName -> LHsContext DocName -> LHsType DocName -> [(DocName, Fixity)] -> Splice -> Unicode -> Qualif...
1,254
ppLPatSig :: Bool -> LinksInfo -> SrcSpan -> DocForDecl DocName -> Located DocName -> (HsExplicitFlag, LHsTyVarBndrs DocName) -> LHsContext DocName -> LHsContext DocName -> LHsType DocName -> [(DocName, Fixity)] -> Splice -> Unicode -> Qualif...
1,254
ppLPatSig summary links loc (doc, _argDocs) (L _ name) (expl, qtvs) lprov lreq typ fixities splice unicode qual | summary = pref1 | otherwise = topDeclElem links loc splice [name] (pref1 <+> ppFixities fixities qual) +++ docSection Nothing qual doc where pref1 = hsep [ keyword "pattern" ...
918
false
true
4
17
420
375
191
184
null
null
diegomachadosoares/hcomp
Parser.hs
gpl-3.0
formsN :: Parser [String] formsN = do return ([])
53
formsN :: Parser [String] formsN = do return ([])
53
formsN = do return ([])
27
false
true
1
10
12
32
14
18
null
null
c19/Exercism-Haskell
list-ops/src/ListOps.hs
mit
xs ++ ys = foldr (:) ys xs
26
xs ++ ys = foldr (:) ys xs
26
xs ++ ys = foldr (:) ys xs
26
false
false
2
5
7
20
10
10
null
null
tonyfloatersu/solution-haskell-craft-of-FP
Chapter13.hs
mit
-- Checking types -- ^^^^^^^^^^^^^^ -- Non-type-correct definitions are included as comments. example1 = fromEnum 'c' + 3
123
example1 = fromEnum 'c' + 3
27
example1 = fromEnum 'c' + 3
27
true
false
3
5
19
21
9
12
null
null
jmgimeno/haskell-playground
src/FourFours/solutions.hs
unlicense
solutions :: ((Tree -> Tree -> Ordering) -> [Tree] -> Tree) -> [(Int, Tree)] solutions p = sortBy (comparing fst) $ singleSolutions where singleSolutions = assocs $ fromListWith preferred evaluated preferred a b = p (comparing size) [a, b]
245
solutions :: ((Tree -> Tree -> Ordering) -> [Tree] -> Tree) -> [(Int, Tree)] solutions p = sortBy (comparing fst) $ singleSolutions where singleSolutions = assocs $ fromListWith preferred evaluated preferred a b = p (comparing size) [a, b]
245
solutions p = sortBy (comparing fst) $ singleSolutions where singleSolutions = assocs $ fromListWith preferred evaluated preferred a b = p (comparing size) [a, b]
168
false
true
0
10
44
107
57
50
null
null
pqwy/google-web-apis
Web/Google/GCal.hs
bsd-3-clause
qMaxresults = integralQuery "max-results"
43
qMaxresults = integralQuery "max-results"
43
qMaxresults = integralQuery "max-results"
43
false
false
0
5
5
9
4
5
null
null
ghcjs/jsaddle-dom
src/JSDOM/Generated/HTMLTextAreaElement.hs
mit
-- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLTextAreaElement.dirName Mozilla HTMLTextAreaElement.dirName documentation> setDirName :: (MonadDOM m, ToJSString val) => HTMLTextAreaElement -> val -> m () setDirName self val = liftDOM (self ^. jss "dirName" (toJSVal val))
294
setDirName :: (MonadDOM m, ToJSString val) => HTMLTextAreaElement -> val -> m () setDirName self val = liftDOM (self ^. jss "dirName" (toJSVal val))
159
setDirName self val = liftDOM (self ^. jss "dirName" (toJSVal val))
67
true
true
0
10
41
70
34
36
null
null