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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Fuuzetsu/yi-emacs-colours | src/Yi/Style/EmacsColours.hs | gpl-2.0 | -- | Names: @["RoyalBlue","royal blue"]@
--
-- R65 G105 B225, 0x4169e1
royalBlue :: Color
royalBlue = RGB 65 105 225 | 116 | royalBlue :: Color
royalBlue = RGB 65 105 225 | 45 | royalBlue = RGB 65 105 225 | 26 | true | true | 0 | 6 | 19 | 27 | 13 | 14 | null | null |
duplode/threepenny-gui | src/Graphics/UI/Threepenny/SVG/Attributes.hs | bsd-3-clause | color = strAttr "color" | 47 | color = strAttr "color" | 47 | color = strAttr "color" | 47 | false | false | 1 | 5 | 27 | 12 | 4 | 8 | null | null |
prannayk/conj | Judge/judge.hs | gpl-3.0 | checkEmpty :: [(T.Text,T.Text)] -> Bool
checkEmpty [] = True | 60 | checkEmpty :: [(T.Text,T.Text)] -> Bool
checkEmpty [] = True | 60 | checkEmpty [] = True | 20 | false | true | 0 | 8 | 8 | 33 | 18 | 15 | null | null |
codygman/hs-scrape | src/Network/Scraper/State.hs | mit | isDisplayed :: Cursor -> Bool
isDisplayed el = all (== False) $
[ hasDisplayNone el
, hasHide el
, anyParentIsHidden el -- this was hiding inputs on the paypal billing form
] | 242 | isDisplayed :: Cursor -> Bool
isDisplayed el = all (== False) $
[ hasDisplayNone el
, hasHide el
, anyParentIsHidden el -- this was hiding inputs on the paypal billing form
] | 242 | isDisplayed el = all (== False) $
[ hasDisplayNone el
, hasHide el
, anyParentIsHidden el -- this was hiding inputs on the paypal billing form
] | 212 | false | true | 0 | 7 | 99 | 48 | 25 | 23 | null | null |
kajigor/uKanren_transformations | app/console/EvalApp.hs | bsd-3-clause | main' :: IO ()
main' =
do
print (toplevel 1 bool (Program nando $ fresh ["q"] (call "nando" [falso, falso, V "q"])))
print (toplevel 1 bool (Program nando $ fresh ["q"] (call "nando" [V "q", V "q", V "q"])))
print (toplevel 1 show (Program nando $ fresh ["q", "p", "r"] (V "q" === C "pair" [V "p", V "r"] &... | 3,089 | main' :: IO ()
main' =
do
print (toplevel 1 bool (Program nando $ fresh ["q"] (call "nando" [falso, falso, V "q"])))
print (toplevel 1 bool (Program nando $ fresh ["q"] (call "nando" [V "q", V "q", V "q"])))
print (toplevel 1 show (Program nando $ fresh ["q", "p", "r"] (V "q" === C "pair" [V "p", V "r"] &... | 3,089 | main' =
do
print (toplevel 1 bool (Program nando $ fresh ["q"] (call "nando" [falso, falso, V "q"])))
print (toplevel 1 bool (Program nando $ fresh ["q"] (call "nando" [V "q", V "q", V "q"])))
print (toplevel 1 show (Program nando $ fresh ["q", "p", "r"] (V "q" === C "pair" [V "p", V "r"] &&& call "nando"... | 3,074 | false | true | 1 | 22 | 704 | 1,872 | 915 | 957 | null | null |
aisamanra/matterhorn | src/Types/Messages.hs | bsd-3-clause | validUserMessage :: Message -> Bool
validUserMessage m =
not (m^.mDeleted) && case m^.mMessageId of
Just (MessagePostId _) -> True
_ -> False | 161 | validUserMessage :: Message -> Bool
validUserMessage m =
not (m^.mDeleted) && case m^.mMessageId of
Just (MessagePostId _) -> True
_ -> False | 161 | validUserMessage m =
not (m^.mDeleted) && case m^.mMessageId of
Just (MessagePostId _) -> True
_ -> False | 125 | false | true | 3 | 7 | 41 | 59 | 30 | 29 | null | null |
alephcloud/bayhac2014 | src/Server.hs | mit | main ∷ IO ()
main = server | 26 | main ∷ IO ()
main = server | 26 | main = server | 13 | false | true | 1 | 6 | 6 | 20 | 8 | 12 | null | null |
christiaanb/DepCore | Test.hs | bsd-2-clause | force _ _ = throwError "force: Box expected" | 61 | force _ _ = throwError "force: Box expected" | 61 | force _ _ = throwError "force: Box expected" | 61 | false | false | 1 | 5 | 24 | 14 | 6 | 8 | null | null |
avieth/diplomacy | Diplomacy/Game.hs | bsd-3-clause | gameZonedOrders
:: Game round RoundUnresolved
-> M.Map Zone (Aligned Unit, SomeOrderObject (RoundPhase round))
gameZonedOrders game = case game of
TypicalGame TypicalRoundOne _ _ x _ -> x
TypicalGame TypicalRoundTwo _ _ x _ -> x
RetreatGame RetreatRoundOne _ _ _ x _ _ -> x
RetreatGame RetreatRou... | 382 | gameZonedOrders
:: Game round RoundUnresolved
-> M.Map Zone (Aligned Unit, SomeOrderObject (RoundPhase round))
gameZonedOrders game = case game of
TypicalGame TypicalRoundOne _ _ x _ -> x
TypicalGame TypicalRoundTwo _ _ x _ -> x
RetreatGame RetreatRoundOne _ _ _ x _ _ -> x
RetreatGame RetreatRou... | 382 | gameZonedOrders game = case game of
TypicalGame TypicalRoundOne _ _ x _ -> x
TypicalGame TypicalRoundTwo _ _ x _ -> x
RetreatGame RetreatRoundOne _ _ _ x _ _ -> x
RetreatGame RetreatRoundTwo _ _ _ x _ _ -> x
AdjustGame AdjustRound _ _ x _ -> x | 263 | false | true | 6 | 11 | 90 | 145 | 70 | 75 | null | null |
uduki/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | qCastList_QGraphicsSceneWheelEvent x = qcl_QGraphicsSceneWheelEvent [] x | 72 | qCastList_QGraphicsSceneWheelEvent x = qcl_QGraphicsSceneWheelEvent [] x | 72 | qCastList_QGraphicsSceneWheelEvent x = qcl_QGraphicsSceneWheelEvent [] x | 72 | false | false | 0 | 6 | 5 | 16 | 7 | 9 | null | null |
tehgeekmeister/apters-web | config/Settings.hs | agpl-3.0 | runConnectionPool :: MonadControlIO m => SqlPersist m a -> ConnectionPool -> m a
runConnectionPool = runSqlPool | 111 | runConnectionPool :: MonadControlIO m => SqlPersist m a -> ConnectionPool -> m a
runConnectionPool = runSqlPool | 111 | runConnectionPool = runSqlPool | 30 | false | true | 0 | 8 | 15 | 34 | 16 | 18 | null | null |
brendanhay/gogol | gogol-vision/gen/Network/Google/Vision/Types/Product.hs | mpl-2.0 | -- | Confidence of the OCR results for the symbol. Range [0, 1].
gcvvs1Confidence :: Lens' GoogleCloudVisionV1p3beta1Symbol (Maybe Double)
gcvvs1Confidence
= lens _gcvvs1Confidence
(\ s a -> s{_gcvvs1Confidence = a})
. mapping _Coerce | 248 | gcvvs1Confidence :: Lens' GoogleCloudVisionV1p3beta1Symbol (Maybe Double)
gcvvs1Confidence
= lens _gcvvs1Confidence
(\ s a -> s{_gcvvs1Confidence = a})
. mapping _Coerce | 183 | gcvvs1Confidence
= lens _gcvvs1Confidence
(\ s a -> s{_gcvvs1Confidence = a})
. mapping _Coerce | 109 | true | true | 2 | 8 | 46 | 59 | 28 | 31 | null | null |
prowdsponsor/country-codes | src/Data/CountryCodes/ISO31661.hs | bsd-3-clause | fromMName "Netherlands" = Just NL | 33 | fromMName "Netherlands" = Just NL | 33 | fromMName "Netherlands" = Just NL | 33 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
mbixby/RPN.hs | rpn.hs | gpl-3.0 | operator Div = (/) | 19 | operator Div = (/) | 19 | operator Div = (/) | 19 | false | false | 1 | 5 | 4 | 15 | 6 | 9 | null | null |
oakfang/DemiLang | src/Demi/Lexer.hs | mit | -- parses an operator
parens = Token.parens lexer | 61 | parens = Token.parens lexer | 39 | parens = Token.parens lexer | 39 | true | false | 0 | 6 | 19 | 12 | 6 | 6 | null | null |
FranklinChen/Idris-dev | src/Idris/DataOpts.hs | bsd-3-clause | prel = [txt "Nat", txt "Prelude"] | 33 | prel = [txt "Nat", txt "Prelude"] | 33 | prel = [txt "Nat", txt "Prelude"] | 33 | false | false | 1 | 7 | 5 | 22 | 9 | 13 | null | null |
supermario/hilt | src/Hilt/Handles/Logger.hs | bsd-3-clause | warning = (`log` Warning) | 25 | warning = (`log` Warning) | 25 | warning = (`log` Warning) | 25 | false | false | 1 | 6 | 3 | 16 | 8 | 8 | null | null |
fpco/cabal | cabal-install/Distribution/Client/Dependency.hs | bsd-3-clause | hideInstalledPackagesAllVersions :: [PackageName]
-> DepResolverParams -> DepResolverParams
hideInstalledPackagesAllVersions pkgnames params =
--TODO: this should work using exclude constraints instead
params {
depResolverInstalledPkgIndex =
foldl' (flip InstalledP... | 418 | hideInstalledPackagesAllVersions :: [PackageName]
-> DepResolverParams -> DepResolverParams
hideInstalledPackagesAllVersions pkgnames params =
--TODO: this should work using exclude constraints instead
params {
depResolverInstalledPkgIndex =
foldl' (flip InstalledP... | 418 | hideInstalledPackagesAllVersions pkgnames params =
--TODO: this should work using exclude constraints instead
params {
depResolverInstalledPkgIndex =
foldl' (flip InstalledPackageIndex.deletePackageName)
(depResolverInstalledPkgIndex params) pkgnames
} | 293 | false | true | 0 | 10 | 103 | 57 | 30 | 27 | null | null |
jesboat/173tourney | server-src/FinalRound.hs | bsd-3-clause | main = do
args <- getArgs
let (opts,cmds,errs) = getOpt Permute options args
opts <- return $ L.sort opts
unless (null errs) $ fail $ concat $ L.intersperse "\n" (map show errs)
checkHelp opts
case cmds of
[asgnId,solutionName] -> do
students <- getSubdirectories "."
runFinalRound students (... | 507 | main = do
args <- getArgs
let (opts,cmds,errs) = getOpt Permute options args
opts <- return $ L.sort opts
unless (null errs) $ fail $ concat $ L.intersperse "\n" (map show errs)
checkHelp opts
case cmds of
[asgnId,solutionName] -> do
students <- getSubdirectories "."
runFinalRound students (... | 507 | main = do
args <- getArgs
let (opts,cmds,errs) = getOpt Permute options args
opts <- return $ L.sort opts
unless (null errs) $ fail $ concat $ L.intersperse "\n" (map show errs)
checkHelp opts
case cmds of
[asgnId,solutionName] -> do
students <- getSubdirectories "."
runFinalRound students (... | 507 | false | false | 1 | 15 | 104 | 207 | 95 | 112 | null | null |
pascalpoizat/veca-haskell | src/Examples/Rover/Model.hs | apache-2.0 | m1s :: Message
m1s = mkMessage "m1s" "{url:String,file:File}" | 61 | m1s :: Message
m1s = mkMessage "m1s" "{url:String,file:File}" | 61 | m1s = mkMessage "m1s" "{url:String,file:File}" | 46 | false | true | 0 | 5 | 7 | 16 | 8 | 8 | null | null |
databrary/databrary | src/Action/Servant.hs | agpl-3.0 | -- | Create a server to serve the ServantAPI.
servantServer :: ActionRouteApp -> Server ServantAPI
servantServer (ActionRouteApp app) = preferAngularServer :<|> Tagged app | 171 | servantServer :: ActionRouteApp -> Server ServantAPI
servantServer (ActionRouteApp app) = preferAngularServer :<|> Tagged app | 125 | servantServer (ActionRouteApp app) = preferAngularServer :<|> Tagged app | 72 | true | true | 0 | 6 | 22 | 39 | 18 | 21 | null | null |
gsdlab/clafer | src/Language/ClaferT.hs | mit | -- Different line
minusPos :: Pos -> Pos -> Pos
minusPos (Pos l c) (Pos 1 d) = Pos l (c - d + 1) | 96 | minusPos :: Pos -> Pos -> Pos
minusPos (Pos l c) (Pos 1 d) = Pos l (c - d + 1) | 78 | minusPos (Pos l c) (Pos 1 d) = Pos l (c - d + 1) | 48 | true | true | 0 | 10 | 24 | 62 | 30 | 32 | null | null |
ckaestne/CIDE | other/CaseStudies/Arith/orig_armin/ite/Arith.hs | gpl-3.0 | tvBinOp Add (TVDouble x) (TVDouble y) = Result (TVDouble (x+y)) | 63 | tvBinOp Add (TVDouble x) (TVDouble y) = Result (TVDouble (x+y)) | 63 | tvBinOp Add (TVDouble x) (TVDouble y) = Result (TVDouble (x+y)) | 63 | false | false | 0 | 9 | 9 | 41 | 20 | 21 | null | null |
grwlf/vsim | src_r/VSim/Runtime/Time.hs | gpl-3.0 | -- | Move the time after upperBound check
move_time :: NextTime -> NextTime -> Maybe Time
move_time nt@(NextTime t) maxt
| nt >= maxt = Nothing
| otherwise = Just (Time t) | 183 | move_time :: NextTime -> NextTime -> Maybe Time
move_time nt@(NextTime t) maxt
| nt >= maxt = Nothing
| otherwise = Just (Time t) | 139 | move_time nt@(NextTime t) maxt
| nt >= maxt = Nothing
| otherwise = Just (Time t) | 91 | true | true | 0 | 8 | 43 | 65 | 31 | 34 | null | null |
beni55/ghcjs | src/Gen2/Prim.hs | mit | genPrim _ _ IntNeOp [r] [x,y] = PrimInline [j| `r` = (`x` !== `y`) ? 1 : 0 |] | 87 | genPrim _ _ IntNeOp [r] [x,y] = PrimInline [j| `r` = (`x` !== `y`) ? 1 : 0 |] | 87 | genPrim _ _ IntNeOp [r] [x,y] = PrimInline [j| `r` = (`x` !== `y`) ? 1 : 0 |] | 87 | false | false | 0 | 6 | 28 | 33 | 19 | 14 | null | null |
gilith/hol | src/HOL/OpenTheory/Package.hs | mit | appendInfo :: Info -> Info -> Info
appendInfo (Info l) (Info l') = Info (l ++ l') | 81 | appendInfo :: Info -> Info -> Info
appendInfo (Info l) (Info l') = Info (l ++ l') | 81 | appendInfo (Info l) (Info l') = Info (l ++ l') | 46 | false | true | 0 | 7 | 16 | 46 | 23 | 23 | null | null |
urbanslug/ghc | compiler/basicTypes/Name.hs | bsd-3-clause | wiredInNameTyThing_maybe _ = Nothing | 70 | wiredInNameTyThing_maybe _ = Nothing | 70 | wiredInNameTyThing_maybe _ = Nothing | 70 | false | false | 0 | 4 | 37 | 10 | 4 | 6 | null | null |
alephcloud/hs-aws-kinesis-client | src/Aws/Kinesis/Client/Common.hs | apache-2.0 | -- | A lens for '_kkConfiguration'.
--
kkConfiguration ∷ Lens' KinesisKit Aws.Configuration
kkConfiguration = lens _kkConfiguration $ \kk cfg → kk { _kkConfiguration = cfg } | 173 | kkConfiguration ∷ Lens' KinesisKit Aws.Configuration
kkConfiguration = lens _kkConfiguration $ \kk cfg → kk { _kkConfiguration = cfg } | 134 | kkConfiguration = lens _kkConfiguration $ \kk cfg → kk { _kkConfiguration = cfg } | 81 | true | true | 0 | 8 | 25 | 42 | 23 | 19 | null | null |
kawu/earley-facile | src/NLP/EarleyFacile/GrammarParser.hs | bsd-2-clause | trim :: String -> String
trim = f . f
where f = reverse . dropWhile C.isSpace | 82 | trim :: String -> String
trim = f . f
where f = reverse . dropWhile C.isSpace | 82 | trim = f . f
where f = reverse . dropWhile C.isSpace | 57 | false | true | 0 | 7 | 21 | 42 | 19 | 23 | null | null |
sol/aeson | Data/Aeson/TH.hs | bsd-3-clause | -- | Fully applies a type constructor to its type variables.
applyTyCon :: Name -> [Type] -> Type
applyTyCon = foldl' AppT . ConT | 129 | applyTyCon :: Name -> [Type] -> Type
applyTyCon = foldl' AppT . ConT | 68 | applyTyCon = foldl' AppT . ConT | 31 | true | true | 0 | 7 | 23 | 30 | 16 | 14 | null | null |
hkupty/aura | src/Aura/Pkgbuild/Editing.hs | gpl-3.0 | customizepkg' :: Buildable -> Aura Buildable
customizepkg' p = withTempDir "customizepkg" $ do
let conf = customizepkgPath </> baseNameOf p
ifFile (edit $ const customize) nothing conf p | 190 | customizepkg' :: Buildable -> Aura Buildable
customizepkg' p = withTempDir "customizepkg" $ do
let conf = customizepkgPath </> baseNameOf p
ifFile (edit $ const customize) nothing conf p | 190 | customizepkg' p = withTempDir "customizepkg" $ do
let conf = customizepkgPath </> baseNameOf p
ifFile (edit $ const customize) nothing conf p | 145 | false | true | 0 | 13 | 31 | 71 | 31 | 40 | null | null |
hbasold/Sandbox | OTTTests/DecideExamples.hs | mit | funkyDefs :: Defs
funkyDefs = fromList [
("funky", (stream nat,
GfpAbs (out $ prj R (Sym "f" (Prod nat (stream nat))))
)
),
("f", (Prod nat $ stream nat,
ProdAbs
(repNat 0)
(prj... | 420 | funkyDefs :: Defs
funkyDefs = fromList [
("funky", (stream nat,
GfpAbs (out $ prj R (Sym "f" (Prod nat (stream nat))))
)
),
("f", (Prod nat $ stream nat,
ProdAbs
(repNat 0)
(prj... | 420 | funkyDefs = fromList [
("funky", (stream nat,
GfpAbs (out $ prj R (Sym "f" (Prod nat (stream nat))))
)
),
("f", (Prod nat $ stream nat,
ProdAbs
(repNat 0)
(prj R $ out $ prj R $... | 402 | false | true | 0 | 18 | 234 | 145 | 74 | 71 | null | null |
tcsavage/gravitysim | src/Main.hs | mit | main :: IO ()
main = do
opts <- parseArgs <$> getArgs
initModel <- evalRandIO $ initialize opts
let display = InWindow "Galaxy" (width, height) (10,10)
simulate display (greyN 0.1) 30 initModel render process | 224 | main :: IO ()
main = do
opts <- parseArgs <$> getArgs
initModel <- evalRandIO $ initialize opts
let display = InWindow "Galaxy" (width, height) (10,10)
simulate display (greyN 0.1) 30 initModel render process | 224 | main = do
opts <- parseArgs <$> getArgs
initModel <- evalRandIO $ initialize opts
let display = InWindow "Galaxy" (width, height) (10,10)
simulate display (greyN 0.1) 30 initModel render process | 210 | false | true | 0 | 11 | 49 | 91 | 44 | 47 | null | null |
KommuSoft/dep-software | Dep.Ui.Utils.hs | gpl-3.0 | picaW _ 3 = '\x253c' | 20 | picaW _ 3 = '\x253c' | 20 | picaW _ 3 = '\x253c' | 20 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
propella/prolog | Prolog.hs | mit | struct = atom >>= \name -> arguments >>= \ls -> return (Struct name ls) | 71 | struct = atom >>= \name -> arguments >>= \ls -> return (Struct name ls) | 71 | struct = atom >>= \name -> arguments >>= \ls -> return (Struct name ls) | 71 | false | false | 0 | 11 | 13 | 35 | 18 | 17 | null | null |
bkoropoff/Idris-dev | src/Idris/Core/TT.hs | bsd-3-clause | substV :: TT n -> TT n -> TT n
substV x tm = dropV 0 (instantiate x tm) where
dropV i (P nt x ty) = P nt x (dropV i ty)
dropV i (V x) | x > i = V (x - 1)
| otherwise = V x
dropV i (Bind x b sc) = Bind x (fmap (dropV i) b) (dropV (i+1) sc)
dropV i (App s f a) = App s (dropV i f) (dropV ... | 505 | substV :: TT n -> TT n -> TT n
substV x tm = dropV 0 (instantiate x tm) where
dropV i (P nt x ty) = P nt x (dropV i ty)
dropV i (V x) | x > i = V (x - 1)
| otherwise = V x
dropV i (Bind x b sc) = Bind x (fmap (dropV i) b) (dropV (i+1) sc)
dropV i (App s f a) = App s (dropV i f) (dropV ... | 505 | substV x tm = dropV 0 (instantiate x tm) where
dropV i (P nt x ty) = P nt x (dropV i ty)
dropV i (V x) | x > i = V (x - 1)
| otherwise = V x
dropV i (Bind x b sc) = Bind x (fmap (dropV i) b) (dropV (i+1) sc)
dropV i (App s f a) = App s (dropV i f) (dropV i a)
dropV i (Proj x idx) =... | 474 | false | true | 2 | 9 | 161 | 292 | 133 | 159 | null | null |
ggreif/clash-compiler | clash-lib/src/CLaSH/Core/TysPrim.hs | bsd-2-clause | voidPrimTy = mkTyConTy voidPrimTyConName | 43 | voidPrimTy = mkTyConTy voidPrimTyConName | 43 | voidPrimTy = mkTyConTy voidPrimTyConName | 43 | false | false | 0 | 5 | 6 | 9 | 4 | 5 | null | null |
rrnewton/accelerate | Data/Array/Accelerate/Pretty/Print.hs | bsd-3-clause | prettyPrim (PrimQuotRem _) = (False, text "quotRem") | 59 | prettyPrim (PrimQuotRem _) = (False, text "quotRem") | 59 | prettyPrim (PrimQuotRem _) = (False, text "quotRem") | 59 | false | false | 0 | 7 | 13 | 24 | 12 | 12 | null | null |
hazel-el/hazel | Hazel/Parser/OWL/Functional.hs | gpl-3.0 | disjointDataProperties :: Parser DataPropertyAxiom
disjointDataProperties = properties' "DisjointDataProperties"
DisjointDataProperties
dataPropertyExpression | 208 | disjointDataProperties :: Parser DataPropertyAxiom
disjointDataProperties = properties' "DisjointDataProperties"
DisjointDataProperties
dataPropertyExpression | 208 | disjointDataProperties = properties' "DisjointDataProperties"
DisjointDataProperties
dataPropertyExpression | 157 | false | true | 0 | 6 | 59 | 29 | 11 | 18 | null | null |
karamellpelle/grid | designer/source/MEnv/Tick/GLFW.hs | gpl-3.0 | -- | get speed of ClockB
tickClockBGetSpeed :: MEnv res Double
tickClockBGetSpeed =
modifyClockB' $ fGetSpeed | 113 | tickClockBGetSpeed :: MEnv res Double
tickClockBGetSpeed =
modifyClockB' $ fGetSpeed | 88 | tickClockBGetSpeed =
modifyClockB' $ fGetSpeed | 50 | true | true | 3 | 5 | 19 | 26 | 11 | 15 | null | null |
sulami/hGM | test/TestImport.hs | bsd-3-clause | getTables :: MonadIO m => ReaderT SqlBackend m [Text]
getTables = do
tables <- rawSql "SELECT name FROM sqlite_master WHERE type = 'table';" []
return (fmap unSingle tables) | 181 | getTables :: MonadIO m => ReaderT SqlBackend m [Text]
getTables = do
tables <- rawSql "SELECT name FROM sqlite_master WHERE type = 'table';" []
return (fmap unSingle tables) | 181 | getTables = do
tables <- rawSql "SELECT name FROM sqlite_master WHERE type = 'table';" []
return (fmap unSingle tables) | 127 | false | true | 0 | 9 | 35 | 56 | 26 | 30 | null | null |
jeffreyrosenbluth/NYC-meetup | meetup/Arrows1.hs | mit | example1 :: Diagram B
example1 = draw arrow1 # scale (2/3.45) <> (circle 1 # showOrigin ||| square 2 # showOrigin) | 114 | example1 :: Diagram B
example1 = draw arrow1 # scale (2/3.45) <> (circle 1 # showOrigin ||| square 2 # showOrigin) | 114 | example1 = draw arrow1 # scale (2/3.45) <> (circle 1 # showOrigin ||| square 2 # showOrigin) | 92 | false | true | 1 | 11 | 20 | 60 | 27 | 33 | null | null |
dasuxullebt/inflate.hs | inflate.runST.hs | gpl-3.0 | -- data OutChars a = Nil | Cons a (OutChars (a,a)) | Cons2 a a (OutChars (a,a))
emptyOutChars :: [a]
emptyOutChars = [] | 120 | emptyOutChars :: [a]
emptyOutChars = [] | 39 | emptyOutChars = [] | 18 | true | true | 0 | 7 | 23 | 24 | 11 | 13 | null | null |
input-output-hk/pos-haskell-prototype | util/src/Pos/Util/Log/Internal.hs | mit | registerBackends :: Text -> LoggingHandler -> [(T.Text, K.Scribe)] -> IO ()
registerBackends cfoKey lh scribes = do
LoggingHandlerInternal cfg _ ctx counter <- takeMVar (getLSI lh)
le0 <- K.initLogEnv (s2kname "cardano-sl") $ fromString $ (T.unpack cfoKey) <> ":" <> showVersion version
-- use 'getCurrentTim... | 1,113 | registerBackends :: Text -> LoggingHandler -> [(T.Text, K.Scribe)] -> IO ()
registerBackends cfoKey lh scribes = do
LoggingHandlerInternal cfg _ ctx counter <- takeMVar (getLSI lh)
le0 <- K.initLogEnv (s2kname "cardano-sl") $ fromString $ (T.unpack cfoKey) <> ":" <> showVersion version
-- use 'getCurrentTim... | 1,113 | registerBackends cfoKey lh scribes = do
LoggingHandlerInternal cfg _ ctx counter <- takeMVar (getLSI lh)
le0 <- K.initLogEnv (s2kname "cardano-sl") $ fromString $ (T.unpack cfoKey) <> ":" <> showVersion version
-- use 'getCurrentTime' to get a more precise timestamp
-- as katip uses per default some int... | 1,037 | false | true | 0 | 14 | 265 | 341 | 171 | 170 | null | null |
UBMLtonGroup/timberc | src/Match.hs | bsd-3-clause | matchCons ws ceqs (eq:eqs')
| isConEq eq = matchCons ws (prepConEq eq : ceqs) eqs' | 101 | matchCons ws ceqs (eq:eqs')
| isConEq eq = matchCons ws (prepConEq eq : ceqs) eqs' | 101 | matchCons ws ceqs (eq:eqs')
| isConEq eq = matchCons ws (prepConEq eq : ceqs) eqs' | 101 | false | false | 0 | 9 | 33 | 49 | 21 | 28 | null | null |
yoo-e/yesod-helpers | Yesod/Helpers/Message.hs | bsd-3-clause | renderFormMessageByYHCommonMessage :: [Lang] -> FormMessage -> Text
renderFormMessageByYHCommonMessage [] fm = defaultFormMessage fm | 132 | renderFormMessageByYHCommonMessage :: [Lang] -> FormMessage -> Text
renderFormMessageByYHCommonMessage [] fm = defaultFormMessage fm | 132 | renderFormMessageByYHCommonMessage [] fm = defaultFormMessage fm | 64 | false | true | 0 | 6 | 12 | 32 | 16 | 16 | null | null |
bonnefoa/Shaker | src/Shaker/GhcInterface.hs | isc | configureDynFlagsWithCompileInput :: CompileInput -> DynFlags -> DynFlags
configureDynFlagsWithCompileInput cpIn dflags = dflags{
importPaths = sourceDirs
,objectDir = Just compileTarget
,hiDir = Just compileTarget
}
where compileTarget = compileInputBuildDirectory cpIn
sourceDirs = compileInput... | 358 | configureDynFlagsWithCompileInput :: CompileInput -> DynFlags -> DynFlags
configureDynFlagsWithCompileInput cpIn dflags = dflags{
importPaths = sourceDirs
,objectDir = Just compileTarget
,hiDir = Just compileTarget
}
where compileTarget = compileInputBuildDirectory cpIn
sourceDirs = compileInput... | 358 | configureDynFlagsWithCompileInput cpIn dflags = dflags{
importPaths = sourceDirs
,objectDir = Just compileTarget
,hiDir = Just compileTarget
}
where compileTarget = compileInputBuildDirectory cpIn
sourceDirs = compileInputSourceDirs cpIn
-- * Test discovering | 284 | false | true | 1 | 7 | 61 | 70 | 37 | 33 | null | null |
roberth/uu-helium | src/Helium/Parser/ParseLibrary.hs | gpl-3.0 | brackets = between lexLBRACKET lexRBRACKET | 43 | brackets = between lexLBRACKET lexRBRACKET | 43 | brackets = between lexLBRACKET lexRBRACKET | 43 | false | false | 1 | 5 | 5 | 16 | 5 | 11 | null | null |
siddhanathan/yi | yi-misc-modes/src/Yi/Syntax/Latex.hs | gpl-2.0 | isNoise (Special ' ') = True | 28 | isNoise (Special ' ') = True | 28 | isNoise (Special ' ') = True | 28 | false | false | 0 | 7 | 5 | 15 | 7 | 8 | null | null |
diku-dk/futhark | src/Futhark/CodeGen/ImpGen/Multicore/SegScan.hs | isc | nonsegmentedScan ::
Pat LetDecMem ->
SegSpace ->
[SegBinOp MCMem] ->
KernelBody MCMem ->
TV Int32 ->
MulticoreGen Imp.MCCode
nonsegmentedScan pat space scan_ops kbody nsubtasks = do
emit $ Imp.DebugPrint "nonsegmented segScan" Nothing
collect $ do
scanStage1 pat space scan_ops kbody
let nsubtas... | 557 | nonsegmentedScan ::
Pat LetDecMem ->
SegSpace ->
[SegBinOp MCMem] ->
KernelBody MCMem ->
TV Int32 ->
MulticoreGen Imp.MCCode
nonsegmentedScan pat space scan_ops kbody nsubtasks = do
emit $ Imp.DebugPrint "nonsegmented segScan" Nothing
collect $ do
scanStage1 pat space scan_ops kbody
let nsubtas... | 557 | nonsegmentedScan pat space scan_ops kbody nsubtasks = do
emit $ Imp.DebugPrint "nonsegmented segScan" Nothing
collect $ do
scanStage1 pat space scan_ops kbody
let nsubtasks' = tvExp nsubtasks
sWhen (nsubtasks' .>. 1) $ do
scan_ops2 <- renameSegBinOp scan_ops
scanStage2 pat nsubtasks space s... | 420 | false | true | 0 | 14 | 122 | 170 | 75 | 95 | null | null |
Tuplanolla/eigenlanguage | haskell/Lexer.hs | gpl-3.0 | escape :: Parser String
escape = (\ x y -> [x, y]) <$> char '\\' <*> oneOf "\\\"'0nrt" | 86 | escape :: Parser String
escape = (\ x y -> [x, y]) <$> char '\\' <*> oneOf "\\\"'0nrt" | 86 | escape = (\ x y -> [x, y]) <$> char '\\' <*> oneOf "\\\"'0nrt" | 62 | false | true | 2 | 7 | 17 | 50 | 24 | 26 | null | null |
SneakingCat/fay-ticker | src/JSAPI.hs | gpl-3.0 | -- | Implementation of mapM (should really be part of Fay-Base)
mapM :: (a -> Fay b) -> [a] -> Fay [b]
mapM _ [] = return [] | 124 | mapM :: (a -> Fay b) -> [a] -> Fay [b]
mapM _ [] = return [] | 60 | mapM _ [] = return [] | 21 | true | true | 0 | 8 | 27 | 51 | 26 | 25 | null | null |
jasonzoladz/parconc-examples | parinfer/Substitution.hs | bsd-3-clause | unify (TCon j ts) (TCon k us) s = (j == k) `guardM` unifies ts us s | 74 | unify (TCon j ts) (TCon k us) s = (j == k) `guardM` unifies ts us s | 74 | unify (TCon j ts) (TCon k us) s = (j == k) `guardM` unifies ts us s | 74 | false | false | 1 | 8 | 23 | 52 | 25 | 27 | null | null |
pascal-knodel/haskell-craft | _/links/E'10'27.hs | mit | -- getLine :: Int -> [Word] -> Line
getLine _ [] = [] | 55 | getLine _ [] = [] | 19 | getLine _ [] = [] | 19 | true | false | 0 | 6 | 14 | 20 | 9 | 11 | null | null |
phischu/fragnix | tests/packages/scotty/Network.HTTP.Types.Header.hs | bsd-3-clause | hAcceptRanges = "Accept-Ranges" | 37 | hAcceptRanges = "Accept-Ranges" | 37 | hAcceptRanges = "Accept-Ranges" | 37 | false | false | 1 | 5 | 8 | 10 | 3 | 7 | null | null |
egorich239/playground | haskell/scene-to-json.hs | apache-2.0 | makeColor (r, g, b) = JSArray $ map makeJsInt [r, g, b] | 55 | makeColor (r, g, b) = JSArray $ map makeJsInt [r, g, b] | 55 | makeColor (r, g, b) = JSArray $ map makeJsInt [r, g, b] | 55 | false | false | 0 | 7 | 11 | 37 | 20 | 17 | null | null |
projectorhq/haskell-liquid | test/Text/Liquid/ParserTests.hs | bsd-3-clause | case_endIfClause3 = parseOnly endIfClause "{%endi%}" @?= (Left "string" :: Either String Expr) | 94 | case_endIfClause3 = parseOnly endIfClause "{%endi%}" @?= (Left "string" :: Either String Expr) | 94 | case_endIfClause3 = parseOnly endIfClause "{%endi%}" @?= (Left "string" :: Either String Expr) | 94 | false | false | 1 | 8 | 11 | 34 | 14 | 20 | null | null |
amccausl/Swish | Swish/HaskellRDF/RDFDatatypeXsdIntegerTest.hs | lgpl-2.1 | testRuleFwdDiff01 = testRuleFwd "testRuleFwdDiff01" rulediff diff01inp diff01fwd | 80 | testRuleFwdDiff01 = testRuleFwd "testRuleFwdDiff01" rulediff diff01inp diff01fwd | 80 | testRuleFwdDiff01 = testRuleFwd "testRuleFwdDiff01" rulediff diff01inp diff01fwd | 80 | false | false | 0 | 5 | 6 | 15 | 7 | 8 | null | null |
kawu/concraft | src/NLP/Concraft/DAG/Schema.hs | bsd-2-clause | ------------------------------
-- DAG
------------------------------
-- | Value of the given function with respect to the given sentence and its
-- edge. Return Nothing if the edge is out of bounds.
onEdgeWith :: DAG x a -> (a -> b) -> EdgeID -> Maybe b
onEdgeWith dag f k = f <$> DAG.maybeEdgeLabel k dag | 307 | onEdgeWith :: DAG x a -> (a -> b) -> EdgeID -> Maybe b
onEdgeWith dag f k = f <$> DAG.maybeEdgeLabel k dag | 106 | onEdgeWith dag f k = f <$> DAG.maybeEdgeLabel k dag | 51 | true | true | 2 | 9 | 55 | 66 | 33 | 33 | null | null |
wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110315set5.hs | gpl-3.0 | my_ssetup :: ScriptSetup
my_ssetup = SS {
scriptbase = "/home/wavewave/nfs/workspace/ttbar/mc_script/"
, mg5base = "/home/wavewave/nfs/montecarlo/MG_ME_V4.4.44/MadGraph5_v0_6_1/"
, workbase = "/home/wavewave/nfs//workspace/ttbar/mc/"
} | 250 | my_ssetup :: ScriptSetup
my_ssetup = SS {
scriptbase = "/home/wavewave/nfs/workspace/ttbar/mc_script/"
, mg5base = "/home/wavewave/nfs/montecarlo/MG_ME_V4.4.44/MadGraph5_v0_6_1/"
, workbase = "/home/wavewave/nfs//workspace/ttbar/mc/"
} | 250 | my_ssetup = SS {
scriptbase = "/home/wavewave/nfs/workspace/ttbar/mc_script/"
, mg5base = "/home/wavewave/nfs/montecarlo/MG_ME_V4.4.44/MadGraph5_v0_6_1/"
, workbase = "/home/wavewave/nfs//workspace/ttbar/mc/"
} | 225 | false | true | 0 | 6 | 33 | 31 | 19 | 12 | null | null |
bus000/latex-calculator | src/Interpreter/Internal.hs | bsd-3-clause | interpret (Binomial e1 e2) = do
a <- interpret e1
b <- interpret e2
case (simplify a, simplify b) of
(Whole n, Whole k) -> return $ Whole (n `choose` k)
_ -> Left $ TypeError "Binomial of non whole number" | 234 | interpret (Binomial e1 e2) = do
a <- interpret e1
b <- interpret e2
case (simplify a, simplify b) of
(Whole n, Whole k) -> return $ Whole (n `choose` k)
_ -> Left $ TypeError "Binomial of non whole number" | 234 | interpret (Binomial e1 e2) = do
a <- interpret e1
b <- interpret e2
case (simplify a, simplify b) of
(Whole n, Whole k) -> return $ Whole (n `choose` k)
_ -> Left $ TypeError "Binomial of non whole number" | 234 | false | false | 0 | 13 | 69 | 103 | 49 | 54 | null | null |
phaazon/vector | Data/Vector/Fusion/Stream/Monadic.hs | bsd-3-clause | flatten mk istep (Stream ostep u) = Stream step (Left u)
where
{-# INLINE_INNER step #-}
step (Left t) = do
r <- ostep t
case r of
Yield a t' -> do
s <- mk a
s `s... | 832 | flatten mk istep (Stream ostep u) = Stream step (Left u)
where
{-# INLINE_INNER step #-}
step (Left t) = do
r <- ostep t
case r of
Yield a t' -> do
s <- mk a
s `s... | 832 | flatten mk istep (Stream ostep u) = Stream step (Left u)
where
{-# INLINE_INNER step #-}
step (Left t) = do
r <- ostep t
case r of
Yield a t' -> do
s <- mk a
s `s... | 832 | false | false | 0 | 18 | 478 | 273 | 131 | 142 | null | null |
fboyer/craft3e | Calculator/CalcParseLib.hs | mit | -- Succeeds with value given when the input is empty.
endOfInput :: b -> Parse a b
endOfInput x [] = [(x,[])] | 110 | endOfInput :: b -> Parse a b
endOfInput x [] = [(x,[])] | 55 | endOfInput x [] = [(x,[])] | 26 | true | true | 0 | 8 | 22 | 44 | 22 | 22 | null | null |
aisamanra/matterhorn | src/State/Messages.hs | bsd-3-clause | asyncFetchAttachments :: Post -> MH ()
asyncFetchAttachments p = do
let cId = (p^.postChannelIdL)
pId = (p^.postIdL)
session <- getSession
host <- use (csResources.crConn.cdHostnameL)
F.forM_ (p^.postFileIdsL) $ \fId -> doAsyncWith Normal $ do
info <- MM.mmGetMetadataForFile fId session
let sch... | 835 | asyncFetchAttachments :: Post -> MH ()
asyncFetchAttachments p = do
let cId = (p^.postChannelIdL)
pId = (p^.postIdL)
session <- getSession
host <- use (csResources.crConn.cdHostnameL)
F.forM_ (p^.postFileIdsL) $ \fId -> doAsyncWith Normal $ do
info <- MM.mmGetMetadataForFile fId session
let sch... | 835 | asyncFetchAttachments p = do
let cId = (p^.postChannelIdL)
pId = (p^.postIdL)
session <- getSession
host <- use (csResources.crConn.cdHostnameL)
F.forM_ (p^.postFileIdsL) $ \fId -> doAsyncWith Normal $ do
info <- MM.mmGetMetadataForFile fId session
let scheme = "https://"
attUrl = schem... | 796 | false | true | 0 | 21 | 244 | 280 | 134 | 146 | null | null |
anton-k/sharc-timbre | src/Sharc/Instruments/ViolinPizzicato.hs | bsd-3-clause | note8 :: Note
note8 = Note
(Pitch 311.127 51 "d#4")
9
(Range
(NoteRange
(NoteRangeAmplitude 7467.04 24 0.49)
(NoteRangeHarmonicFreq 1 311.12))
(NoteRange
(NoteRangeAmplitude 622.25 2 15010.0)
(NoteRangeHarmonicFreq 31 9644.93)))
[Harmonic 1... | 1,229 | note8 :: Note
note8 = Note
(Pitch 311.127 51 "d#4")
9
(Range
(NoteRange
(NoteRangeAmplitude 7467.04 24 0.49)
(NoteRangeHarmonicFreq 1 311.12))
(NoteRange
(NoteRangeAmplitude 622.25 2 15010.0)
(NoteRangeHarmonicFreq 31 9644.93)))
[Harmonic 1... | 1,229 | note8 = Note
(Pitch 311.127 51 "d#4")
9
(Range
(NoteRange
(NoteRangeAmplitude 7467.04 24 0.49)
(NoteRangeHarmonicFreq 1 311.12))
(NoteRange
(NoteRangeAmplitude 622.25 2 15010.0)
(NoteRangeHarmonicFreq 31 9644.93)))
[Harmonic 1 0.756 14159.6... | 1,215 | false | true | 0 | 11 | 351 | 470 | 242 | 228 | null | null |
uuhan/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reifyApp ist t [n, tt', t']
| t == reflm "LetTacTy" = do n' <- reifyTTName n
tt'' <- reifyTT tt'
t'' <- reifyTT t'
return $ LetTacTy n' (delab ist tt'') (delab ist t'') | 310 | reifyApp ist t [n, tt', t']
| t == reflm "LetTacTy" = do n' <- reifyTTName n
tt'' <- reifyTT tt'
t'' <- reifyTT t'
return $ LetTacTy n' (delab ist tt'') (delab ist t'') | 310 | reifyApp ist t [n, tt', t']
| t == reflm "LetTacTy" = do n' <- reifyTTName n
tt'' <- reifyTT tt'
t'' <- reifyTT t'
return $ LetTacTy n' (delab ist tt'') (delab ist t'') | 310 | false | false | 0 | 11 | 176 | 95 | 43 | 52 | null | null |
vizietto/kalkulu | src/Kalkulu/Environment.hs | gpl-3.0 | defaultEnvironment :: IO Environment
defaultEnvironment = Environment
<$> newIORef 0 -- symbolNumber
<*> newIORef (Just 4096) -- iteration limit
<*> newIORef (Just 1024) -- recursion limit
<*> newIORef "Global`" -- current context
<*> newIORef ["System`"... | 1,347 | defaultEnvironment :: IO Environment
defaultEnvironment = Environment
<$> newIORef 0 -- symbolNumber
<*> newIORef (Just 4096) -- iteration limit
<*> newIORef (Just 1024) -- recursion limit
<*> newIORef "Global`" -- current context
<*> newIORef ["System`"... | 1,347 | defaultEnvironment = Environment
<$> newIORef 0 -- symbolNumber
<*> newIORef (Just 4096) -- iteration limit
<*> newIORef (Just 1024) -- recursion limit
<*> newIORef "Global`" -- current context
<*> newIORef ["System`", "Global`"] -- context path
<*> ne... | 1,310 | false | true | 31 | 17 | 365 | 390 | 209 | 181 | null | null |
nevrenato/Hets_Fork | OWL2/MS.hs | gpl-2.0 | axToFrame :: Axiom -> Frame
axToFrame (PlainAxiom e fb) = Frame e [fb] | 70 | axToFrame :: Axiom -> Frame
axToFrame (PlainAxiom e fb) = Frame e [fb] | 70 | axToFrame (PlainAxiom e fb) = Frame e [fb] | 42 | false | true | 0 | 9 | 12 | 39 | 18 | 21 | null | null |
mrd/camfort | src/Camfort/Specification/Stencils/InferenceFrontend.hs | apache-2.0 | ixToNeighbour' ivs (F.IxSingle _ _ _ exp) = expToNeighbour ivs exp | 67 | ixToNeighbour' ivs (F.IxSingle _ _ _ exp) = expToNeighbour ivs exp | 67 | ixToNeighbour' ivs (F.IxSingle _ _ _ exp) = expToNeighbour ivs exp | 67 | false | false | 0 | 8 | 11 | 30 | 14 | 16 | null | null |
copton/ocram | ruab/src/Ruab/Test.hs | gpl-2.0 | tests :: Test -- {{{2
tests = testGroup "Ruab" [A.tests, B.tests] | 65 | tests :: Test
tests = testGroup "Ruab" [A.tests, B.tests] | 57 | tests = testGroup "Ruab" [A.tests, B.tests] | 43 | true | true | 0 | 7 | 10 | 27 | 15 | 12 | null | null |
smly/hubigraph | Graphics/Ubigraph.hs | bsd-3-clause | newEdge :: Edge -> Hubigraph EdgeID
newEdge (src,dst) =
do serv <- asks server
liftIO $ remote serv "ubigraph.new_edge" src dst | 138 | newEdge :: Edge -> Hubigraph EdgeID
newEdge (src,dst) =
do serv <- asks server
liftIO $ remote serv "ubigraph.new_edge" src dst | 138 | newEdge (src,dst) =
do serv <- asks server
liftIO $ remote serv "ubigraph.new_edge" src dst | 102 | false | true | 0 | 9 | 31 | 58 | 26 | 32 | null | null |
ARCCN/hcprobe | src/Network/Openflow/StrictPut.hs | bsd-3-clause | putZeros :: Int -> Put
putZeros !i = PutM $ \p -> S.memset p 0 (fromIntegral i) >> return ((), p `plusPtr` i) | 109 | putZeros :: Int -> Put
putZeros !i = PutM $ \p -> S.memset p 0 (fromIntegral i) >> return ((), p `plusPtr` i) | 109 | putZeros !i = PutM $ \p -> S.memset p 0 (fromIntegral i) >> return ((), p `plusPtr` i) | 86 | false | true | 0 | 10 | 22 | 64 | 33 | 31 | null | null |
stevezhee/pec | Language/LLVM/Abs.hs | bsd-3-clause | grmLexFilePath = lexFilePath myLexemes | 38 | grmLexFilePath = lexFilePath myLexemes | 38 | grmLexFilePath = lexFilePath myLexemes | 38 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
cchalmers/lens | src/Control/Lens/Plated.hs | bsd-3-clause | -- | Rewrite recursively over part of a larger structure using a specified 'Setter'.
--
-- @
-- 'rewriteOnOf' :: 'Plated' a => 'Control.Lens.Iso.Iso'' s a -> 'Control.Lens.Iso.Iso'' a a -> (a -> 'Maybe' a) -> s -> s
-- 'rewriteOnOf' :: 'Plated' a => 'Lens'' s a -> 'Lens'' a a -> (a -> 'Maybe' a) -... | 649 | rewriteOnOf :: ASetter s t a a -> ASetter' a a -> (a -> Maybe a) -> s -> t
rewriteOnOf b l = over b . rewriteOf l | 113 | rewriteOnOf b l = over b . rewriteOf l | 38 | true | true | 0 | 10 | 163 | 74 | 39 | 35 | null | null |
svenpanne/Vulkan | RegistryProcessor/src/Registry.hs | bsd-3-clause | xpEnumName :: PU EnumName
xpEnumName = xpWrap (EnumName, unEnumName) xpText | 75 | xpEnumName :: PU EnumName
xpEnumName = xpWrap (EnumName, unEnumName) xpText | 75 | xpEnumName = xpWrap (EnumName, unEnumName) xpText | 49 | false | true | 0 | 6 | 9 | 25 | 13 | 12 | null | null |
jaspervdj/lorem-markdownum | lib/LoremMarkdownum/Gen/Markdown.hs | bsd-3-clause | printMarkdown :: MarkdownConfig -> Markdown -> Print ()
printMarkdown mc blocks = do
sequence_ $ intersperse printNl $ map (printBlock mc) blocks
let links = markdownLinks blocks
when (mcReferenceLinks mc && not (null links)) $ do
printNl
mapM_ (uncurry printLink) links
where
printLink... | 516 | printMarkdown :: MarkdownConfig -> Markdown -> Print ()
printMarkdown mc blocks = do
sequence_ $ intersperse printNl $ map (printBlock mc) blocks
let links = markdownLinks blocks
when (mcReferenceLinks mc && not (null links)) $ do
printNl
mapM_ (uncurry printLink) links
where
printLink... | 516 | printMarkdown mc blocks = do
sequence_ $ intersperse printNl $ map (printBlock mc) blocks
let links = markdownLinks blocks
when (mcReferenceLinks mc && not (null links)) $ do
printNl
mapM_ (uncurry printLink) links
where
printLink str link =
printText "[" >> printSentence mc st... | 460 | false | true | 0 | 13 | 113 | 156 | 70 | 86 | null | null |
jacekszymanski/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxLANGUAGE_DEFAULT :: Int
wxLANGUAGE_DEFAULT = 0 | 48 | wxLANGUAGE_DEFAULT :: Int
wxLANGUAGE_DEFAULT = 0 | 48 | wxLANGUAGE_DEFAULT = 0 | 22 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
ssaavedra/liquidhaskell | benchmarks/unordered-containers-0.2.1.0/Data/HashMap/Base.hs | bsd-3-clause | ------------------------------------------------------------------------
-- * Folds
-- | /O(n)/ Reduce this map by applying a binary operator to all
-- elements, using the given starting value (typically the
-- left-identity of the operator). Each application of the operator
-- is evaluated before before using the re... | 493 | foldl' :: (a -> v -> a) -> a -> HashMap k v -> a
foldl' f = foldlWithKey' (\ z _ v -> f z v) | 92 | foldl' f = foldlWithKey' (\ z _ v -> f z v) | 43 | true | true | 0 | 8 | 86 | 69 | 38 | 31 | null | null |
olsner/ghc | testsuite/tests/perf/compiler/T10370.hs | bsd-3-clause | a506 :: IO (); a506 = forever $ putStrLn "a506" | 47 | a506 :: IO ()
a506 = forever $ putStrLn "a506" | 46 | a506 = forever $ putStrLn "a506" | 32 | false | true | 0 | 6 | 9 | 24 | 12 | 12 | null | null |
razvan9310/barrelfish | hake/Main.hs | mit | treePath :: Opts -> TreeRef -> FilePath -> FilePath -> FilePath -> FilePath
-- The architecture 'root' is special.
treePath o SrcTree "root" path hakepath =
relPath (opt_sourcedir o) path hakepath | 201 | treePath :: Opts -> TreeRef -> FilePath -> FilePath -> FilePath -> FilePath
treePath o SrcTree "root" path hakepath =
relPath (opt_sourcedir o) path hakepath | 162 | treePath o SrcTree "root" path hakepath =
relPath (opt_sourcedir o) path hakepath | 86 | true | true | 0 | 11 | 35 | 62 | 29 | 33 | null | null |
pxqr/intset | src/Data/IntervalSet/Internal.hs | bsd-3-clause | union (Fin p m ) t = insertFin p m t | 50 | union (Fin p m ) t = insertFin p m t | 50 | union (Fin p m ) t = insertFin p m t | 50 | false | false | 0 | 7 | 24 | 26 | 12 | 14 | null | null |
DaMSL/K3 | src/Language/K3/TypeSystem/TypeDecision/Monad.hs | apache-2.0 | getNextVarId :: TypeDecideM Int
getNextVarId = do
s <- get
put $ s { nextVarId = nextVarId s + 1 }
return $ nextVarId s | 125 | getNextVarId :: TypeDecideM Int
getNextVarId = do
s <- get
put $ s { nextVarId = nextVarId s + 1 }
return $ nextVarId s | 125 | getNextVarId = do
s <- get
put $ s { nextVarId = nextVarId s + 1 }
return $ nextVarId s | 93 | false | true | 0 | 11 | 30 | 53 | 25 | 28 | null | null |
nonowarn/tkhs | src/Vty.hs | bsd-3-clause | size :: V (Width,Height)
size = do
output <- asks outputIface
(w, h) <- liftIO $ displayBounds output
return (w,h) | 120 | size :: V (Width,Height)
size = do
output <- asks outputIface
(w, h) <- liftIO $ displayBounds output
return (w,h) | 120 | size = do
output <- asks outputIface
(w, h) <- liftIO $ displayBounds output
return (w,h) | 95 | false | true | 0 | 9 | 25 | 62 | 31 | 31 | null | null |
agrafix/compile-registry | src/CR/Server.hs | mit | keyParams :: HE.Params (InputHash, CpuArch)
keyParams =
contramap (unInputHash . view _1) (HE.value HE.text) <>
contramap (unCpuArch . view _2) (HE.value HE.text) | 170 | keyParams :: HE.Params (InputHash, CpuArch)
keyParams =
contramap (unInputHash . view _1) (HE.value HE.text) <>
contramap (unCpuArch . view _2) (HE.value HE.text) | 170 | keyParams =
contramap (unInputHash . view _1) (HE.value HE.text) <>
contramap (unCpuArch . view _2) (HE.value HE.text) | 126 | false | true | 0 | 9 | 29 | 76 | 38 | 38 | null | null |
mb21/qua-kit | apps/hs/qua-server/src/Application/Grading.hs | mit | constCz = 0.45 | 14 | constCz = 0.45 | 14 | constCz = 0.45 | 14 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
Gabriel439/Haskell-Dhall-Library | dhall/src/Dhall/Util.hs | bsd-3-clause | -- | Convenient utility for retrieving an expression along with its header
getExpressionAndHeader :: Censor -> Input -> IO (Header, Expr Src Import)
getExpressionAndHeader censor =
get Dhall.Parser.exprAndHeaderFromText censor . Input_ | 239 | getExpressionAndHeader :: Censor -> Input -> IO (Header, Expr Src Import)
getExpressionAndHeader censor =
get Dhall.Parser.exprAndHeaderFromText censor . Input_ | 164 | getExpressionAndHeader censor =
get Dhall.Parser.exprAndHeaderFromText censor . Input_ | 90 | true | true | 0 | 9 | 34 | 49 | 25 | 24 | null | null |
TomMD/ghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | emitPrimOp _ [res] GetCurrentCCSOp [_dummy_arg]
= emitAssign (CmmLocal res) curCCS | 85 | emitPrimOp _ [res] GetCurrentCCSOp [_dummy_arg]
= emitAssign (CmmLocal res) curCCS | 85 | emitPrimOp _ [res] GetCurrentCCSOp [_dummy_arg]
= emitAssign (CmmLocal res) curCCS | 85 | false | false | 1 | 7 | 12 | 37 | 16 | 21 | null | null |
andyarvanitis/Idris-dev | src/IRTS/CodegenC.hs | bsd-3-clause | creg Tmp = "REG1" | 17 | creg Tmp = "REG1" | 17 | creg Tmp = "REG1" | 17 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
nedervold/origami | src/Data/Origami/Internal/THUtils.hs | bsd-3-clause | nms' :: [Name]
nms' = map x' [1..]
where
x' :: Int -> Name
x' n = mkName ('x' : show n ++ "'")
-- | An infinite list of expression variables named @x1@, @x2@... | 174 | nms' :: [Name]
nms' = map x' [1..]
where
x' :: Int -> Name
x' n = mkName ('x' : show n ++ "'")
-- | An infinite list of expression variables named @x1@, @x2@... | 174 | nms' = map x' [1..]
where
x' :: Int -> Name
x' n = mkName ('x' : show n ++ "'")
-- | An infinite list of expression variables named @x1@, @x2@... | 159 | false | true | 0 | 11 | 48 | 59 | 31 | 28 | null | null |
gspindles/mj-score-eval | src/Game/Mahjong/Static/Examples.hs | mit | threeConsecutiveSequencesEx2 :: Maybe Hand
threeConsecutiveSequencesEx2 = mkHand1
[ mkSequence' Revealed b1
, mkSequence' Revealed b3
, mkSequence' Concealed b5
, mkTriplet' Concealed k8
, mkPair' Revealed dg
]
[s1]
Nothing | 239 | threeConsecutiveSequencesEx2 :: Maybe Hand
threeConsecutiveSequencesEx2 = mkHand1
[ mkSequence' Revealed b1
, mkSequence' Revealed b3
, mkSequence' Concealed b5
, mkTriplet' Concealed k8
, mkPair' Revealed dg
]
[s1]
Nothing | 239 | threeConsecutiveSequencesEx2 = mkHand1
[ mkSequence' Revealed b1
, mkSequence' Revealed b3
, mkSequence' Concealed b5
, mkTriplet' Concealed k8
, mkPair' Revealed dg
]
[s1]
Nothing | 196 | false | true | 0 | 6 | 45 | 66 | 32 | 34 | null | null |
f1u77y/xmonad-contrib | XMonad/Util/TreeZipper.hs | bsd-3-clause | children :: TreeZipper a -> Maybe (TreeZipper a)
children z = case subForest $ tz_current z of
(n:xs) -> Just
TreeZipper { tz_current = n
, tz_before = []
, tz_after = xs
, tz_parents = (tz_before z, cursor z, tz_after z) : tz_parents z
... | 379 | children :: TreeZipper a -> Maybe (TreeZipper a)
children z = case subForest $ tz_current z of
(n:xs) -> Just
TreeZipper { tz_current = n
, tz_before = []
, tz_after = xs
, tz_parents = (tz_before z, cursor z, tz_after z) : tz_parents z
... | 379 | children z = case subForest $ tz_current z of
(n:xs) -> Just
TreeZipper { tz_current = n
, tz_before = []
, tz_after = xs
, tz_parents = (tz_before z, cursor z, tz_after z) : tz_parents z
}
[] -> Nothing
-- | Go to the next ... | 330 | false | true | 12 | 8 | 152 | 116 | 59 | 57 | null | null |
mainland/dph | dph-prim-par/Data/Array/Parallel/Unlifted.hs | bsd-3-clause | lengthsOfSSegd = UPSSegd.takeLengths | 53 | lengthsOfSSegd = UPSSegd.takeLengths | 53 | lengthsOfSSegd = UPSSegd.takeLengths | 53 | false | false | 0 | 5 | 19 | 8 | 4 | 4 | null | null |
nau/lasca-compiler | src/lib/Lasca/Syntax.hs | bsd-3-clause | metaLens :: Lens.Lens' Expr Meta
metaLens = Lens.lens (fst . getset) (snd . getset)
where getset expr = case expr of
Literal meta lit -> (meta, \ m -> Literal m lit)
Ident meta name -> (meta, \ m -> Ident m name)
Apply meta expr args -> (meta, \ m -> Apply m expr args)
... | 1,092 | metaLens :: Lens.Lens' Expr Meta
metaLens = Lens.lens (fst . getset) (snd . getset)
where getset expr = case expr of
Literal meta lit -> (meta, \ m -> Literal m lit)
Ident meta name -> (meta, \ m -> Ident m name)
Apply meta expr args -> (meta, \ m -> Apply m expr args)
... | 1,092 | metaLens = Lens.lens (fst . getset) (snd . getset)
where getset expr = case expr of
Literal meta lit -> (meta, \ m -> Literal m lit)
Ident meta name -> (meta, \ m -> Ident m name)
Apply meta expr args -> (meta, \ m -> Apply m expr args)
Lam meta name expr -> (... | 1,059 | false | true | 2 | 10 | 398 | 482 | 243 | 239 | null | null |
sgillespie/ghc | compiler/hsSyn/HsBinds.hs | bsd-3-clause | isSCCFunSig _ = False | 40 | isSCCFunSig _ = False | 40 | isSCCFunSig _ = False | 40 | false | false | 0 | 5 | 22 | 9 | 4 | 5 | null | null |
brendanhay/czar | czar/Czar/Socket.hs | mpl-2.0 | logPeerRX :: MonadIO m => String -> Context m ()
logPeerRX msg = do
peer <- peerName
name <- sockName
logRX name peer msg | 133 | logPeerRX :: MonadIO m => String -> Context m ()
logPeerRX msg = do
peer <- peerName
name <- sockName
logRX name peer msg | 133 | logPeerRX msg = do
peer <- peerName
name <- sockName
logRX name peer msg | 84 | false | true | 0 | 8 | 35 | 56 | 25 | 31 | null | null |
GaloisInc/ivory | ivory-eval/src/Ivory/Eval.hs | bsd-3-clause | lookupStruct :: String -> Eval I.Struct
lookupStruct str = do
structs <- fmap structs get
case Map.lookup str structs of
Nothing -> raise $ "Couldn't find struct: " ++ str
Just str -> return str
----------------------------------------------------------------------
-- | Main Evaluator
--------------------... | 370 | lookupStruct :: String -> Eval I.Struct
lookupStruct str = do
structs <- fmap structs get
case Map.lookup str structs of
Nothing -> raise $ "Couldn't find struct: " ++ str
Just str -> return str
----------------------------------------------------------------------
-- | Main Evaluator
--------------------... | 370 | lookupStruct str = do
structs <- fmap structs get
case Map.lookup str structs of
Nothing -> raise $ "Couldn't find struct: " ++ str
Just str -> return str
----------------------------------------------------------------------
-- | Main Evaluator
------------------------------------------------------------... | 330 | false | true | 0 | 11 | 54 | 78 | 37 | 41 | null | null |
dysinger/amazonka | amazonka-rds/gen/Network/AWS/RDS/CreateDBInstance.hs | mpl-2.0 | -- | The password for the given ARN from the Key Store in order to access the
-- device.
cdbiTdeCredentialPassword :: Lens' CreateDBInstance (Maybe Text)
cdbiTdeCredentialPassword =
lens _cdbiTdeCredentialPassword
(\s a -> s { _cdbiTdeCredentialPassword = a }) | 272 | cdbiTdeCredentialPassword :: Lens' CreateDBInstance (Maybe Text)
cdbiTdeCredentialPassword =
lens _cdbiTdeCredentialPassword
(\s a -> s { _cdbiTdeCredentialPassword = a }) | 183 | cdbiTdeCredentialPassword =
lens _cdbiTdeCredentialPassword
(\s a -> s { _cdbiTdeCredentialPassword = a }) | 118 | true | true | 1 | 9 | 49 | 53 | 26 | 27 | null | null |
spechub/Hets | Comorphisms/SuleCFOL2TPTP.hs | gpl-2.0 | translateNamedFormula :: (FormExtension f, Eq f)
=> SignWithRenamings f e
-> Named (FORMULA f) -> Result (Named TSign.Sentence)
translateNamedFormula signWithRenamings x = do
let nameS = "ax_" ++ toAlphaNum (map toLower $ senAttr x)
translated <-
translateFormula sign... | 450 | translateNamedFormula :: (FormExtension f, Eq f)
=> SignWithRenamings f e
-> Named (FORMULA f) -> Result (Named TSign.Sentence)
translateNamedFormula signWithRenamings x = do
let nameS = "ax_" ++ toAlphaNum (map toLower $ senAttr x)
translated <-
translateFormula sign... | 450 | translateNamedFormula signWithRenamings x = do
let nameS = "ax_" ++ toAlphaNum (map toLower $ senAttr x)
translated <-
translateFormula signWithRenamings nameS (isAxiom x) $
AS_Annotation.sentence x
return $ x { AS_Annotation.sentence = translated
} | 278 | false | true | 0 | 14 | 124 | 139 | 66 | 73 | null | null |
bgamari/shaking-up-ghc | src/Hadrian/Utilities.hs | bsd-3-clause | intersectOrd :: (a -> b -> Ordering) -> [a] -> [b] -> [a]
intersectOrd cmp = loop
where
loop [] _ = []
loop _ [] = []
loop (x:xs) (y:ys) = case cmp x y of
LT -> loop xs (y:ys)
EQ -> x : loop xs (y:ys)
GT -> loop (x:xs) ys
-- | Lookup all elements of a given sorted list in ... | 668 | intersectOrd :: (a -> b -> Ordering) -> [a] -> [b] -> [a]
intersectOrd cmp = loop
where
loop [] _ = []
loop _ [] = []
loop (x:xs) (y:ys) = case cmp x y of
LT -> loop xs (y:ys)
EQ -> x : loop xs (y:ys)
GT -> loop (x:xs) ys
-- | Lookup all elements of a given sorted list in ... | 668 | intersectOrd cmp = loop
where
loop [] _ = []
loop _ [] = []
loop (x:xs) (y:ys) = case cmp x y of
LT -> loop xs (y:ys)
EQ -> x : loop xs (y:ys)
GT -> loop (x:xs) ys
-- | Lookup all elements of a given sorted list in a given sorted dictionary.
-- @lookupAll list dict@ is equ... | 610 | false | true | 2 | 12 | 173 | 174 | 92 | 82 | null | null |
elliottt/dang | src/Dang/Utils/PP.hs | bsd-3-clause | text :: String -> Doc
text s = return (PJ.text s) | 49 | text :: String -> Doc
text s = return (PJ.text s) | 49 | text s = return (PJ.text s) | 27 | false | true | 0 | 8 | 10 | 35 | 15 | 20 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.