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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Shimuuar/banana-tcltk | UI/TclTk/AST.hs | bsd-3-clause | renderExpr n x (SeqE es ) = unwords $ map (renderExpr n x) es | 62 | renderExpr n x (SeqE es ) = unwords $ map (renderExpr n x) es | 62 | renderExpr n x (SeqE es ) = unwords $ map (renderExpr n x) es | 62 | false | false | 0 | 8 | 14 | 39 | 17 | 22 | null | null |
crufter/hakit | tests/hakit/db/mongo.hs | bsd-3-clause | loc41 = ["server" .- "prim", "db" .- "db1", "coll" .- "coll1"] | 62 | loc41 = ["server" .- "prim", "db" .- "db1", "coll" .- "coll1"] | 62 | loc41 = ["server" .- "prim", "db" .- "db1", "coll" .- "coll1"] | 62 | false | false | 0 | 6 | 10 | 27 | 15 | 12 | null | null |
garetxe/cabal | Cabal/Distribution/Simple/GHCJS.hs | bsd-3-clause | getLibDir :: Verbosity -> LocalBuildInfo -> IO FilePath
getLibDir verbosity lbi =
(reverse . dropWhile isSpace . reverse) `fmap`
rawSystemProgramStdoutConf verbosity ghcjsProgram
(withPrograms lbi) ["--print-libdir"] | 230 | getLibDir :: Verbosity -> LocalBuildInfo -> IO FilePath
getLibDir verbosity lbi =
(reverse . dropWhile isSpace . reverse) `fmap`
rawSystemProgramStdoutConf verbosity ghcjsProgram
(withPrograms lbi) ["--print-libdir"] | 230 | getLibDir verbosity lbi =
(reverse . dropWhile isSpace . reverse) `fmap`
rawSystemProgramStdoutConf verbosity ghcjsProgram
(withPrograms lbi) ["--print-libdir"] | 174 | false | true | 0 | 9 | 38 | 65 | 33 | 32 | null | null |
tchagnon/cs636-raytracer | a1/Mesh.hs | apache-2.0 | -- Take a list of Vertex indices and produce a Face
list2face :: VecArray -> [Int] -> Face
list2face verts (ai:bi:ci:_) =
let a = verts ! ai in
let b = verts ! bi in
let c = verts ! ci in
Face a (a-b) (a-c) | 225 | list2face :: VecArray -> [Int] -> Face
list2face verts (ai:bi:ci:_) =
let a = verts ! ai in
let b = verts ! bi in
let c = verts ! ci in
Face a (a-b) (a-c) | 173 | list2face verts (ai:bi:ci:_) =
let a = verts ! ai in
let b = verts ! bi in
let c = verts ! ci in
Face a (a-b) (a-c) | 134 | true | true | 0 | 13 | 65 | 109 | 55 | 54 | null | null |
brendanhay/gogol | gogol-vault/gen/Network/Google/Resource/Vault/Matters/Holds/Accounts/Create.hs | mpl-2.0 | -- | The matter ID.
mhacMatterId :: Lens' MattersHoldsAccountsCreate Text
mhacMatterId
= lens _mhacMatterId (\ s a -> s{_mhacMatterId = a}) | 141 | mhacMatterId :: Lens' MattersHoldsAccountsCreate Text
mhacMatterId
= lens _mhacMatterId (\ s a -> s{_mhacMatterId = a}) | 121 | mhacMatterId
= lens _mhacMatterId (\ s a -> s{_mhacMatterId = a}) | 67 | true | true | 0 | 9 | 22 | 42 | 22 | 20 | null | null |
exercism/xhaskell | exercises/practice/bank-account/src/BankAccount.hs | mit | getBalance :: BankAccount -> IO (Maybe Integer)
getBalance account = error "You need to implement this function." | 113 | getBalance :: BankAccount -> IO (Maybe Integer)
getBalance account = error "You need to implement this function." | 113 | getBalance account = error "You need to implement this function." | 65 | false | true | 0 | 8 | 16 | 30 | 14 | 16 | null | null |
iblumenfeld/saw-core | src/Verifier/SAW/Simulator/BitBlast.hs | bsd-3-clause | toBool :: BValue l -> l
toBool (VBool l) = l | 44 | toBool :: BValue l -> l
toBool (VBool l) = l | 44 | toBool (VBool l) = l | 20 | false | true | 0 | 7 | 10 | 27 | 13 | 14 | null | null |
ezyang/ghc | hadrian/src/Rules/Documentation.hs | bsd-3-clause | -- | Compile a Sphinx ReStructured Text package to LaTeX
buildSphinxPdf :: FilePath -> Rules ()
buildSphinxPdf path = do
"//" ++ path <.> "pdf" %> \file -> do
let context = vanillaContext Stage0 docPackage
withTempDir $ \dir -> do
build $ target context (Sphinx Latex) [pathPath path] [di... | 569 | buildSphinxPdf :: FilePath -> Rules ()
buildSphinxPdf path = do
"//" ++ path <.> "pdf" %> \file -> do
let context = vanillaContext Stage0 docPackage
withTempDir $ \dir -> do
build $ target context (Sphinx Latex) [pathPath path] [dir]
build $ target context Xelatex [path <.> "... | 512 | buildSphinxPdf path = do
"//" ++ path <.> "pdf" %> \file -> do
let context = vanillaContext Stage0 docPackage
withTempDir $ \dir -> do
build $ target context (Sphinx Latex) [pathPath path] [dir]
build $ target context Xelatex [path <.> "tex"] [dir]
copyFileUntrack... | 473 | true | true | 0 | 18 | 131 | 149 | 74 | 75 | null | null |
pgj/bead | src/Bead/View/Session.hs | bsd-3-clause | sessionVersionValue :: T.Text
sessionVersionValue = "1" | 55 | sessionVersionValue :: T.Text
sessionVersionValue = "1" | 55 | sessionVersionValue = "1" | 25 | false | true | 0 | 5 | 5 | 13 | 7 | 6 | null | null |
jaspervdj/what-morphism | src/WhatMorphism/Expr.hs | bsd-3-clause | --------------------------------------------------------------------------------
withBinds :: Monad m => Bind b -> (b -> Expr b -> m (b, Expr b)) -> m (Bind b)
withBinds (NonRec b e) f = do
(b', e') <- f b e
return $ NonRec b' e' | 237 | withBinds :: Monad m => Bind b -> (b -> Expr b -> m (b, Expr b)) -> m (Bind b)
withBinds (NonRec b e) f = do
(b', e') <- f b e
return $ NonRec b' e' | 156 | withBinds (NonRec b e) f = do
(b', e') <- f b e
return $ NonRec b' e' | 77 | true | true | 0 | 13 | 47 | 108 | 52 | 56 | null | null |
tomlokhorst/wol | src/Network/MacAddress.hs | bsd-3-clause | -- | Get all bytes in a mac address
bytes :: MacAddress -> [Word8]
bytes (MacAddress b0 b1 b2 b3 b4 b5) = [b0, b1, b2, b3, b4, b5] | 130 | bytes :: MacAddress -> [Word8]
bytes (MacAddress b0 b1 b2 b3 b4 b5) = [b0, b1, b2, b3, b4, b5] | 94 | bytes (MacAddress b0 b1 b2 b3 b4 b5) = [b0, b1, b2, b3, b4, b5] | 63 | true | true | 0 | 6 | 28 | 60 | 33 | 27 | null | null |
brendanhay/gogol | gogol-websecurityscanner/gen/Network/Google/WebSecurityScanner/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'ScanConfig' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'scIgnoreHTTPStatusErrors'
--
-- * 'scSchedule'
--
-- * 'scStartingURLs'
--
-- * 'scAuthentication'
--
-- * 'scStaticIPScan'
--
-- * 'scMaxQps'
--
-- ... | 980 | scanConfig
:: ScanConfig
scanConfig =
ScanConfig'
{ _scIgnoreHTTPStatusErrors = Nothing
, _scSchedule = Nothing
, _scStartingURLs = Nothing
, _scAuthentication = Nothing
, _scStaticIPScan = Nothing
, _scMaxQps = Nothing
, _scName = Nothing
, _scManagedScan = Nothing
, _scExport... | 485 | scanConfig =
ScanConfig'
{ _scIgnoreHTTPStatusErrors = Nothing
, _scSchedule = Nothing
, _scStartingURLs = Nothing
, _scAuthentication = Nothing
, _scStaticIPScan = Nothing
, _scMaxQps = Nothing
, _scName = Nothing
, _scManagedScan = Nothing
, _scExportToSecurityCommandCenter = Not... | 456 | true | true | 1 | 7 | 202 | 127 | 89 | 38 | null | null |
siddhanathan/ghc | compiler/prelude/THNames.hs | bsd-3-clause | kindSigName = libFun (fsLit "kindSig") kindSigIdKey | 60 | kindSigName = libFun (fsLit "kindSig") kindSigIdKey | 60 | kindSigName = libFun (fsLit "kindSig") kindSigIdKey | 60 | false | false | 1 | 7 | 14 | 20 | 8 | 12 | null | null |
PuZZleDucK/Hls | old-Hyes.hs | gpl-3.0 | versionText :: [String]
versionText = [ "Hyes (Haskell implementation of GNU yes) 1.0"
, "derrived from: yes (GNU coreutils) 8.13"
, "Copyright (C) 2011 Free Software Foundation, Inc."
, "Written by David MacKenzie."
, "Ported by PuZZleDucK.\n\n"
] | 318 | versionText :: [String]
versionText = [ "Hyes (Haskell implementation of GNU yes) 1.0"
, "derrived from: yes (GNU coreutils) 8.13"
, "Copyright (C) 2011 Free Software Foundation, Inc."
, "Written by David MacKenzie."
, "Ported by PuZZleDucK.\n\n"
] | 318 | versionText = [ "Hyes (Haskell implementation of GNU yes) 1.0"
, "derrived from: yes (GNU coreutils) 8.13"
, "Copyright (C) 2011 Free Software Foundation, Inc."
, "Written by David MacKenzie."
, "Ported by PuZZleDucK.\n\n"
] | 294 | false | true | 0 | 7 | 107 | 36 | 19 | 17 | null | null |
kawamuray/ganeti | src/Ganeti/Constants.hs | gpl-2.0 | nodeEvacModes :: FrozenSet String
nodeEvacModes = ConstantUtils.mkSet $ map Types.evacModeToRaw [minBound..] | 108 | nodeEvacModes :: FrozenSet String
nodeEvacModes = ConstantUtils.mkSet $ map Types.evacModeToRaw [minBound..] | 108 | nodeEvacModes = ConstantUtils.mkSet $ map Types.evacModeToRaw [minBound..] | 74 | false | true | 0 | 7 | 10 | 30 | 15 | 15 | null | null |
sinelaw/infernu | src/Infernu/Parse.hs | gpl-2.0 | foldStmts f [x] expr = fromStatement f x expr | 45 | foldStmts f [x] expr = fromStatement f x expr | 45 | foldStmts f [x] expr = fromStatement f x expr | 45 | false | false | 0 | 6 | 8 | 23 | 11 | 12 | null | null |
creswick/Newt | tests/src/Integration.hs | bsd-3-clause | test_inplaceReplace :: String -> String -> Assertion
test_inplaceReplace author oracleFile = do tmpFile <- getTmpFileName
let input = (testDir </> "simpleTest" </> "in.cabal")
source= "--source=" ++ tmpFile
... | 1,096 | test_inplaceReplace :: String -> String -> Assertion
test_inplaceReplace author oracleFile = do tmpFile <- getTmpFileName
let input = (testDir </> "simpleTest" </> "in.cabal")
source= "--source=" ++ tmpFile
... | 1,096 | test_inplaceReplace author oracleFile = do tmpFile <- getTmpFileName
let input = (testDir </> "simpleTest" </> "in.cabal")
source= "--source=" ++ tmpFile
oracle = (testDir </> "simple... | 1,043 | false | true | 0 | 14 | 637 | 147 | 75 | 72 | null | null |
gamelost/pcgen-rules | src/Restrictions.hs | apache-2.0 | parsePreAlign :: PParser PreAlign
parsePreAlign = do
args <- tag "PREALIGN" >> parseWord `sepBy` char ','
return PreAlign { alignments = map parseAlignment args } where
parseAlignment :: String -> Alignment
parseAlignment x | x == "LG", x == "0" = LG
parseAlignment x | x == "LN", x == "1" = LN
parse... | 780 | parsePreAlign :: PParser PreAlign
parsePreAlign = do
args <- tag "PREALIGN" >> parseWord `sepBy` char ','
return PreAlign { alignments = map parseAlignment args } where
parseAlignment :: String -> Alignment
parseAlignment x | x == "LG", x == "0" = LG
parseAlignment x | x == "LN", x == "1" = LN
parse... | 780 | parsePreAlign = do
args <- tag "PREALIGN" >> parseWord `sepBy` char ','
return PreAlign { alignments = map parseAlignment args } where
parseAlignment :: String -> Alignment
parseAlignment x | x == "LG", x == "0" = LG
parseAlignment x | x == "LN", x == "1" = LN
parseAlignment x | x == "LE", x == "2" ... | 746 | false | true | 0 | 10 | 208 | 337 | 159 | 178 | null | null |
purcell/adventofcodeteam | app/Five.hs | bsd-3-clause | vowels :: String
vowels = "aeiou" | 33 | vowels :: String
vowels = "aeiou" | 33 | vowels = "aeiou" | 16 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
AjayRamanathan/plots | src/Plots/Axis/Ticks.hs | bsd-3-clause | -- | Do not show any ticks.
noTicks :: TickAlign
noTicks = NoTick | 65 | noTicks :: TickAlign
noTicks = NoTick | 37 | noTicks = NoTick | 16 | true | true | 0 | 4 | 12 | 12 | 7 | 5 | null | null |
fendor/connect-four | src/Game.hs | bsd-2-clause | inBounds :: ConnectFour -> Pos -> Bool
inBounds c (a, b) = (0 < a && a <= x) && (0 < b && b <= y)
where
g = gamefield c
x = nrows g
y = ncols g | 157 | inBounds :: ConnectFour -> Pos -> Bool
inBounds c (a, b) = (0 < a && a <= x) && (0 < b && b <= y)
where
g = gamefield c
x = nrows g
y = ncols g | 157 | inBounds c (a, b) = (0 < a && a <= x) && (0 < b && b <= y)
where
g = gamefield c
x = nrows g
y = ncols g | 118 | false | true | 0 | 9 | 53 | 91 | 47 | 44 | null | null |
orclev/adpasswd | Main.hs | gpl-3.0 | buildPath :: [PathPiece] -> String
buildPath = concat . intersperse "," . map bp
where
bp (OU x) = "ou="++x
bp (DC x) = "DC="++x | 138 | buildPath :: [PathPiece] -> String
buildPath = concat . intersperse "," . map bp
where
bp (OU x) = "ou="++x
bp (DC x) = "DC="++x | 138 | buildPath = concat . intersperse "," . map bp
where
bp (OU x) = "ou="++x
bp (DC x) = "DC="++x | 103 | false | true | 0 | 7 | 34 | 73 | 35 | 38 | null | null |
x-y-z/cabal | Cabal/Distribution/Simple/Utils.hs | bsd-3-clause | -- | Fix different systems silly line ending conventions
normaliseLineEndings :: String -> String
normaliseLineEndings [] = [] | 126 | normaliseLineEndings :: String -> String
normaliseLineEndings [] = [] | 69 | normaliseLineEndings [] = [] | 28 | true | true | 0 | 6 | 17 | 23 | 12 | 11 | null | null |
fibsifan/pandoc | src/Text/Pandoc/Readers/Docx/Parse.hs | gpl-2.0 | getHeaderLevel :: NameSpaces -> Element -> Maybe (String,Int)
getHeaderLevel ns element
| Just styleId <- findAttr (elemName ns "w" "styleId") element
, Just index <- stripPrefix "Heading" styleId
, isNumericNotNull index = Just (styleId, read index)
| Just styleId <- findAttr (elemName ns "w" "styleId") elem... | 546 | getHeaderLevel :: NameSpaces -> Element -> Maybe (String,Int)
getHeaderLevel ns element
| Just styleId <- findAttr (elemName ns "w" "styleId") element
, Just index <- stripPrefix "Heading" styleId
, isNumericNotNull index = Just (styleId, read index)
| Just styleId <- findAttr (elemName ns "w" "styleId") elem... | 546 | getHeaderLevel ns element
| Just styleId <- findAttr (elemName ns "w" "styleId") element
, Just index <- stripPrefix "Heading" styleId
, isNumericNotNull index = Just (styleId, read index)
| Just styleId <- findAttr (elemName ns "w" "styleId") element
, Just index <- findChild (elemName ns "w" "name") ele... | 484 | false | true | 0 | 13 | 129 | 198 | 92 | 106 | null | null |
Newlifer/libstep | src/Data/EXPRESS/Parsers.hs | mit | -- parameter_ref | variable_ref .
--
-- It's all SimpleId in the end
pGeneralRef :: Parser GeneralRef
pGeneralRef = pSimpleId | 125 | pGeneralRef :: Parser GeneralRef
pGeneralRef = pSimpleId | 56 | pGeneralRef = pSimpleId | 23 | true | true | 0 | 5 | 19 | 17 | 10 | 7 | null | null |
olsner/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | coercibleSCSelIdKey = mkPreludeMiscIdUnique 512 | 47 | coercibleSCSelIdKey = mkPreludeMiscIdUnique 512 | 47 | coercibleSCSelIdKey = mkPreludeMiscIdUnique 512 | 47 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
jstolarek/haddock | haddock-api/src/Haddock/Backends/LaTeX.hs | bsd-2-clause | ppName :: Name -> LaTeX
ppName = ppOccName . nameOccName | 56 | ppName :: Name -> LaTeX
ppName = ppOccName . nameOccName | 56 | ppName = ppOccName . nameOccName | 32 | false | true | 0 | 5 | 9 | 19 | 10 | 9 | null | null |
romanb/amazonka | amazonka-redshift/gen/Network/AWS/Redshift/Types.hs | mpl-2.0 | -- | The number of days that automatic cluster snapshots are retained.
cAutomatedSnapshotRetentionPeriod :: Lens' Cluster (Maybe Int)
cAutomatedSnapshotRetentionPeriod =
lens _cAutomatedSnapshotRetentionPeriod
(\s a -> s { _cAutomatedSnapshotRetentionPeriod = a }) | 276 | cAutomatedSnapshotRetentionPeriod :: Lens' Cluster (Maybe Int)
cAutomatedSnapshotRetentionPeriod =
lens _cAutomatedSnapshotRetentionPeriod
(\s a -> s { _cAutomatedSnapshotRetentionPeriod = a }) | 205 | cAutomatedSnapshotRetentionPeriod =
lens _cAutomatedSnapshotRetentionPeriod
(\s a -> s { _cAutomatedSnapshotRetentionPeriod = a }) | 142 | true | true | 0 | 9 | 42 | 46 | 25 | 21 | null | null |
anchor/vaultaire-collector-ceilometer | test/Main.hs | mit | -- Network Rx/Tx
expectedNetworkRxPayload :: Word64
expectedNetworkRxPayload = 58832 | 85 | expectedNetworkRxPayload :: Word64
expectedNetworkRxPayload = 58832 | 67 | expectedNetworkRxPayload = 58832 | 32 | true | true | 0 | 4 | 9 | 12 | 7 | 5 | null | null |
Rufflewind/calico-hs | Calico/MonadIO.hs | mit | ioError :: MonadIO m => IOError -> m a
ioError = liftIO . ioError | 65 | ioError :: MonadIO m => IOError -> m a
ioError = liftIO . ioError | 65 | ioError = liftIO . ioError | 26 | false | true | 0 | 7 | 13 | 29 | 14 | 15 | null | null |
YueLiPicasso/unification | UnifyTerms.hs | gpl-3.0 | unifyTerms v@(Variable _ ) c@(Constant _ ) = Just [(c,v)] | 57 | unifyTerms v@(Variable _ ) c@(Constant _ ) = Just [(c,v)] | 57 | unifyTerms v@(Variable _ ) c@(Constant _ ) = Just [(c,v)] | 57 | false | false | 0 | 8 | 9 | 41 | 22 | 19 | null | null |
exbb2/BlastItWithPiss | src/Import.hs | gpl-3.0 | whenJust :: Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust mb m = maybe (return ()) m mb | 92 | whenJust :: Monad m => Maybe a -> (a -> m ()) -> m ()
whenJust mb m = maybe (return ()) m mb | 92 | whenJust mb m = maybe (return ()) m mb | 38 | false | true | 0 | 11 | 23 | 66 | 31 | 35 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/basicTypes/MkId.hs | bsd-3-clause | {-
************************************************************************
* *
\subsection{Primitive operations}
* *
****************************************************************... | 1,650 | mkPrimOpId :: PrimOp -> Id
mkPrimOpId prim_op
= id
where
(tyvars,arg_tys,res_ty, arity, strict_sig) = primOpSig prim_op
ty = mkForAllTys tyvars (mkFunTys arg_tys res_ty)
name = mkWiredInName gHC_PRIM (primOpOcc prim_op)
(mkPrimOpIdUnique (primOpTag prim_op))
... | 1,317 | mkPrimOpId prim_op
= id
where
(tyvars,arg_tys,res_ty, arity, strict_sig) = primOpSig prim_op
ty = mkForAllTys tyvars (mkFunTys arg_tys res_ty)
name = mkWiredInName gHC_PRIM (primOpOcc prim_op)
(mkPrimOpIdUnique (primOpTag prim_op))
(AnId id) UserSyntax... | 1,290 | true | true | 4 | 13 | 524 | 180 | 102 | 78 | null | null |
siddhanathan/ghc | compiler/coreSyn/CoreUnfold.hs | bsd-3-clause | tryUnfolding :: DynFlags -> Id -> Bool -> [ArgSummary] -> CallCtxt
-> CoreExpr -> Bool -> Bool -> Bool -> UnfoldingGuidance
-> Maybe CoreExpr
tryUnfolding dflags id lone_variable
arg_infos cont_info unf_template is_top
is_wf is_exp guidance
= case guidance of
Un... | 11,311 | tryUnfolding :: DynFlags -> Id -> Bool -> [ArgSummary] -> CallCtxt
-> CoreExpr -> Bool -> Bool -> Bool -> UnfoldingGuidance
-> Maybe CoreExpr
tryUnfolding dflags id lone_variable
arg_infos cont_info unf_template is_top
is_wf is_exp guidance
= case guidance of
Un... | 11,311 | tryUnfolding dflags id lone_variable
arg_infos cont_info unf_template is_top
is_wf is_exp guidance
= case guidance of
UnfNever -> traceInline dflags str (ptext (sLit "UnfNever")) Nothing
UnfWhen { ug_arity = uf_arity, ug_unsat_ok = unsat_ok, ug_boring_ok = boring_ok }
| eno... | 11,143 | false | true | 0 | 15 | 3,034 | 740 | 377 | 363 | null | null |
bitemyapp/persistent | persistent-mongoDB/Database/Persist/MongoDB.hs | mit | eitherFromPersistValues :: (PersistEntity record) => EntityDef -> [DB.Field] -> Either T.Text (Entity record)
eitherFromPersistValues entDef doc = case mKey of
Nothing -> addDetail $ Left $ "could not find _id field: "
Just kpv -> do
body <- addDetail (fromPersistValues (map snd $ orderPersistValues (toEmb... | 1,038 | eitherFromPersistValues :: (PersistEntity record) => EntityDef -> [DB.Field] -> Either T.Text (Entity record)
eitherFromPersistValues entDef doc = case mKey of
Nothing -> addDetail $ Left $ "could not find _id field: "
Just kpv -> do
body <- addDetail (fromPersistValues (map snd $ orderPersistValues (toEmb... | 1,038 | eitherFromPersistValues entDef doc = case mKey of
Nothing -> addDetail $ Left $ "could not find _id field: "
Just kpv -> do
body <- addDetail (fromPersistValues (map snd $ orderPersistValues (toEmbedEntityDef entDef) castDoc))
key <- keyFromValues [kpv]
return $ Entity key body
where
addD... | 928 | false | true | 2 | 18 | 211 | 244 | 118 | 126 | null | null |
walck/learn-physics | src/Physics/Learn/Curve.hs | bsd-3-clause | evalCurve :: Curve -- ^ the curve
-> Double -- ^ the parameter
-> Position -- ^ position of the point on the curve at that parameter
evalCurve (Curve f _ _) t = f t | 192 | evalCurve :: Curve -- ^ the curve
-> Double -- ^ the parameter
-> Position
evalCurve (Curve f _ _) t = f t | 133 | evalCurve (Curve f _ _) t = f t | 31 | true | true | 0 | 10 | 63 | 45 | 22 | 23 | null | null |
quyse/flaw | flaw-graphics/Flaw/Graphics/Program.hs | mit | constf :: Float -> Node Float
constf = cnst | 43 | constf :: Float -> Node Float
constf = cnst | 43 | constf = cnst | 13 | false | true | 0 | 6 | 8 | 18 | 9 | 9 | null | null |
dan-t/cabal-bounds | lib/CabalBounds/Args.hs | bsd-3-clause | defaultFormat :: Args
defaultFormat = Format
{ output = def
, cabalFile = def
} | 91 | defaultFormat :: Args
defaultFormat = Format
{ output = def
, cabalFile = def
} | 91 | defaultFormat = Format
{ output = def
, cabalFile = def
} | 69 | false | true | 0 | 7 | 26 | 29 | 16 | 13 | null | null |
juhp/gtk2hs | gtk/demo/gtkbuilder/GtkBuilderTest.hs | lgpl-3.0 | main = do
initGUI
-- Create the builder, and load the UI file
builder <- builderNew
builderAddFromFile builder "simple.ui"
-- Retrieve some objects from the UI
window <- builderGetObject builder castToWindow "window1"
button <- builderGetObject builder castToBut... | 547 | main = do
initGUI
-- Create the builder, and load the UI file
builder <- builderNew
builderAddFromFile builder "simple.ui"
-- Retrieve some objects from the UI
window <- builderGetObject builder castToWindow "window1"
button <- builderGetObject builder castToBut... | 547 | main = do
initGUI
-- Create the builder, and load the UI file
builder <- builderNew
builderAddFromFile builder "simple.ui"
-- Retrieve some objects from the UI
window <- builderGetObject builder castToWindow "window1"
button <- builderGetObject builder castToBut... | 547 | false | false | 0 | 8 | 167 | 90 | 39 | 51 | null | null |
oldmanmike/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | doVecUnpackOp :: Maybe MachOp -- Cast from vector component to element result
-> CmmType -- Type of vector
-> CmmExpr -- Vector
-> [CmmFormal] -- Element results
-> FCode ()
doVecUnpackOp maybe_post_read_cast ty e res =
vecUnpack res 0
where
... | 1,142 | doVecUnpackOp :: Maybe MachOp -- Cast from vector component to element result
-> CmmType -- Type of vector
-> CmmExpr -- Vector
-> [CmmFormal] -- Element results
-> FCode ()
doVecUnpackOp maybe_post_read_cast ty e res =
vecUnpack res 0
where
... | 1,142 | doVecUnpackOp maybe_post_read_cast ty e res =
vecUnpack res 0
where
vecUnpack :: [CmmFormal] -> Int -> FCode ()
vecUnpack [] _ =
return ()
vecUnpack (r : rs) i = do
if isFloatType (vecElemType ty)
then emitAssign (CmmLocal r) (cast (CmmMachOp (MO_VF_Extract len wid)
... | 897 | false | true | 0 | 14 | 449 | 341 | 169 | 172 | null | null |
Garygunn94/DFS | FileServer/.stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/autogen/Paths_FileServer.hs | bsd-3-clause | getSysconfDir = catchIO (getEnv "FileServer_sysconfdir") (\_ -> return sysconfdir) | 82 | getSysconfDir = catchIO (getEnv "FileServer_sysconfdir") (\_ -> return sysconfdir) | 82 | getSysconfDir = catchIO (getEnv "FileServer_sysconfdir") (\_ -> return sysconfdir) | 82 | false | false | 1 | 8 | 8 | 32 | 14 | 18 | null | null |
rueshyna/gogol | gogol-books/gen/Network/Google/Books/Types/Product.hs | mpl-2.0 | -- | Creates a value of 'CategoryItemsItem' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'ciiName'
--
-- * 'ciiCategoryId'
--
-- * 'ciiBadgeURL'
categoryItemsItem
:: CategoryItemsItem
categoryItemsItem =
CategoryItemsItem'
... | 409 | categoryItemsItem
:: CategoryItemsItem
categoryItemsItem =
CategoryItemsItem'
{ _ciiName = Nothing
, _ciiCategoryId = Nothing
, _ciiBadgeURL = Nothing
} | 176 | categoryItemsItem =
CategoryItemsItem'
{ _ciiName = Nothing
, _ciiCategoryId = Nothing
, _ciiBadgeURL = Nothing
} | 133 | true | true | 0 | 7 | 84 | 50 | 30 | 20 | null | null |
aaronvargo/aaronvargo.github.io | src/Main.hs | bsd-3-clause | postCompiler :: Compiler (Item String)
postCompiler =
myPandocCompiler
>>= loadAndApplyTemplate "templates/post.html" postCtx
>>= saveSnapshot contentSnapshot
>>= loadAndApplyTemplate "templates/title.html" postCtx
>>= saveSnapshot titledContentSnapshot
>>= loadAndApplyTemplate "templates/default.html" post... | 344 | postCompiler :: Compiler (Item String)
postCompiler =
myPandocCompiler
>>= loadAndApplyTemplate "templates/post.html" postCtx
>>= saveSnapshot contentSnapshot
>>= loadAndApplyTemplate "templates/title.html" postCtx
>>= saveSnapshot titledContentSnapshot
>>= loadAndApplyTemplate "templates/default.html" post... | 344 | postCompiler =
myPandocCompiler
>>= loadAndApplyTemplate "templates/post.html" postCtx
>>= saveSnapshot contentSnapshot
>>= loadAndApplyTemplate "templates/title.html" postCtx
>>= saveSnapshot titledContentSnapshot
>>= loadAndApplyTemplate "templates/default.html" postCtx
>>= relativizeUrls | 305 | false | true | 14 | 6 | 41 | 87 | 36 | 51 | null | null |
Fuco1/mpris | src/DBus/Mpris/MediaPlayer2/Player/Methods.hs | gpl-3.0 | mprisCall :: MemberName -> MethodCall
mprisCall = methodCall "/org/mpris/MediaPlayer2" "org.mpris.MediaPlayer2.Player" | 118 | mprisCall :: MemberName -> MethodCall
mprisCall = methodCall "/org/mpris/MediaPlayer2" "org.mpris.MediaPlayer2.Player" | 118 | mprisCall = methodCall "/org/mpris/MediaPlayer2" "org.mpris.MediaPlayer2.Player" | 80 | false | true | 0 | 5 | 9 | 20 | 10 | 10 | null | null |
b1g3ar5/Spreadsheet | Arithmetic.hs | mit | -- | log function
vln :: [Value] -> Value
vln (x:[]) = log x | 60 | vln :: [Value] -> Value
vln (x:[]) = log x | 42 | vln (x:[]) = log x | 18 | true | true | 0 | 8 | 13 | 34 | 18 | 16 | null | null |
siddhanathan/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | boolTyConKey = mkPreludeTyConUnique 4 | 65 | boolTyConKey = mkPreludeTyConUnique 4 | 65 | boolTyConKey = mkPreludeTyConUnique 4 | 65 | false | false | 0 | 5 | 31 | 9 | 4 | 5 | null | null |
rpereira/servant-blog | src/Api/Registration.hs | bsd-3-clause | login :: Usr Login -> App (Usr (Maybe AuthUser))
login (Usr (Login email password)) = do
maybeUser <- runDb $
selectFirst [UserEmail ==. email, UserPassword ==. password] []
case maybeUser of
Nothing -> throwError err401 { errBody = "Incorrect username or password" }
Just user -> return . Us... | 349 | login :: Usr Login -> App (Usr (Maybe AuthUser))
login (Usr (Login email password)) = do
maybeUser <- runDb $
selectFirst [UserEmail ==. email, UserPassword ==. password] []
case maybeUser of
Nothing -> throwError err401 { errBody = "Incorrect username or password" }
Just user -> return . Us... | 349 | login (Usr (Login email password)) = do
maybeUser <- runDb $
selectFirst [UserEmail ==. email, UserPassword ==. password] []
case maybeUser of
Nothing -> throwError err401 { errBody = "Incorrect username or password" }
Just user -> return . Usr $ fmap userToAuth maybeUser | 300 | false | true | 0 | 13 | 80 | 133 | 63 | 70 | null | null |
ebakan/haskell-gates | gates.hs | mit | apply4 fn _ = [] | 16 | apply4 fn _ = [] | 16 | apply4 fn _ = [] | 16 | false | false | 0 | 5 | 4 | 13 | 6 | 7 | null | null |
mzini/TcT | source/Tct/Interactive.hs | gpl-3.0 | loadIDC :: FilePath -> IO ()
loadIDC n = load' n >> setIDC | 58 | loadIDC :: FilePath -> IO ()
loadIDC n = load' n >> setIDC | 58 | loadIDC n = load' n >> setIDC | 29 | false | true | 2 | 8 | 12 | 36 | 15 | 21 | null | null |
beni55/haste-compiler | libraries/ghc-7.10/base/include/HaskellConstants.hs | bsd-3-clause | mAX_SPEC_FUN_SIZE :: Int
mAX_SPEC_FUN_SIZE = MAX_SPEC_FUN_SIZE | 62 | mAX_SPEC_FUN_SIZE :: Int
mAX_SPEC_FUN_SIZE = MAX_SPEC_FUN_SIZE | 62 | mAX_SPEC_FUN_SIZE = MAX_SPEC_FUN_SIZE | 37 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
sgillespie/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | -- IndexXXXArray
emitPrimOp dflags res IndexByteArrayOp_Char args = doIndexByteArrayOp (Just (mo_u_8ToWord dflags)) b8 res args | 142 | emitPrimOp dflags res IndexByteArrayOp_Char args = doIndexByteArrayOp (Just (mo_u_8ToWord dflags)) b8 res args | 124 | emitPrimOp dflags res IndexByteArrayOp_Char args = doIndexByteArrayOp (Just (mo_u_8ToWord dflags)) b8 res args | 124 | true | false | 0 | 9 | 29 | 37 | 18 | 19 | null | null |
nomeata/ghc | compiler/codeGen/CgPrimOp.hs | bsd-3-clause | emitPrimOp res IndexOffAddrOp_Word8 args _ = doIndexOffAddrOp (Just mo_u_8ToWord) b8 res args | 99 | emitPrimOp res IndexOffAddrOp_Word8 args _ = doIndexOffAddrOp (Just mo_u_8ToWord) b8 res args | 99 | emitPrimOp res IndexOffAddrOp_Word8 args _ = doIndexOffAddrOp (Just mo_u_8ToWord) b8 res args | 99 | false | false | 0 | 7 | 17 | 33 | 14 | 19 | null | null |
xnning/TypeInfer | src/Environment.hs | gpl-3.0 | genTVar :: (Fresh m) => m Expr
genTVar = do nm <- genName
return (TVar nm)
-----------------------------------------
-- instantiation
-----------------------------------------
-- instantiation used in var | 220 | genTVar :: (Fresh m) => m Expr
genTVar = do nm <- genName
return (TVar nm)
-----------------------------------------
-- instantiation
-----------------------------------------
-- instantiation used in var | 220 | genTVar = do nm <- genName
return (TVar nm)
-----------------------------------------
-- instantiation
-----------------------------------------
-- instantiation used in var | 189 | false | true | 0 | 10 | 40 | 52 | 25 | 27 | null | null |
nilscc/weightlifting.cc | src-hs/LiftMe/Html/MainPage.hs | bsd-3-clause | defaultMainPage
:: Html -- ^ Menu
-> Html -- ^ Content
-> Html -- ^ Footer
-> MainPage
defaultMainPage menu content footer = emptyMainPage
{ css = [ LinkStylesheet "style/main.css" ]
, js = [ LinkJavascript "js/main.js" [] ]
, menu = menu
, content = content
, footer = footer
} | 317 | defaultMainPage
:: Html -- ^ Menu
-> Html -- ^ Content
-> Html -- ^ Footer
-> MainPage
defaultMainPage menu content footer = emptyMainPage
{ css = [ LinkStylesheet "style/main.css" ]
, js = [ LinkJavascript "js/main.js" [] ]
, menu = menu
, content = content
, footer = footer
} | 317 | defaultMainPage menu content footer = emptyMainPage
{ css = [ LinkStylesheet "style/main.css" ]
, js = [ LinkJavascript "js/main.js" [] ]
, menu = menu
, content = content
, footer = footer
} | 216 | false | true | 0 | 10 | 90 | 90 | 49 | 41 | null | null |
TomMD/ghc | testsuite/tests/simplCore/should_run/T5441a.hs | bsd-3-clause | showNat :: Nat -> String
showNat = coe2 (showInBase Z) | 55 | showNat :: Nat -> String
showNat = coe2 (showInBase Z) | 54 | showNat = coe2 (showInBase Z) | 29 | false | true | 0 | 7 | 10 | 24 | 12 | 12 | null | null |
sleexyz/haskell-fun | TTFI.hs | bsd-3-clause | zeroAddPass :: Optimization IsZero
zeroAddPass program sym = bwd (program nextSym)
where
MkOptData { fwd, bwd } = getOptData sym
baseOpt@MkSymantics { .. } = getBaseOpt sym
nextSym = baseOpt {
int = \x -> if x == 0 then WrapZero else int x,
add = \x y -> case (x, y) of
(WrapZero, x) ->... | 381 | zeroAddPass :: Optimization IsZero
zeroAddPass program sym = bwd (program nextSym)
where
MkOptData { fwd, bwd } = getOptData sym
baseOpt@MkSymantics { .. } = getBaseOpt sym
nextSym = baseOpt {
int = \x -> if x == 0 then WrapZero else int x,
add = \x y -> case (x, y) of
(WrapZero, x) ->... | 381 | zeroAddPass program sym = bwd (program nextSym)
where
MkOptData { fwd, bwd } = getOptData sym
baseOpt@MkSymantics { .. } = getBaseOpt sym
nextSym = baseOpt {
int = \x -> if x == 0 then WrapZero else int x,
add = \x y -> case (x, y) of
(WrapZero, x) -> x
(x, WrapZero) -> x
... | 346 | false | true | 0 | 11 | 121 | 164 | 88 | 76 | null | null |
aartifact/aartifact-verifier | src/ExpSubst.hs | mit | exmchq' ps ns xs e xs' e' =
let ps' = [(x,x') | (x,x')<-ps, not (x `elem` xs || x' `elem` xs')]
in if xs `eql` xs' then
exmch' ps' (ns `diff` xs) e e'
else if length xs == length xs' then
exmch' (ps'++(zip xs xs')) ((ns `diff` xs) `diff` xs') e e'
else Nothing | 288 | exmchq' ps ns xs e xs' e' =
let ps' = [(x,x') | (x,x')<-ps, not (x `elem` xs || x' `elem` xs')]
in if xs `eql` xs' then
exmch' ps' (ns `diff` xs) e e'
else if length xs == length xs' then
exmch' (ps'++(zip xs xs')) ((ns `diff` xs) `diff` xs') e e'
else Nothing | 288 | exmchq' ps ns xs e xs' e' =
let ps' = [(x,x') | (x,x')<-ps, not (x `elem` xs || x' `elem` xs')]
in if xs `eql` xs' then
exmch' ps' (ns `diff` xs) e e'
else if length xs == length xs' then
exmch' (ps'++(zip xs xs')) ((ns `diff` xs) `diff` xs') e e'
else Nothing | 288 | false | false | 0 | 15 | 83 | 171 | 95 | 76 | null | null |
harendra-kumar/asyncly | src/Streamly/Internal/Data/Stream/StreamD/Type.hs | bsd-3-clause | toStreamK :: Monad m => Stream m a -> K.Stream m a
toStreamK (Stream step state) = go state
where
go st = K.mkStream $ \gst yld _ stp ->
let go' ss = do
r <- step gst ss
case r of
Yield x s -> yld x (go s)
Skip s -> go' s
Stop -> s... | 363 | toStreamK :: Monad m => Stream m a -> K.Stream m a
toStreamK (Stream step state) = go state
where
go st = K.mkStream $ \gst yld _ stp ->
let go' ss = do
r <- step gst ss
case r of
Yield x s -> yld x (go s)
Skip s -> go' s
Stop -> s... | 363 | toStreamK (Stream step state) = go state
where
go st = K.mkStream $ \gst yld _ stp ->
let go' ss = do
r <- step gst ss
case r of
Yield x s -> yld x (go s)
Skip s -> go' s
Stop -> stp
in go' st
#ifndef DISABLE_FUSION
| 312 | false | true | 0 | 20 | 160 | 152 | 70 | 82 | null | null |
DanBurton/sexy | src/Sexy/Functions/Bool.hs | bsd-3-clause | toBool :: (BoolC b) => b -> Bool
toBool = fromBool | 50 | toBool :: (BoolC b) => b -> Bool
toBool = fromBool | 50 | toBool = fromBool | 17 | false | true | 0 | 8 | 10 | 31 | 14 | 17 | null | null |
lukexi/cabal | cabal-install/Main.hs | bsd-3-clause | wrapperCmd :: Monoid flags => CommandUI flags -> (flags -> Flag Verbosity)
-> (flags -> Flag String) -> CommandSpec Action
wrapperCmd ui verbosity distPref =
CommandSpec ui (\ui' -> wrapperAction ui' verbosity distPref) NormalCommand | 246 | wrapperCmd :: Monoid flags => CommandUI flags -> (flags -> Flag Verbosity)
-> (flags -> Flag String) -> CommandSpec Action
wrapperCmd ui verbosity distPref =
CommandSpec ui (\ui' -> wrapperAction ui' verbosity distPref) NormalCommand | 246 | wrapperCmd ui verbosity distPref =
CommandSpec ui (\ui' -> wrapperAction ui' verbosity distPref) NormalCommand | 112 | false | true | 0 | 12 | 46 | 91 | 42 | 49 | null | null |
BartMassey/list-combinators | Data/List/Combinator.hs | bsd-3-clause | -- | The 'dropWhileEnd' function drops the largest suffix of a list
-- in which the given predicate holds for all elements. Some examples:
--
-- > dropWhileEnd isSpace "foo\n" == "foo"
-- > dropWhileEnd isSpace "foo bar" == "foo bar"
-- > dropWhileEnd isSpace ("foo\n" ++ undefined) == "foo" ++ undefined
--
-- /O(n)/ ... | 617 | dropWhileEnd :: (a -> Bool) -> [a] -> [a]
dropWhileEnd p xs = fst $ spanEnd p xs | 80 | dropWhileEnd p xs = fst $ spanEnd p xs | 38 | true | true | 0 | 7 | 133 | 59 | 37 | 22 | null | null |
nikita-volkov/type-structure | src/TypeStructure/Prelude/Data.hs | mit | packText = Data.Text.pack | 25 | packText = Data.Text.pack | 25 | packText = Data.Text.pack | 25 | false | false | 0 | 5 | 2 | 9 | 5 | 4 | null | null |
rueshyna/gogol | gogol-storage/gen/Network/Google/Storage/Types/Product.hs | mpl-2.0 | -- | The email address associated with the entity, if any.
oacaEmail :: Lens' ObjectAccessControl (Maybe Text)
oacaEmail
= lens _oacaEmail (\ s a -> s{_oacaEmail = a}) | 169 | oacaEmail :: Lens' ObjectAccessControl (Maybe Text)
oacaEmail
= lens _oacaEmail (\ s a -> s{_oacaEmail = a}) | 110 | oacaEmail
= lens _oacaEmail (\ s a -> s{_oacaEmail = a}) | 58 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
svenssonjoel/GCDObsidian | Obsidian/GCDObsidian/Exp.hs | bsd-3-clause | expToCExpGeneral e@(BinOp Max e1 e2) = cFuncExpr "max" [expToCExp e1, expToCExp e2] (typeToCType (typeOf e)) | 108 | expToCExpGeneral e@(BinOp Max e1 e2) = cFuncExpr "max" [expToCExp e1, expToCExp e2] (typeToCType (typeOf e)) | 108 | expToCExpGeneral e@(BinOp Max e1 e2) = cFuncExpr "max" [expToCExp e1, expToCExp e2] (typeToCType (typeOf e)) | 108 | false | false | 0 | 9 | 14 | 53 | 26 | 27 | null | null |
ulricha/dsh | src/Database/DSH/CL/Opt/Auxiliary.hs | bsd-3-clause | subst (If ty e1 e2 e3) = If ty <$> subst e1 <*> subst e2 <*> subst e3 | 69 | subst (If ty e1 e2 e3) = If ty <$> subst e1 <*> subst e2 <*> subst e3 | 69 | subst (If ty e1 e2 e3) = If ty <$> subst e1 <*> subst e2 <*> subst e3 | 69 | false | false | 2 | 7 | 17 | 47 | 20 | 27 | null | null |
micxjo/regex-ast | src/Text/Regex/AST.hs | bsd-3-clause | builder (Repeat sub 0 Nothing) = builder sub <> singleton '*' | 61 | builder (Repeat sub 0 Nothing) = builder sub <> singleton '*' | 61 | builder (Repeat sub 0 Nothing) = builder sub <> singleton '*' | 61 | false | false | 0 | 7 | 10 | 29 | 13 | 16 | null | null |
tomjnixon/buzzlang | src/Parser.hs | mit | cdrParser = do reserved "centralise"
arg <- expressionParser
return $ Cdr arg | 107 | cdrParser = do reserved "centralise"
arg <- expressionParser
return $ Cdr arg | 107 | cdrParser = do reserved "centralise"
arg <- expressionParser
return $ Cdr arg | 107 | false | false | 0 | 8 | 41 | 29 | 12 | 17 | null | null |
jtdaugherty/vty-ui-builder-xml | tests/Validation.hs | bsd-3-clause | partitionBy :: (Eq a) => [a] -> a -> [[a]]
partitionBy stuff d = partitionBy' stuff d []
where
partitionBy' [] _ cur = if null cur
then []
else [cur]
partitionBy' (e:es) delim cur =
if e == delim
then [cur] ++ partitionBy' e... | 380 | partitionBy :: (Eq a) => [a] -> a -> [[a]]
partitionBy stuff d = partitionBy' stuff d []
where
partitionBy' [] _ cur = if null cur
then []
else [cur]
partitionBy' (e:es) delim cur =
if e == delim
then [cur] ++ partitionBy' e... | 380 | partitionBy stuff d = partitionBy' stuff d []
where
partitionBy' [] _ cur = if null cur
then []
else [cur]
partitionBy' (e:es) delim cur =
if e == delim
then [cur] ++ partitionBy' es delim []
else partitionBy' es d... | 337 | false | true | 1 | 11 | 159 | 158 | 79 | 79 | null | null |
todays-mitsui/discussion | test/UnitBool.hs | mit | case_x_is_bound_in_term =
assertBool "" $ x `isBoundIn` App [VarT z, Lambda [y] (App [VarT y, VarT x]), VarT y] | 113 | case_x_is_bound_in_term =
assertBool "" $ x `isBoundIn` App [VarT z, Lambda [y] (App [VarT y, VarT x]), VarT y] | 113 | case_x_is_bound_in_term =
assertBool "" $ x `isBoundIn` App [VarT z, Lambda [y] (App [VarT y, VarT x]), VarT y] | 113 | false | false | 0 | 12 | 20 | 63 | 32 | 31 | null | null |
trxeste/wrk | haskell/haskellTextEditor/haskellEd.hs | bsd-3-clause | edt _ = do
setCursorPosition 16 0
clearFromCursorToScreenBeginning
let buff= fillDocument "-- "
process buff
runInputT defaultSettings (repl buff) | 156 | edt _ = do
setCursorPosition 16 0
clearFromCursorToScreenBeginning
let buff= fillDocument "-- "
process buff
runInputT defaultSettings (repl buff) | 156 | edt _ = do
setCursorPosition 16 0
clearFromCursorToScreenBeginning
let buff= fillDocument "-- "
process buff
runInputT defaultSettings (repl buff) | 156 | false | false | 0 | 10 | 28 | 52 | 21 | 31 | null | null |
christiaanb/ghc | testsuite/tests/typecheck/should_compile/Improvement.hs | bsd-3-clause | foo :: Bool
foo = blug undefined | 32 | foo :: Bool
foo = blug undefined | 32 | foo = blug undefined | 20 | false | true | 0 | 6 | 6 | 20 | 8 | 12 | null | null |
akegalj/snowdrift | tests/NotifyTest.hs | agpl-3.0 | projectNotificationContent
:: From query expr backend (expr (Entity ProjectNotification))
=> UserId -> ProjectNotificationType
-> query (expr (Value Markdown))
projectNotificationContent =
notificationContent
ProjectNotificationTo ProjectNotificationType ProjectNotificationContent | 305 | projectNotificationContent
:: From query expr backend (expr (Entity ProjectNotification))
=> UserId -> ProjectNotificationType
-> query (expr (Value Markdown))
projectNotificationContent =
notificationContent
ProjectNotificationTo ProjectNotificationType ProjectNotificationContent | 305 | projectNotificationContent =
notificationContent
ProjectNotificationTo ProjectNotificationType ProjectNotificationContent | 133 | false | true | 0 | 13 | 47 | 72 | 33 | 39 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | formally = id | 13 | formally = id | 13 | formally = id | 13 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
hguenther/fac | Formula.hs | gpl-3.0 | flattenFormula (Or x y) = Or (flattenFormula x) (flattenFormula y) | 66 | flattenFormula (Or x y) = Or (flattenFormula x) (flattenFormula y) | 66 | flattenFormula (Or x y) = Or (flattenFormula x) (flattenFormula y) | 66 | false | false | 0 | 7 | 9 | 35 | 16 | 19 | null | null |
nevrenato/Hets_Fork | SoftFOL/DFGParser.hs | gpl-2.0 | proofList :: Parser SPProofList
proofList = do
listOf "proof"
pa <- optionMaybe $ parensDot $ do
pt <- optionMaybe getproofType
assList <- option Map.empty (comma >> assocList)
return (pt, assList)
steps <- many proofStep
endOfList
return $ case pa of
Nothing -> SPProof... | 525 | proofList :: Parser SPProofList
proofList = do
listOf "proof"
pa <- optionMaybe $ parensDot $ do
pt <- optionMaybe getproofType
assList <- option Map.empty (comma >> assocList)
return (pt, assList)
steps <- many proofStep
endOfList
return $ case pa of
Nothing -> SPProof... | 525 | proofList = do
listOf "proof"
pa <- optionMaybe $ parensDot $ do
pt <- optionMaybe getproofType
assList <- option Map.empty (comma >> assocList)
return (pt, assList)
steps <- many proofStep
endOfList
return $ case pa of
Nothing -> SPProofList
{ proofType = Nothi... | 493 | false | true | 0 | 14 | 175 | 165 | 84 | 81 | null | null |
olsner/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | compose_RDR :: RdrName
compose_RDR = varQual_RDR gHC_BASE (fsLit ".") | 81 | compose_RDR :: RdrName
compose_RDR = varQual_RDR gHC_BASE (fsLit ".") | 81 | compose_RDR = varQual_RDR gHC_BASE (fsLit ".") | 58 | false | true | 0 | 7 | 20 | 22 | 11 | 11 | null | null |
riwsky/wiwinwlh | src/free_dsl.hs | mit | interp :: IOFree a -> IO a
interp (Pure r) = return r | 53 | interp :: IOFree a -> IO a
interp (Pure r) = return r | 53 | interp (Pure r) = return r | 26 | false | true | 0 | 7 | 12 | 33 | 15 | 18 | null | null |
facebookincubator/duckling | Duckling/Time/EN/TT/Rules.hs | bsd-3-clause | ruleDDMMYYYY :: Rule
ruleDDMMYYYY = Rule
{ name = "dd/mm/yyyy"
, pattern =
[ regex "(3[01]|[12]\\d|0?[1-9])[-/\\s](1[0-2]|0?[1-9])[-/\\s](\\d{2,4})"
]
, prod = \tokens -> case tokens of
(Token RegexMatch (GroupMatch (dd:mm:yy:_)):_) -> do
y <- parseInt yy
d <- parseInt dd
m <... | 388 | ruleDDMMYYYY :: Rule
ruleDDMMYYYY = Rule
{ name = "dd/mm/yyyy"
, pattern =
[ regex "(3[01]|[12]\\d|0?[1-9])[-/\\s](1[0-2]|0?[1-9])[-/\\s](\\d{2,4})"
]
, prod = \tokens -> case tokens of
(Token RegexMatch (GroupMatch (dd:mm:yy:_)):_) -> do
y <- parseInt yy
d <- parseInt dd
m <... | 388 | ruleDDMMYYYY = Rule
{ name = "dd/mm/yyyy"
, pattern =
[ regex "(3[01]|[12]\\d|0?[1-9])[-/\\s](1[0-2]|0?[1-9])[-/\\s](\\d{2,4})"
]
, prod = \tokens -> case tokens of
(Token RegexMatch (GroupMatch (dd:mm:yy:_)):_) -> do
y <- parseInt yy
d <- parseInt dd
m <- parseInt mm
... | 367 | false | true | 0 | 20 | 112 | 139 | 69 | 70 | null | null |
tjakway/ghcjvm | compiler/codeGen/StgCmmMonad.hs | bsd-3-clause | getCmm :: FCode () -> FCode CmmGroup
-- Get all the CmmTops (there should be no stmts)
-- Return a single Cmm which may be split from other Cmms by
-- object splitting (at a later stage)
getCmm code
= do { state1 <- getState
; ((), state2) <- withState code (state1 { cgs_tops = nilOL })
; setState $... | 404 | getCmm :: FCode () -> FCode CmmGroup
getCmm code
= do { state1 <- getState
; ((), state2) <- withState code (state1 { cgs_tops = nilOL })
; setState $ state2 { cgs_tops = cgs_tops state1 }
; return (fromOL (cgs_tops state2)) } | 254 | getCmm code
= do { state1 <- getState
; ((), state2) <- withState code (state1 { cgs_tops = nilOL })
; setState $ state2 { cgs_tops = cgs_tops state1 }
; return (fromOL (cgs_tops state2)) } | 217 | true | true | 0 | 12 | 100 | 113 | 58 | 55 | null | null |
mitchellwrosen/srcloc | Data/Loc.hs | bsd-3-clause | -- | Format a position in a human-readable way.
displaySPos :: Pos -> ShowS
displaySPos p = displaySLoc (Loc p p) | 113 | displaySPos :: Pos -> ShowS
displaySPos p = displaySLoc (Loc p p) | 65 | displaySPos p = displaySLoc (Loc p p) | 37 | true | true | 0 | 7 | 20 | 30 | 15 | 15 | null | null |
termite2/debug | Debug/CodeWin.hs | bsd-3-clause | isMBActive :: MBDescr -> Bool
isMBActive (MBA _) = True | 55 | isMBActive :: MBDescr -> Bool
isMBActive (MBA _) = True | 55 | isMBActive (MBA _) = True | 25 | false | true | 0 | 7 | 9 | 24 | 12 | 12 | null | null |
keithodulaigh/Hets | Common/Keywords.hs | gpl-2.0 | left_assocS :: String
left_assocS = "left_assoc" | 48 | left_assocS :: String
left_assocS = "left_assoc" | 48 | left_assocS = "left_assoc" | 26 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
amccausl/Swish | Swish/HaskellRDF/RDFGraphTest.hs | lgpl-2.1 | lt2 = Just (langName "EN") | 26 | lt2 = Just (langName "EN") | 26 | lt2 = Just (langName "EN") | 26 | false | false | 1 | 7 | 4 | 18 | 7 | 11 | null | null |
trskop/cabal | cabal-install/Main.hs | bsd-3-clause | updateAction :: Flag Verbosity -> [String] -> Action
updateAction verbosityFlag extraArgs globalFlags = do
unless (null extraArgs) $
die $ "'update' doesn't take any extra arguments: " ++ unwords extraArgs
let verbosity = fromFlag verbosityFlag
(_useSandbox, config) <- loadConfigOrSandboxConfig verbosity
... | 610 | updateAction :: Flag Verbosity -> [String] -> Action
updateAction verbosityFlag extraArgs globalFlags = do
unless (null extraArgs) $
die $ "'update' doesn't take any extra arguments: " ++ unwords extraArgs
let verbosity = fromFlag verbosityFlag
(_useSandbox, config) <- loadConfigOrSandboxConfig verbosity
... | 610 | updateAction verbosityFlag extraArgs globalFlags = do
unless (null extraArgs) $
die $ "'update' doesn't take any extra arguments: " ++ unwords extraArgs
let verbosity = fromFlag verbosityFlag
(_useSandbox, config) <- loadConfigOrSandboxConfig verbosity
(globalFlags { globalRequireSa... | 557 | false | true | 0 | 12 | 108 | 161 | 77 | 84 | null | null |
esmolanka/haddock | haddock-api/src/Haddock/Backends/LaTeX.hs | bsd-2-clause | --------------------------------------------------------------------------------
-- * Type applications
--------------------------------------------------------------------------------
-- | Print an application of a DocName and two lists of HsTypes (kinds, types)
ppAppNameTypes :: DocName -> [HsType DocName] -> [HsTy... | 432 | ppAppNameTypes :: DocName -> [HsType DocName] -> [HsType DocName] -> Bool -> LaTeX
ppAppNameTypes n ks ts unicode = ppTypeApp n ks ts ppDocName (ppParendType unicode) | 166 | ppAppNameTypes n ks ts unicode = ppTypeApp n ks ts ppDocName (ppParendType unicode) | 83 | true | true | 0 | 9 | 48 | 69 | 36 | 33 | null | null |
acowley/ghc | compiler/coreSyn/CoreUtils.hs | bsd-3-clause | -- Is an application of this function to n *value* args
-- always cheap, assuming the arguments are cheap?
-- Mainly true of partial applications, data constructors,
-- and of course true if the number of args is zero
isCheapApp :: CheapAppFun
isCheapApp fn n_val_args
= isDataConWorkId fn
|| n_val_args == 0... | 349 | isCheapApp :: CheapAppFun
isCheapApp fn n_val_args
= isDataConWorkId fn
|| n_val_args == 0
|| n_val_args < idArity fn | 124 | isCheapApp fn n_val_args
= isDataConWorkId fn
|| n_val_args == 0
|| n_val_args < idArity fn | 98 | true | true | 3 | 5 | 70 | 45 | 23 | 22 | null | null |
tjakway/ghcjvm | compiler/typecheck/TcType.hs | bsd-3-clause | isFskTyVar tv
= ASSERT2( isTcTyVar tv, ppr tv )
case tcTyVarDetails tv of
FlatSkol {} -> True
_ -> False | 136 | isFskTyVar tv
= ASSERT2( isTcTyVar tv, ppr tv )
case tcTyVarDetails tv of
FlatSkol {} -> True
_ -> False | 136 | isFskTyVar tv
= ASSERT2( isTcTyVar tv, ppr tv )
case tcTyVarDetails tv of
FlatSkol {} -> True
_ -> False | 136 | false | false | 0 | 9 | 51 | 49 | 23 | 26 | null | null |
tomjaguarpaw/postgresql-simple | tools/StringsQQ.hs | bsd-3-clause | longstringExp ('\n':xs) = stringE xs | 36 | longstringExp ('\n':xs) = stringE xs | 36 | longstringExp ('\n':xs) = stringE xs | 36 | false | false | 0 | 7 | 4 | 19 | 9 | 10 | null | null |
bitemyapp/persistent | persistent-mongoDB/Database/Persist/MongoDB.hs | mit | collectionNameFromKey :: (PersistEntity record, PersistEntityBackend record ~ DB.MongoContext)
=> Key record -> Text
collectionNameFromKey = collectionName . recordTypeFromKey | 197 | collectionNameFromKey :: (PersistEntity record, PersistEntityBackend record ~ DB.MongoContext)
=> Key record -> Text
collectionNameFromKey = collectionName . recordTypeFromKey | 197 | collectionNameFromKey = collectionName . recordTypeFromKey | 58 | false | true | 0 | 9 | 39 | 51 | 23 | 28 | null | null |
SavinaRoja/SavinaRoja.github.io | assets/centraldogma.hs | mit | -- Serine
geneticCode "AUA" = 'I' | 33 | geneticCode "AUA" = 'I' | 23 | geneticCode "AUA" = 'I' | 23 | true | false | 0 | 5 | 5 | 10 | 5 | 5 | null | null |
danidiaz/Haskell-Foldl-Library | src/Control/Foldl.hs | bsd-3-clause | {-| Generalize a `Fold` to a `FoldM`
> generalize (pure r) = pure r
>
> generalize (f <*> x) = generalize f <*> generalize x
-}
generalize :: Monad m => Fold a b -> FoldM m a b
generalize (Fold step begin done) = FoldM step' begin' done'
where
step' x a = return (step x a)
begin' = return begin
done'... | 343 | generalize :: Monad m => Fold a b -> FoldM m a b
generalize (Fold step begin done) = FoldM step' begin' done'
where
step' x a = return (step x a)
begin' = return begin
done' x = return (done x)
| 214 | generalize (Fold step begin done) = FoldM step' begin' done'
where
step' x a = return (step x a)
begin' = return begin
done' x = return (done x)
| 165 | true | true | 0 | 7 | 90 | 104 | 49 | 55 | null | null |
ulricha/dsh | src/Database/DSH/Tests/CombinatorTests.hs | bsd-3-clause | prop_map_eq :: (BackendVector b, VectorLang v) => (Integer, [Integer]) -> DSHProperty (v TExpr TExpr) b
prop_map_eq = makePropEq (\x -> Q.map (Q.fst x Q.==) $ Q.snd x) (\(x,xs) -> map (x ==) xs) | 194 | prop_map_eq :: (BackendVector b, VectorLang v) => (Integer, [Integer]) -> DSHProperty (v TExpr TExpr) b
prop_map_eq = makePropEq (\x -> Q.map (Q.fst x Q.==) $ Q.snd x) (\(x,xs) -> map (x ==) xs) | 194 | prop_map_eq = makePropEq (\x -> Q.map (Q.fst x Q.==) $ Q.snd x) (\(x,xs) -> map (x ==) xs) | 90 | false | true | 0 | 12 | 32 | 118 | 62 | 56 | null | null |
mariefarrell/Hets | Comorphisms/ExtModal2HasCASL.hs | gpl-2.0 | worldTy :: Type
worldTy = toType world | 38 | worldTy :: Type
worldTy = toType world | 38 | worldTy = toType world | 22 | false | true | 0 | 5 | 6 | 14 | 7 | 7 | null | null |
jsavatgy/xroads-game | code/io-segs.hs | gpl-2.0 | dirHalves = map
(\(a,b) -> b + 0.5*a)
(zip dirBetween (pairwise (\a b -> a) dirAngles)) | 93 | dirHalves = map
(\(a,b) -> b + 0.5*a)
(zip dirBetween (pairwise (\a b -> a) dirAngles)) | 93 | dirHalves = map
(\(a,b) -> b + 0.5*a)
(zip dirBetween (pairwise (\a b -> a) dirAngles)) | 93 | false | false | 0 | 10 | 21 | 60 | 32 | 28 | null | null |
JacksonGariety/euler.hs | 024.hs | bsd-3-clause | permutations' xs n = x : permutations' (delete x xs) (snd y)
where m = factorial $ length xs - 1
y = quotRem n m
x = xs !! (fst y) | 148 | permutations' xs n = x : permutations' (delete x xs) (snd y)
where m = factorial $ length xs - 1
y = quotRem n m
x = xs !! (fst y) | 148 | permutations' xs n = x : permutations' (delete x xs) (snd y)
where m = factorial $ length xs - 1
y = quotRem n m
x = xs !! (fst y) | 148 | false | false | 5 | 8 | 49 | 90 | 38 | 52 | null | null |
djeik/goto | libgoto/Language/Cpp/Compile.hs | mit | compileUnaryOp :: UnaryOp a -> Compiler Doc
compileUnaryOp un = pure $ case un of
BitwiseNot -> text "~"
_ -> pretty un | 127 | compileUnaryOp :: UnaryOp a -> Compiler Doc
compileUnaryOp un = pure $ case un of
BitwiseNot -> text "~"
_ -> pretty un | 127 | compileUnaryOp un = pure $ case un of
BitwiseNot -> text "~"
_ -> pretty un | 83 | false | true | 0 | 9 | 30 | 54 | 24 | 30 | null | null |
treeowl/GADTSeq | Data/Sequence.hs | bsd-3-clause | appendTree3 :: FingerTree (S n) a -> Tree23 (S n) a -> Tree23 (S n) a -> Tree23 (S n) a -> FingerTree (S n) a -> FingerTree (S n) a
appendTree3 Empty a b c xs =
a `consTree` b `consTree` c `consTree` xs | 206 | appendTree3 :: FingerTree (S n) a -> Tree23 (S n) a -> Tree23 (S n) a -> Tree23 (S n) a -> FingerTree (S n) a -> FingerTree (S n) a
appendTree3 Empty a b c xs =
a `consTree` b `consTree` c `consTree` xs | 206 | appendTree3 Empty a b c xs =
a `consTree` b `consTree` c `consTree` xs | 74 | false | true | 0 | 12 | 48 | 126 | 63 | 63 | null | null |
robdockins/edison | edison-core/src/Data/Edison/Assoc/TernaryTrie.hs | mit | maxElemFMB (I _ _ _ _ _ r) = maxElemFMB r | 54 | maxElemFMB (I _ _ _ _ _ r) = maxElemFMB r | 54 | maxElemFMB (I _ _ _ _ _ r) = maxElemFMB r | 54 | false | false | 0 | 7 | 23 | 28 | 13 | 15 | null | null |
stevedonnelly/haskell | code/Geometry/Line.hs | mit | setPoint0 = setFirst2 | 21 | setPoint0 = setFirst2 | 21 | setPoint0 = setFirst2 | 21 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
jvilar/hrows | lib/Model/Field.hs | gpl-2.0 | doConvert (ADouble d _) TypeInt0 = AnInt i $ showt i
where i = truncate d | 108 | doConvert (ADouble d _) TypeInt0 = AnInt i $ showt i
where i = truncate d | 108 | doConvert (ADouble d _) TypeInt0 = AnInt i $ showt i
where i = truncate d | 108 | false | false | 0 | 7 | 50 | 39 | 18 | 21 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.