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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nuttycom/haskoin | Network/Haskoin/Node/PeerManager.hs | unlicense | processStartPeer :: PeerManager r m => String -> Int -> ManagerHandle m ()
processStartPeer host port = peerExists remote >>= \exists -> unless exists $ do
$(logInfo) $ T.pack $ unwords
[ "Starting peer"
, "(", show remote, ")"
]
vers <- S.gets mngrVersion
pChan <- liftIO . atomi... | 810 | processStartPeer :: PeerManager r m => String -> Int -> ManagerHandle m ()
processStartPeer host port = peerExists remote >>= \exists -> unless exists $ do
$(logInfo) $ T.pack $ unwords
[ "Starting peer"
, "(", show remote, ")"
]
vers <- S.gets mngrVersion
pChan <- liftIO . atomi... | 810 | processStartPeer host port = peerExists remote >>= \exists -> unless exists $ do
$(logInfo) $ T.pack $ unwords
[ "Starting peer"
, "(", show remote, ")"
]
vers <- S.gets mngrVersion
pChan <- liftIO . atomically $ do
c <- newTBMChan 10000
writeTBMChan c $ MVersion ... | 735 | false | true | 0 | 16 | 281 | 250 | 121 | 129 | null | null |
FranklinChen/hugs98-plus-Sep2006 | packages/xhtml/Text/XHtml/Extras.hs | bsd-3-clause | copyright = primHtmlChar "copy" | 35 | copyright = primHtmlChar "copy" | 35 | copyright = primHtmlChar "copy" | 35 | false | false | 0 | 5 | 7 | 9 | 4 | 5 | null | null |
amutake/psg-scheme | src/Primitives.hs | bsd-3-clause | primEqP [Prim p, Prim q] = bool $ p == q | 40 | primEqP [Prim p, Prim q] = bool $ p == q | 40 | primEqP [Prim p, Prim q] = bool $ p == q | 40 | false | false | 0 | 7 | 10 | 29 | 14 | 15 | null | null |
bitemyapp/ghc | libraries/base/GHC/IO/Handle/Text.hs | bsd-3-clause | -- NB. performance-critical code: eyeball the Core.
unpack_nl :: RawCharBuffer -> Int -> Int -> [Char] -> IO ([Char],Int)
unpack_nl !buf !r !w acc0
| r == w = return (acc0, 0)
| otherwise =
withRawBuffer buf $ \pbuf ->
let
unpackRB acc !i
| i < r = return acc
| otherwise = do
... | 3,192 | unpack_nl :: RawCharBuffer -> Int -> Int -> [Char] -> IO ([Char],Int)
unpack_nl !buf !r !w acc0
| r == w = return (acc0, 0)
| otherwise =
withRawBuffer buf $ \pbuf ->
let
unpackRB acc !i
| i < r = return acc
| otherwise = do
c <- peekElemOff pbuf i
if (... | 3,140 | unpack_nl !buf !r !w acc0
| r == w = return (acc0, 0)
| otherwise =
withRawBuffer buf $ \pbuf ->
let
unpackRB acc !i
| i < r = return acc
| otherwise = do
c <- peekElemOff pbuf i
if (c == '\n' && i > r)
then do
... | 3,070 | true | true | 1 | 20 | 917 | 424 | 236 | 188 | null | null |
OurPrInstH/InstH | src/Routes.hs | bsd-3-clause | сheckTokenFromCookie :: Pool Connection -> Maybe T.Text -> IO Int
сheckTokenFromCookie pool h = do
res <- (checkToken pool (fromMaybe "" (T.stripPrefix "token=" (fromMaybe "NoCookie" h))))
-- IO [Only Int] T.Text Maybe T.Text T.Text
return $ (LI.head (map (\el -> fromOnly e... | 448 | сheckTokenFromCookie :: Pool Connection -> Maybe T.Text -> IO Int
сheckTokenFromCookie pool h = do
res <- (checkToken pool (fromMaybe "" (T.stripPrefix "token=" (fromMaybe "NoCookie" h))))
-- IO [Only Int] T.Text Maybe T.Text T.Text
return $ (LI.head (map (\el -> fromOnly e... | 448 | сheckTokenFromCookie pool h = do
res <- (checkToken pool (fromMaybe "" (T.stripPrefix "token=" (fromMaybe "NoCookie" h))))
-- IO [Only Int] T.Text Maybe T.Text T.Text
return $ (LI.head (map (\el -> fromOnly el) res))
--сheckTokenFromCookie pool h = liftIO (checkToken pool (... | 382 | false | true | 0 | 15 | 102 | 112 | 55 | 57 | null | null |
haraldsteinlechner/lambdaWolf | src/Assimp2Sg.hs | gpl-3.0 | noneGetTextureConf = GetTextureConf False False False False False False | 71 | noneGetTextureConf = GetTextureConf False False False False False False | 71 | noneGetTextureConf = GetTextureConf False False False False False False | 71 | false | false | 0 | 5 | 8 | 19 | 9 | 10 | null | null |
bamboo/sneerkell | src/Sneer/Client.hs | lgpl-3.0 | receiveTuple :: Client -> STM Tuple
receiveTuple Client{..} = readTChan _tuplesIn | 81 | receiveTuple :: Client -> STM Tuple
receiveTuple Client{..} = readTChan _tuplesIn | 81 | receiveTuple Client{..} = readTChan _tuplesIn | 45 | false | true | 2 | 5 | 10 | 29 | 15 | 14 | null | null |
sdiehl/ghc | compiler/nativeGen/SPARC/ShortcutJump.hs | bsd-3-clause | canShortcut :: Instr -> Maybe JumpDest
canShortcut _ = Nothing | 62 | canShortcut :: Instr -> Maybe JumpDest
canShortcut _ = Nothing | 62 | canShortcut _ = Nothing | 23 | false | true | 0 | 6 | 9 | 21 | 10 | 11 | null | null |
mvr/at | src/Math/Algebra/AbGroupPres.hs | bsd-3-clause | isoClass :: AbGroupPres -> IsoClass
isoClass (AbGroupPres _ d _ _) = IsoClass (fromIntegral r) (invariantFactorsToElementaryDivisors diag)
where
diag = filter (/= 0) $ V.toList $ M.getDiag d
r = M.nrows d - length diag | 228 | isoClass :: AbGroupPres -> IsoClass
isoClass (AbGroupPres _ d _ _) = IsoClass (fromIntegral r) (invariantFactorsToElementaryDivisors diag)
where
diag = filter (/= 0) $ V.toList $ M.getDiag d
r = M.nrows d - length diag | 228 | isoClass (AbGroupPres _ d _ _) = IsoClass (fromIntegral r) (invariantFactorsToElementaryDivisors diag)
where
diag = filter (/= 0) $ V.toList $ M.getDiag d
r = M.nrows d - length diag | 192 | false | true | 1 | 9 | 44 | 94 | 46 | 48 | null | null |
piyush-kurur/yesod | yesod-core/Yesod/Content.hs | mit | typeJavascript :: ContentType
typeJavascript = "text/javascript; charset=utf-8" | 79 | typeJavascript :: ContentType
typeJavascript = "text/javascript; charset=utf-8" | 79 | typeJavascript = "text/javascript; charset=utf-8" | 49 | false | true | 0 | 4 | 6 | 11 | 6 | 5 | null | null |
vikraman/ghc | libraries/template-haskell/Language/Haskell/TH/Ppr.hs | bsd-3-clause | pprExp i (UInfixE e1 op e2)
= parensIf (i > unopPrec) $ pprExp unopPrec e1
<+> pprInfixExp op
<+> pprExp unopPrec e2 | 167 | pprExp i (UInfixE e1 op e2)
= parensIf (i > unopPrec) $ pprExp unopPrec e1
<+> pprInfixExp op
<+> pprExp unopPrec e2 | 167 | pprExp i (UInfixE e1 op e2)
= parensIf (i > unopPrec) $ pprExp unopPrec e1
<+> pprInfixExp op
<+> pprExp unopPrec e2 | 167 | false | false | 0 | 10 | 72 | 56 | 26 | 30 | null | null |
glguy/ssh-hans | src/Network/SSH/Messages.hs | bsd-3-clause | putSshProposal :: Putter SshProposal
putSshProposal SshProposal{ .. } =
do putSshCookie sshProposalCookie
putNameList sshKexAlgs
putNameList sshServerHostKeyAlgs
putSshAlgs sshEncAlgs
putSshAlgs sshMacAlgs
putSshAlgs sshCompAlgs
putSshAlgs sshLanguages
putBoolean sshFirstKexFollows
... | 546 | putSshProposal :: Putter SshProposal
putSshProposal SshProposal{ .. } =
do putSshCookie sshProposalCookie
putNameList sshKexAlgs
putNameList sshServerHostKeyAlgs
putSshAlgs sshEncAlgs
putSshAlgs sshMacAlgs
putSshAlgs sshCompAlgs
putSshAlgs sshLanguages
putBoolean sshFirstKexFollows
... | 546 | putSshProposal SshProposal{ .. } =
do putSshCookie sshProposalCookie
putNameList sshKexAlgs
putNameList sshServerHostKeyAlgs
putSshAlgs sshEncAlgs
putSshAlgs sshMacAlgs
putSshAlgs sshCompAlgs
putSshAlgs sshLanguages
putBoolean sshFirstKexFollows
-- RESERVED
putWord32be 0
... | 509 | false | true | 1 | 8 | 109 | 90 | 35 | 55 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Collectionstatuses/Get.hs | mpl-2.0 | -- | V1 error format.
cXgafv :: Lens' CollectionstatusesGet (Maybe Xgafv)
cXgafv = lens _cXgafv (\ s a -> s{_cXgafv = a}) | 121 | cXgafv :: Lens' CollectionstatusesGet (Maybe Xgafv)
cXgafv = lens _cXgafv (\ s a -> s{_cXgafv = a}) | 99 | cXgafv = lens _cXgafv (\ s a -> s{_cXgafv = a}) | 47 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
liuyang1/H99 | 50.hs | gpl-2.0 | minHeight n = ceiling $ logBase 2 (n + 1) | 41 | minHeight n = ceiling $ logBase 2 (n + 1) | 41 | minHeight n = ceiling $ logBase 2 (n + 1) | 41 | false | false | 1 | 8 | 9 | 28 | 12 | 16 | null | null |
mzini/termlib | Termlib/Problem.hs | gpl-3.0 | emptyRuleset :: Ruleset
emptyRuleset = Ruleset Trs.empty Trs.empty Trs.empty Trs.empty | 87 | emptyRuleset :: Ruleset
emptyRuleset = Ruleset Trs.empty Trs.empty Trs.empty Trs.empty | 86 | emptyRuleset = Ruleset Trs.empty Trs.empty Trs.empty Trs.empty | 62 | false | true | 0 | 6 | 10 | 35 | 15 | 20 | null | null |
takoeight0821/malgo | src/Malgo/Rename/Pass.hs | bsd-3-clause | rnExp (List pos es) = do
nilName <- lookupVarName pos "Nil"
consName <- lookupVarName pos "Cons"
buildListApply nilName consName <$> traverse rnExp es
where
buildListApply nilName _ [] = Var pos (NoPrefix nilName)
buildListApply nilName consName (x : xs) = Apply pos (Apply pos (Var pos (NoPrefix consNam... | 363 | rnExp (List pos es) = do
nilName <- lookupVarName pos "Nil"
consName <- lookupVarName pos "Cons"
buildListApply nilName consName <$> traverse rnExp es
where
buildListApply nilName _ [] = Var pos (NoPrefix nilName)
buildListApply nilName consName (x : xs) = Apply pos (Apply pos (Var pos (NoPrefix consNam... | 363 | rnExp (List pos es) = do
nilName <- lookupVarName pos "Nil"
consName <- lookupVarName pos "Cons"
buildListApply nilName consName <$> traverse rnExp es
where
buildListApply nilName _ [] = Var pos (NoPrefix nilName)
buildListApply nilName consName (x : xs) = Apply pos (Apply pos (Var pos (NoPrefix consNam... | 363 | false | false | 1 | 11 | 68 | 144 | 68 | 76 | null | null |
tranma/big-oh | src/Test/BigOh/Fit/Hakaru.hs | bsd-3-clause | poly1d :: [Double] -> Double -> Double
poly1d weights a = poly weights a 1
where
poly [] _ _ = 0
poly (w:ws) x acc = w*acc + (poly ws x acc*x) | 155 | poly1d :: [Double] -> Double -> Double
poly1d weights a = poly weights a 1
where
poly [] _ _ = 0
poly (w:ws) x acc = w*acc + (poly ws x acc*x) | 155 | poly1d weights a = poly weights a 1
where
poly [] _ _ = 0
poly (w:ws) x acc = w*acc + (poly ws x acc*x) | 116 | false | true | 0 | 10 | 45 | 91 | 46 | 45 | null | null |
rCEx/feldspar-lang-small | src/Feldspar/Core/Frontend/Conversion.hs | bsd-3-clause | floor :: Integral a => Data Float -> Data a
floor = sugarSymF Floor | 67 | floor :: Integral a => Data Float -> Data a
floor = sugarSymF Floor | 67 | floor = sugarSymF Floor | 23 | false | true | 0 | 7 | 13 | 31 | 14 | 17 | null | null |
spacekitteh/smcghc | compiler/nativeGen/X86/Ppr.hs | bsd-3-clause | -- Atomics
pprInstr (LOCK i) = ptext (sLit "\tlock") $$ pprInstr i | 67 | pprInstr (LOCK i) = ptext (sLit "\tlock") $$ pprInstr i | 55 | pprInstr (LOCK i) = ptext (sLit "\tlock") $$ pprInstr i | 55 | true | false | 0 | 8 | 12 | 32 | 15 | 17 | null | null |
agrafix/hackage-server | Distribution/Client/Mirror/Session.hs | bsd-3-clause | getETag :: FilePath -> IO (Maybe String)
getETag file =
catchJustDoesNotExistError
(Just <$> readFile (file <.> "etag"))
(\_ -> return Nothing) | 159 | getETag :: FilePath -> IO (Maybe String)
getETag file =
catchJustDoesNotExistError
(Just <$> readFile (file <.> "etag"))
(\_ -> return Nothing) | 159 | getETag file =
catchJustDoesNotExistError
(Just <$> readFile (file <.> "etag"))
(\_ -> return Nothing) | 118 | false | true | 0 | 10 | 36 | 60 | 30 | 30 | null | null |
harrisi/on-being-better | list-expansion/Haskell/pres/STy.hs | cc0-1.0 | -- zero (SWrap ty) = Wrap (zero ty)
-- zero (SList _) = []
-- zero SUnit = ()
-- zero (SArrow _ res) = const (zero res)
eqSTy :: STy ty -> STy ty -> Bool
eqSTy SInt SInt = True | 177 | eqSTy :: STy ty -> STy ty -> Bool
eqSTy SInt SInt = True | 56 | eqSTy SInt SInt = True | 22 | true | true | 0 | 7 | 42 | 39 | 19 | 20 | null | null |
delta4d/codewars | kata/tiny-three-pass-compiler/TinyThreePassCompiler.hs | mit | compile :: String -> [String]
compile = pass3 . pass2 . pass1 | 62 | compile :: String -> [String]
compile = pass3 . pass2 . pass1 | 61 | compile = pass3 . pass2 . pass1 | 31 | false | true | 0 | 8 | 12 | 33 | 15 | 18 | null | null |
ekr/tamarin-prover | lib/term/src/Term/Builtin/Signature.hs | gpl-3.0 | signSym = ("sign",(2, Public)) | 30 | signSym = ("sign",(2, Public)) | 30 | signSym = ("sign",(2, Public)) | 30 | false | false | 0 | 6 | 3 | 18 | 11 | 7 | null | null |
oldmanmike/ghc | compiler/main/DynFlags.hs | bsd-3-clause | tmpDir :: DynFlags -> String
tmpDir dflags = sTmpDir (settings dflags) | 85 | tmpDir :: DynFlags -> String
tmpDir dflags = sTmpDir (settings dflags) | 85 | tmpDir dflags = sTmpDir (settings dflags) | 41 | false | true | 0 | 7 | 25 | 29 | 13 | 16 | null | null |
beni55/hermit | src/HERMIT/Kure.hs | bsd-2-clause | -- | Rewrite any children of a coercion of the form: @TyConAppCo@ 'TyCon' ['Coercion']
tyConAppCoAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m TyCon -> (Int -> Rewrite c m Coercion) -> Rewrite c m Coercion
tyConAppCoAnyR r rs = unwrapAnyR $ tyConAppCoAllR (wrapAnyR r) (wrapAnyR . rs) | 296 | tyConAppCoAnyR :: (ExtendPath c Crumb, MonadCatch m) => Rewrite c m TyCon -> (Int -> Rewrite c m Coercion) -> Rewrite c m Coercion
tyConAppCoAnyR r rs = unwrapAnyR $ tyConAppCoAllR (wrapAnyR r) (wrapAnyR . rs) | 209 | tyConAppCoAnyR r rs = unwrapAnyR $ tyConAppCoAllR (wrapAnyR r) (wrapAnyR . rs) | 78 | true | true | 0 | 10 | 49 | 92 | 46 | 46 | null | null |
bitemyapp/stitch | src/Stitch/Render.hs | bsd-3-clause | -- | Convert an abstract 'CSS' document built with the 'StitchT' transformer into its monad-wrapped 'Text' output. Unless you're explicitly using the transformer, this function is probably not useful.
renderStitchTWith :: Monad m => BlockPrinter -> StitchT m () -> m Text
renderStitchTWith f s = do
(_, block) <- runSt... | 484 | renderStitchTWith :: Monad m => BlockPrinter -> StitchT m () -> m Text
renderStitchTWith f s = do
(_, block) <- runStitchT s
return $ f block
-- | Outputs a basic human-readable version of the CSS document. Line breaks are added between blocks, and properties are spaced nicely. | 283 | renderStitchTWith f s = do
(_, block) <- runStitchT s
return $ f block
-- | Outputs a basic human-readable version of the CSS document. Line breaks are added between blocks, and properties are spaced nicely. | 212 | true | true | 0 | 9 | 82 | 69 | 33 | 36 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/UIEvent.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/UIEvent.pageX Mozilla UIEvent.pageX documentation>
getPageX :: (MonadDOM m, IsUIEvent self) => self -> m Int
getPageX self
= liftDOM
(round <$> (((toUIEvent self) ^. js "pageX") >>= valToNumber)) | 259 | getPageX :: (MonadDOM m, IsUIEvent self) => self -> m Int
getPageX self
= liftDOM
(round <$> (((toUIEvent self) ^. js "pageX") >>= valToNumber)) | 152 | getPageX self
= liftDOM
(round <$> (((toUIEvent self) ^. js "pageX") >>= valToNumber)) | 94 | true | true | 0 | 13 | 38 | 75 | 37 | 38 | null | null |
uuhan/Idris-dev | src/Idris/WhoCalls.hs | bsd-3-clause | findOccurs :: Name -> Idris [Name]
findOccurs n = do ctxt <- getContext
-- A definition calls a function if the function is in the type or RHS of the definition
let defs = (map fst . filter (\(n', def) -> n /= n' && occursDef n def) . ctxtAlist) ctxt
-- A datatype c... | 358 | findOccurs :: Name -> Idris [Name]
findOccurs n = do ctxt <- getContext
-- A definition calls a function if the function is in the type or RHS of the definition
let defs = (map fst . filter (\(n', def) -> n /= n' && occursDef n def) . ctxtAlist) ctxt
-- A datatype c... | 358 | findOccurs n = do ctxt <- getContext
-- A definition calls a function if the function is in the type or RHS of the definition
let defs = (map fst . filter (\(n', def) -> n /= n' && occursDef n def) . ctxtAlist) ctxt
-- A datatype calls its
return d... | 323 | false | true | 0 | 18 | 129 | 95 | 47 | 48 | null | null |
gallais/potpourri | papers/models/haskell/Models.hs | gpl-3.0 | evalTerm :: forall e m g a. Semantics e m -> SCon g -> STy a -> Term g a -> m g a
evalTerm sem@Semantics{..} g a t = semanticsTerm sem a t (env g) where
env :: forall g'. SCon g' -> Environment g' e g'
env SNull = envNull
env (SCons sg sa) = envCons (wkEnv sem (top refl) $ env sg) (embed sa Z)
----------... | 478 | evalTerm :: forall e m g a. Semantics e m -> SCon g -> STy a -> Term g a -> m g a
evalTerm sem@Semantics{..} g a t = semanticsTerm sem a t (env g) where
env :: forall g'. SCon g' -> Environment g' e g'
env SNull = envNull
env (SCons sg sa) = envCons (wkEnv sem (top refl) $ env sg) (embed sa Z)
----------... | 478 | evalTerm sem@Semantics{..} g a t = semanticsTerm sem a t (env g) where
env :: forall g'. SCon g' -> Environment g' e g'
env SNull = envNull
env (SCons sg sa) = envCons (wkEnv sem (top refl) $ env sg) (embed sa Z)
------------------------------------------------------------------------
-- Syntactic Semant... | 396 | false | true | 1 | 10 | 87 | 191 | 91 | 100 | null | null |
tnrangwi/grill | src/Data/SheetLayout.hs | mit | -- | Extract column of address.
col :: Address -> Coord
col (Addr (_, b)) = b | 77 | col :: Address -> Coord
col (Addr (_, b)) = b | 45 | col (Addr (_, b)) = b | 21 | true | true | 0 | 10 | 16 | 37 | 18 | 19 | null | null |
XinhuaZhang/PetaVisionHaskell | PetaVision/PVPFile/IO.hs | gpl-3.0 | getPVPHeader :: Handle -> IO PVPHeader
getPVPHeader h = do
bs <- BL.hGet h 4
let headerSize' = fromIntegral $ runGet getInt32le bs
bs' <- BL.hGet h (headerSize' - 4)
return $ runGet getHeaderParam (BL.append bs bs') | 223 | getPVPHeader :: Handle -> IO PVPHeader
getPVPHeader h = do
bs <- BL.hGet h 4
let headerSize' = fromIntegral $ runGet getInt32le bs
bs' <- BL.hGet h (headerSize' - 4)
return $ runGet getHeaderParam (BL.append bs bs') | 223 | getPVPHeader h = do
bs <- BL.hGet h 4
let headerSize' = fromIntegral $ runGet getInt32le bs
bs' <- BL.hGet h (headerSize' - 4)
return $ runGet getHeaderParam (BL.append bs bs') | 184 | false | true | 0 | 11 | 44 | 96 | 44 | 52 | null | null |
Bodigrim/katas | src/haskell/8-Grader.hs | bsd-2-clause | grader :: Double -> Char
grader n = snd . head . filter (\(f, _) -> f n) $ grades where
grades =
[ ((>= 1.0), 'F')
, ((>= 0.9), 'A')
, ((>= 0.8), 'B')
, ((>= 0.7), 'C')
, ((>= 0.6), 'D')
, (const True, 'F')
] | 238 | grader :: Double -> Char
grader n = snd . head . filter (\(f, _) -> f n) $ grades where
grades =
[ ((>= 1.0), 'F')
, ((>= 0.9), 'A')
, ((>= 0.8), 'B')
, ((>= 0.7), 'C')
, ((>= 0.6), 'D')
, (const True, 'F')
] | 238 | grader n = snd . head . filter (\(f, _) -> f n) $ grades where
grades =
[ ((>= 1.0), 'F')
, ((>= 0.9), 'A')
, ((>= 0.8), 'B')
, ((>= 0.7), 'C')
, ((>= 0.6), 'D')
, (const True, 'F')
] | 213 | false | true | 0 | 10 | 77 | 134 | 82 | 52 | null | null |
ben-schulz/Idris-dev | src/Idris/Core/Evaluate.hs | bsd-3-clause | bindEnv ((n, Let t v):bs) tm = Bind n (NLet t v) (bindEnv bs tm) | 64 | bindEnv ((n, Let t v):bs) tm = Bind n (NLet t v) (bindEnv bs tm) | 64 | bindEnv ((n, Let t v):bs) tm = Bind n (NLet t v) (bindEnv bs tm) | 64 | false | false | 1 | 9 | 14 | 54 | 26 | 28 | null | null |
eigengrau/haskell-ircbot | Network/IRC/Bot/Limiter.hs | bsd-3-clause | limit :: Limiter -> IO ()
limit l = do
SSem.wait (limitsOut l)
SSem.signal (limitsIn l)
-- | Loop which manages the limit timers | 135 | limit :: Limiter -> IO ()
limit l = do
SSem.wait (limitsOut l)
SSem.signal (limitsIn l)
-- | Loop which manages the limit timers | 135 | limit l = do
SSem.wait (limitsOut l)
SSem.signal (limitsIn l)
-- | Loop which manages the limit timers | 109 | false | true | 0 | 9 | 30 | 52 | 24 | 28 | null | null |
tismith/tlisp | src/LispEnvironment.hs | mit | runEval :: LispEval -> IOThrowsError LispVal
runEval e = runContT e return | 74 | runEval :: LispEval -> IOThrowsError LispVal
runEval e = runContT e return | 74 | runEval e = runContT e return | 29 | false | true | 0 | 7 | 11 | 32 | 13 | 19 | null | null |
sleepomeno/TForth | src/TF/WildcardRules.hs | apache-2.0 | isWildcard' (UnknownType _) = True | 34 | isWildcard' (UnknownType _) = True | 34 | isWildcard' (UnknownType _) = True | 34 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
olsner/ghc | testsuite/tests/perf/compiler/T10370.hs | bsd-3-clause | a265 :: IO (); a265 = forever $ putStrLn "a265" | 47 | a265 :: IO ()
a265 = forever $ putStrLn "a265" | 46 | a265 = forever $ putStrLn "a265" | 32 | false | true | 0 | 6 | 9 | 24 | 12 | 12 | null | null |
ezyang/ghc | compiler/nativeGen/X86/CodeGen.hs | bsd-3-clause | genJump :: CmmExpr{-the branch target-} -> [Reg] -> NatM InstrBlock
genJump (CmmLoad mem _) regs = do
Amode target code <- getAmode mem
return (code `snocOL` JMP (OpAddr target) regs) | 188 | genJump :: CmmExpr{-the branch target-} -> [Reg] -> NatM InstrBlock
genJump (CmmLoad mem _) regs = do
Amode target code <- getAmode mem
return (code `snocOL` JMP (OpAddr target) regs) | 187 | genJump (CmmLoad mem _) regs = do
Amode target code <- getAmode mem
return (code `snocOL` JMP (OpAddr target) regs) | 119 | false | true | 0 | 13 | 34 | 85 | 40 | 45 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/Accounts/List.hs | mpl-2.0 | -- | Creates a value of 'AccountsList' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'allXgafv'
--
-- * 'allMerchantId'
--
-- * 'allUploadProtocol'
--
-- * 'allAccessToken'
--
-- * 'allUploadType'
--
-- * 'allName'
--
-- * 'allView'
... | 867 | accountsList
:: Word64 -- ^ 'allMerchantId'
-> AccountsList
accountsList pAllMerchantId_ =
AccountsList'
{ _allXgafv = Nothing
, _allMerchantId = _Coerce # pAllMerchantId_
, _allUploadProtocol = Nothing
, _allAccessToken = Nothing
, _allUploadType = Nothing
, _allName = Nothing
, _... | 459 | accountsList pAllMerchantId_ =
AccountsList'
{ _allXgafv = Nothing
, _allMerchantId = _Coerce # pAllMerchantId_
, _allUploadProtocol = Nothing
, _allAccessToken = Nothing
, _allUploadType = Nothing
, _allName = Nothing
, _allView = Nothing
, _allPageToken = Nothing
, _allLabel = No... | 391 | true | true | 0 | 8 | 190 | 125 | 84 | 41 | null | null |
olorin/amazonka | amazonka-elasticbeanstalk/gen/Network/AWS/ElasticBeanstalk/DescribeEnvironmentHealth.hs | mpl-2.0 | -- | Contains the response body with information about the health of the
-- environment.
dehrsHealthStatus :: Lens' DescribeEnvironmentHealthResponse (Maybe Text)
dehrsHealthStatus = lens _dehrsHealthStatus (\ s a -> s{_dehrsHealthStatus = a}) | 243 | dehrsHealthStatus :: Lens' DescribeEnvironmentHealthResponse (Maybe Text)
dehrsHealthStatus = lens _dehrsHealthStatus (\ s a -> s{_dehrsHealthStatus = a}) | 154 | dehrsHealthStatus = lens _dehrsHealthStatus (\ s a -> s{_dehrsHealthStatus = a}) | 80 | true | true | 0 | 9 | 31 | 47 | 26 | 21 | null | null |
diku-dk/futhark | src/Futhark/Pass/ExpandAllocations.hs | isc | offsetMemoryInPat :: Pat LetDecMem -> [ExpReturns] -> OffsetM (Pat LetDecMem)
offsetMemoryInPat (Pat pes) rets = do
Pat <$> zipWithM onPE pes rets
where
onPE
(PatElem name (MemArray pt shape u (ArrayIn mem _)))
(MemArray _ _ _ (Just (ReturnsNewBlock _ _ ixfun))) =
pure . PatElem name . MemAr... | 562 | offsetMemoryInPat :: Pat LetDecMem -> [ExpReturns] -> OffsetM (Pat LetDecMem)
offsetMemoryInPat (Pat pes) rets = do
Pat <$> zipWithM onPE pes rets
where
onPE
(PatElem name (MemArray pt shape u (ArrayIn mem _)))
(MemArray _ _ _ (Just (ReturnsNewBlock _ _ ixfun))) =
pure . PatElem name . MemAr... | 562 | offsetMemoryInPat (Pat pes) rets = do
Pat <$> zipWithM onPE pes rets
where
onPE
(PatElem name (MemArray pt shape u (ArrayIn mem _)))
(MemArray _ _ _ (Just (ReturnsNewBlock _ _ ixfun))) =
pure . PatElem name . MemArray pt shape u . ArrayIn mem $
fmap (fmap unExt) ixfun
onPE pe _... | 484 | false | true | 2 | 10 | 150 | 258 | 118 | 140 | null | null |
beni55/haste-compiler | libraries/ghc-7.8/base/Data/HashTable.hs | bsd-3-clause | writeMutArray = writeIOArray | 28 | writeMutArray = writeIOArray | 28 | writeMutArray = writeIOArray | 28 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
google/hs-ten | ten-lens/src/Data/Ten/Lens.hs | apache-2.0 | -- | Convert a lens targeting Ap10 to a Rep10.
field10
:: Representable10 rec
=> Getting (Ap10 a (Rep10 rec)) (rec (Rep10 rec)) (Ap10 a (Rep10 rec))
-> Rep10 rec a
field10 l = field10' (view l) | 199 | field10
:: Representable10 rec
=> Getting (Ap10 a (Rep10 rec)) (rec (Rep10 rec)) (Ap10 a (Rep10 rec))
-> Rep10 rec a
field10 l = field10' (view l) | 152 | field10 l = field10' (view l) | 29 | true | true | 0 | 12 | 42 | 91 | 43 | 48 | null | null |
oldmanmike/ghc | compiler/utils/Pretty.hs | bsd-3-clause | sepX x (p:ps) = sep1 x (reduceDoc p) 0 ps | 41 | sepX x (p:ps) = sep1 x (reduceDoc p) 0 ps | 41 | sepX x (p:ps) = sep1 x (reduceDoc p) 0 ps | 41 | false | false | 0 | 7 | 9 | 33 | 16 | 17 | null | null |
Numberartificial/workflow | haskell-first-principles/src/RW/CH9/BetterPredicate.hs | mit | greaterP = liftP (>) | 20 | greaterP = liftP (>) | 20 | greaterP = liftP (>) | 20 | false | false | 1 | 5 | 3 | 15 | 6 | 9 | null | null |
AlexanderPankiv/ghc | compiler/deSugar/Check.hs | bsd-3-clause | tidy_pat (LitPat lit) = tidy_lit_pat lit | 48 | tidy_pat (LitPat lit) = tidy_lit_pat lit | 48 | tidy_pat (LitPat lit) = tidy_lit_pat lit | 48 | false | false | 0 | 6 | 13 | 19 | 8 | 11 | null | null |
dbanerjee1979/dirc | NetTest.hs | mit | prefix = do prefix <- many segment
user <- many (char '!' >> many segment)
host <- many (char '@' >> many segment)
return $ Prefix prefix (listToMaybe user) (listToMaybe host) | 211 | prefix = do prefix <- many segment
user <- many (char '!' >> many segment)
host <- many (char '@' >> many segment)
return $ Prefix prefix (listToMaybe user) (listToMaybe host) | 211 | prefix = do prefix <- many segment
user <- many (char '!' >> many segment)
host <- many (char '@' >> many segment)
return $ Prefix prefix (listToMaybe user) (listToMaybe host) | 211 | false | false | 0 | 11 | 66 | 88 | 39 | 49 | null | null |
neetsdkasu/CodeIQ-MySolutions | Q2654_今週のお題:回数指定のじゃんけん/Answer.hs | mit | solve [a, b, n] = loop n (0, Map.singleton (a, b) 1) where | 58 | solve [a, b, n] = loop n (0, Map.singleton (a, b) 1) where | 58 | solve [a, b, n] = loop n (0, Map.singleton (a, b) 1) where | 58 | false | false | 0 | 8 | 12 | 43 | 24 | 19 | null | null |
jtdaugherty/vty-ui-builder-xml | src/Demo.hs | bsd-3-clause | main :: IO ()
main = do
(c, values) <- buildCollection
fg_intro values `onKeyPressed` \_ k _ ->
case k of
KASCII 'q' -> exitSuccess
KASCII 'n' -> switchTo_ui2 values >> return True
_ -> return False
fg_ui2 values `onKeyPressed` \_ k _ ->
case k of
KASCII 'q' -> exitSu... | 436 | main :: IO ()
main = do
(c, values) <- buildCollection
fg_intro values `onKeyPressed` \_ k _ ->
case k of
KASCII 'q' -> exitSuccess
KASCII 'n' -> switchTo_ui2 values >> return True
_ -> return False
fg_ui2 values `onKeyPressed` \_ k _ ->
case k of
KASCII 'q' -> exitSu... | 436 | main = do
(c, values) <- buildCollection
fg_intro values `onKeyPressed` \_ k _ ->
case k of
KASCII 'q' -> exitSuccess
KASCII 'n' -> switchTo_ui2 values >> return True
_ -> return False
fg_ui2 values `onKeyPressed` \_ k _ ->
case k of
KASCII 'q' -> exitSuccess
... | 422 | false | true | 1 | 14 | 136 | 165 | 76 | 89 | null | null |
luispedro/NGH | Data/NGH/Formats/Sam.hs | mit | strict :: L.ByteString -> S.ByteString
strict = S.concat . L.toChunks | 69 | strict :: L.ByteString -> S.ByteString
strict = S.concat . L.toChunks | 69 | strict = S.concat . L.toChunks | 30 | false | true | 1 | 8 | 9 | 35 | 15 | 20 | null | null |
IanConnolly/aws-sdk-fork | AWS/EC2/ConversionTask.hs | bsd-3-clause | diskImageVolumeDescriptionSink
:: MonadThrow m
=> Consumer Event m DiskImageVolumeDescription
diskImageVolumeDescriptionSink = DiskImageVolumeDescription
<$> getT "size"
<*> getT "id" | 199 | diskImageVolumeDescriptionSink
:: MonadThrow m
=> Consumer Event m DiskImageVolumeDescription
diskImageVolumeDescriptionSink = DiskImageVolumeDescription
<$> getT "size"
<*> getT "id" | 199 | diskImageVolumeDescriptionSink = DiskImageVolumeDescription
<$> getT "size"
<*> getT "id" | 97 | false | true | 5 | 7 | 33 | 49 | 21 | 28 | null | null |
osa1/chsc | Supercompile/Drive.hs | bsd-3-clause | sc' hist speculated state state' =
check `catchScpM` \gen -> stop gen hist -- TODO: I want to use the original history here, but I think doing so leads to non-term as it contains rollbacks from "below us" (try DigitsOfE2)
where
check this_rb =
case terminate hist (if rEDUCE_BEFORE_TEST && sPECULATION th... | 1,408 | sc' hist speculated state state' =
check `catchScpM` \gen -> stop gen hist -- TODO: I want to use the original history here, but I think doing so leads to non-term as it contains rollbacks from "below us" (try DigitsOfE2)
where
check this_rb =
case terminate hist (if rEDUCE_BEFORE_TEST && sPECULATION th... | 1,408 | sc' hist speculated state state' =
check `catchScpM` \gen -> stop gen hist -- TODO: I want to use the original history here, but I think doing so leads to non-term as it contains rollbacks from "below us" (try DigitsOfE2)
where
check this_rb =
case terminate hist (if rEDUCE_BEFORE_TEST && sPECULATION th... | 1,408 | false | false | 0 | 12 | 373 | 284 | 147 | 137 | null | null |
themoritz/cabal | Cabal/Distribution/Simple/Setup.hs | bsd-3-clause | defaultHaddockFlags :: HaddockFlags
defaultHaddockFlags = HaddockFlags {
haddockProgramPaths = mempty,
haddockProgramArgs = [],
haddockHoogle = Flag False,
haddockHtml = Flag False,
haddockHtmlLocation = NoFlag,
haddockForHackage = NoFlag,
haddockExecutables = Flag False,
... | 725 | defaultHaddockFlags :: HaddockFlags
defaultHaddockFlags = HaddockFlags {
haddockProgramPaths = mempty,
haddockProgramArgs = [],
haddockHoogle = Flag False,
haddockHtml = Flag False,
haddockHtmlLocation = NoFlag,
haddockForHackage = NoFlag,
haddockExecutables = Flag False,
... | 725 | defaultHaddockFlags = HaddockFlags {
haddockProgramPaths = mempty,
haddockProgramArgs = [],
haddockHoogle = Flag False,
haddockHtml = Flag False,
haddockHtmlLocation = NoFlag,
haddockForHackage = NoFlag,
haddockExecutables = Flag False,
haddockTestSuites = Flag False... | 689 | false | true | 0 | 7 | 197 | 153 | 90 | 63 | null | null |
ribag/ganeti-experiments | src/Ganeti/JQScheduler/ReasonRateLimiting.hs | gpl-2.0 | -- buckets are already unique
-- | Whether the first `SlotMap` has enough slots free to accomodate the
-- bucket slots of the second `SlotMap`.
hasSlotsFor :: SlotMap -> SlotMap -> Bool
slotMap `hasSlotsFor` newSlots =
let relevantSlots = slotMap `Map.intersection` newSlots
in not $ isOverfull (newSlots `joinSlot... | 339 | hasSlotsFor :: SlotMap -> SlotMap -> Bool
slotMap `hasSlotsFor` newSlots =
let relevantSlots = slotMap `Map.intersection` newSlots
in not $ isOverfull (newSlots `joinSlotMap` relevantSlots) | 193 | slotMap `hasSlotsFor` newSlots =
let relevantSlots = slotMap `Map.intersection` newSlots
in not $ isOverfull (newSlots `joinSlotMap` relevantSlots) | 151 | true | true | 2 | 9 | 54 | 72 | 38 | 34 | null | null |
olsner/ghc | compiler/utils/Bag.hs | bsd-3-clause | foldBag t u e (UnitBag x) = u x `t` e | 41 | foldBag t u e (UnitBag x) = u x `t` e | 41 | foldBag t u e (UnitBag x) = u x `t` e | 41 | false | false | 0 | 7 | 14 | 30 | 15 | 15 | null | null |
verement/etamoo | src/MOO/WAIF.hs | bsd-3-clause | prefix = ":" :: StrT | 20 | prefix = ":" :: StrT | 20 | prefix = ":" :: StrT | 20 | false | false | 2 | 5 | 4 | 15 | 5 | 10 | null | null |
rueshyna/gogol | gogol-genomics/gen/Network/Google/Resource/Genomics/AnnotationSets/Delete.hs | mpl-2.0 | -- | Pretty-print response.
asdPp :: Lens' AnnotationSetsDelete Bool
asdPp = lens _asdPp (\ s a -> s{_asdPp = a}) | 113 | asdPp :: Lens' AnnotationSetsDelete Bool
asdPp = lens _asdPp (\ s a -> s{_asdPp = a}) | 85 | asdPp = lens _asdPp (\ s a -> s{_asdPp = a}) | 44 | true | true | 1 | 9 | 19 | 46 | 22 | 24 | null | null |
lamdu/lamdu | src/Lamdu/GUI/Expr/AssignmentEdit.hs | gpl-3.0 | makeJumpToRhs :: _ => Widget.Id -> GuiM env i o (EventMap (o M.Update))
makeJumpToRhs rhsId =
do
env <- Lens.view id
GuiM.mkPrejumpPosSaver
<&> Lens.mapped .~ GuiState.updateCursor rhsId
<&> const
<&> E.charGroup Nothing
(E.toDoc env
[ ... | 428 | makeJumpToRhs :: _ => Widget.Id -> GuiM env i o (EventMap (o M.Update))
makeJumpToRhs rhsId =
do
env <- Lens.view id
GuiM.mkPrejumpPosSaver
<&> Lens.mapped .~ GuiState.updateCursor rhsId
<&> const
<&> E.charGroup Nothing
(E.toDoc env
[ ... | 428 | makeJumpToRhs rhsId =
do
env <- Lens.view id
GuiM.mkPrejumpPosSaver
<&> Lens.mapped .~ GuiState.updateCursor rhsId
<&> const
<&> E.charGroup Nothing
(E.toDoc env
[ has . MomentuTexts.navigation
, has . Texts.jumpToDefBod... | 356 | false | true | 0 | 14 | 171 | 130 | 61 | 69 | null | null |
ghcjs/ghcjs | src/Gen2/Shim.hs | mit | foldShim :: Pkg -> Version -> Shim -> [FilePath]
foldShim pkg ver sh
| inRange ver sh || isEmptyVersion ver =
dependencies sh ++ concatMap (foldShim pkg ver) (subs sh)
| otherwise = [] | 194 | foldShim :: Pkg -> Version -> Shim -> [FilePath]
foldShim pkg ver sh
| inRange ver sh || isEmptyVersion ver =
dependencies sh ++ concatMap (foldShim pkg ver) (subs sh)
| otherwise = [] | 194 | foldShim pkg ver sh
| inRange ver sh || isEmptyVersion ver =
dependencies sh ++ concatMap (foldShim pkg ver) (subs sh)
| otherwise = [] | 145 | false | true | 1 | 9 | 43 | 87 | 41 | 46 | null | null |
iquiw/wai | warp/Network/Wai/Handler/Warp/HTTP2/Sender.hs | mit | frameSender :: Context -> Connection -> InternalInfo -> S.Settings -> IO ()
frameSender ctx@Context{outputQ,connectionWindow}
conn@Connection{connWriteBuffer,connBufferSize,connSendAll}
ii settings = go `E.catch` ignore
where
initialSettings = [(SettingsMaxConcurrentStreams,recommendedConc... | 7,109 | frameSender :: Context -> Connection -> InternalInfo -> S.Settings -> IO ()
frameSender ctx@Context{outputQ,connectionWindow}
conn@Connection{connWriteBuffer,connBufferSize,connSendAll}
ii settings = go `E.catch` ignore
where
initialSettings = [(SettingsMaxConcurrentStreams,recommendedConc... | 7,109 | frameSender ctx@Context{outputQ,connectionWindow}
conn@Connection{connWriteBuffer,connBufferSize,connSendAll}
ii settings = go `E.catch` ignore
where
initialSettings = [(SettingsMaxConcurrentStreams,recommendedConcurrency)]
initialFrame = settingsFrame id initialSettings
bufHeaderP... | 7,033 | false | true | 0 | 20 | 2,336 | 1,462 | 703 | 759 | null | null |
oldmanmike/ghc | compiler/coreSyn/CoreUnfold.hs | bsd-3-clause | mkCompulsoryUnfolding :: CoreExpr -> Unfolding
mkCompulsoryUnfolding expr -- Used for things that absolutely must be unfolded
= mkCoreUnfolding InlineCompulsory True
(simpleOptExpr expr)
(UnfWhen { ug_arity = 0 -- Arity of unfolding doesn't matter
... | 390 | mkCompulsoryUnfolding :: CoreExpr -> Unfolding
mkCompulsoryUnfolding expr -- Used for things that absolutely must be unfolded
= mkCoreUnfolding InlineCompulsory True
(simpleOptExpr expr)
(UnfWhen { ug_arity = 0 -- Arity of unfolding doesn't matter
... | 390 | mkCompulsoryUnfolding expr -- Used for things that absolutely must be unfolded
= mkCoreUnfolding InlineCompulsory True
(simpleOptExpr expr)
(UnfWhen { ug_arity = 0 -- Arity of unfolding doesn't matter
, ug_unsat_ok = unSaturatedOk, ug_bor... | 343 | false | true | 0 | 8 | 122 | 58 | 33 | 25 | null | null |
rukokarasu/squigly-trace | src/Obj.hs | mit | mtllib :: Parser String
mtllib = string "mtllib" *> spaces *> word | 66 | mtllib :: Parser String
mtllib = string "mtllib" *> spaces *> word | 66 | mtllib = string "mtllib" *> spaces *> word | 42 | false | true | 4 | 6 | 11 | 35 | 15 | 20 | null | null |
rodrigogribeiro/mptc | src/Language/Haskell/Exts/Annotated/Syntax.hs | bsd-3-clause | star_name l = Symbol l "*" | 31 | star_name l = Symbol l "*" | 31 | star_name l = Symbol l "*" | 31 | false | false | 0 | 5 | 10 | 14 | 6 | 8 | null | null |
BlackBrane/quantum-random-numbers | src-lib/Quantum/Random/Display.hs | mit | binChar True = '1' | 19 | binChar True = '1' | 19 | binChar True = '1' | 19 | false | false | 0 | 5 | 4 | 9 | 4 | 5 | null | null |
prt2121/haskell-practice | cis194-s13/src/Golf.hs | apache-2.0 | zipWithIndex :: [a] -> [(Int, a)]
zipWithIndex [] = [] | 54 | zipWithIndex :: [a] -> [(Int, a)]
zipWithIndex [] = [] | 54 | zipWithIndex [] = [] | 20 | false | true | 0 | 9 | 9 | 40 | 20 | 20 | null | null |
derek-schaefer/haskell-classifier | src/Data/Classifier.hs | bsd-3-clause | categories :: Classifier -> [String]
categories cls = M.keys $ ccount cls | 73 | categories :: Classifier -> [String]
categories cls = M.keys $ ccount cls | 73 | categories cls = M.keys $ ccount cls | 36 | false | true | 0 | 6 | 11 | 30 | 15 | 15 | null | null |
uuhan/Idris-dev | src/Idris/Output.hs | bsd-3-clause | printUndefinedNames :: [Name] -> Doc OutputAnnotation
printUndefinedNames ns = text "Undefined " <> names <> text "."
where names = encloseSep empty empty (char ',') $ map ppName ns
ppName = prettyName True True [] | 224 | printUndefinedNames :: [Name] -> Doc OutputAnnotation
printUndefinedNames ns = text "Undefined " <> names <> text "."
where names = encloseSep empty empty (char ',') $ map ppName ns
ppName = prettyName True True [] | 224 | printUndefinedNames ns = text "Undefined " <> names <> text "."
where names = encloseSep empty empty (char ',') $ map ppName ns
ppName = prettyName True True [] | 170 | false | true | 2 | 8 | 44 | 96 | 40 | 56 | null | null |
thlorenz/WebToInk | webtoink-converter/WebToInk/Converter/HtmlPages.hs | bsd-2-clause | getHtmlNamesInRootFolder rootUrl = getSameFolderHtmls rootUrl . filterHrefs . parseTags | 87 | getHtmlNamesInRootFolder rootUrl = getSameFolderHtmls rootUrl . filterHrefs . parseTags | 87 | getHtmlNamesInRootFolder rootUrl = getSameFolderHtmls rootUrl . filterHrefs . parseTags | 87 | false | false | 0 | 7 | 8 | 20 | 9 | 11 | null | null |
rueshyna/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | Etag of this resource.
capEtag :: Lens' Caption (Maybe Text)
capEtag = lens _capEtag (\ s a -> s{_capEtag = a}) | 116 | capEtag :: Lens' Caption (Maybe Text)
capEtag = lens _capEtag (\ s a -> s{_capEtag = a}) | 88 | capEtag = lens _capEtag (\ s a -> s{_capEtag = a}) | 50 | true | true | 0 | 9 | 22 | 46 | 25 | 21 | null | null |
tel/xml-mapping | src/Text/XML/Mapping/Internal/Level.hs | mit | fmapL _ (Right a) = Right a | 27 | fmapL _ (Right a) = Right a | 27 | fmapL _ (Right a) = Right a | 27 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
brownsys/nettle-openflow | src/Nettle/IPv4/IPAddress.hs | bsd-3-clause | showPrefix :: IPAddressPrefix -> String
showPrefix (addr, len) = showOctets addr ++ "/" ++ show len | 99 | showPrefix :: IPAddressPrefix -> String
showPrefix (addr, len) = showOctets addr ++ "/" ++ show len | 99 | showPrefix (addr, len) = showOctets addr ++ "/" ++ show len | 59 | false | true | 0 | 7 | 15 | 38 | 19 | 19 | null | null |
rueshyna/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/DirectorySites/List.hs | mpl-2.0 | -- | Select only directory sites with these IDs.
dslIds :: Lens' DirectorySitesList [Int64]
dslIds
= lens _dslIds (\ s a -> s{_dslIds = a}) . _Default .
_Coerce | 168 | dslIds :: Lens' DirectorySitesList [Int64]
dslIds
= lens _dslIds (\ s a -> s{_dslIds = a}) . _Default .
_Coerce | 119 | dslIds
= lens _dslIds (\ s a -> s{_dslIds = a}) . _Default .
_Coerce | 76 | true | true | 1 | 11 | 36 | 55 | 28 | 27 | null | null |
ulrikrasmussen/BoxProver | src/Syntax.hs | mit | convertVarName :: M -> VarName
convertVarName (M [] (R (RVar x _) _)) = x | 73 | convertVarName :: M -> VarName
convertVarName (M [] (R (RVar x _) _)) = x | 73 | convertVarName (M [] (R (RVar x _) _)) = x | 42 | false | true | 0 | 11 | 14 | 44 | 22 | 22 | null | null |
haskell-works/kafka-client | src/Kafka/Consumer.hs | mit | setConsumerLogLevel :: KafkaConsumer -> KafkaLogLevel -> IO ()
setConsumerLogLevel (KafkaConsumer (Kafka k) _) level =
liftIO $ rdKafkaSetLogLevel k (fromEnum level) | 167 | setConsumerLogLevel :: KafkaConsumer -> KafkaLogLevel -> IO ()
setConsumerLogLevel (KafkaConsumer (Kafka k) _) level =
liftIO $ rdKafkaSetLogLevel k (fromEnum level) | 167 | setConsumerLogLevel (KafkaConsumer (Kafka k) _) level =
liftIO $ rdKafkaSetLogLevel k (fromEnum level) | 104 | false | true | 0 | 9 | 22 | 58 | 28 | 30 | null | null |
etarasov/iptables-helpers | src/Iptables/Parser.hs | bsd-3-clause | natIpPort :: GenParser Char st NatAddress
natIpPort = do
(ip1, ip2) <- try ( do
ip1 <- ipAddr
ip2 <- option ip1 (char '-' >> ipAddr)
char ':'
return (ip1, ip2)
)
port1S <- many1 digit
let port1 = read port1S
checkPort port1
port2S <- option port1S (char '-' >>... | 454 | natIpPort :: GenParser Char st NatAddress
natIpPort = do
(ip1, ip2) <- try ( do
ip1 <- ipAddr
ip2 <- option ip1 (char '-' >> ipAddr)
char ':'
return (ip1, ip2)
)
port1S <- many1 digit
let port1 = read port1S
checkPort port1
port2S <- option port1S (char '-' >>... | 454 | natIpPort = do
(ip1, ip2) <- try ( do
ip1 <- ipAddr
ip2 <- option ip1 (char '-' >> ipAddr)
char ':'
return (ip1, ip2)
)
port1S <- many1 digit
let port1 = read port1S
checkPort port1
port2S <- option port1S (char '-' >> many1 digit)
let port2 = read port2S
... | 412 | false | true | 0 | 16 | 144 | 179 | 79 | 100 | null | null |
tphyahoo/happs-tutorial | src/ControllerStressTests.hs | bsd-3-clause | serpinskiJobs = Jobs $ M.fromList $ map (\num -> ( JobName . B.pack $ "job" ++ (show num), Job ( B.pack "$0") ( B.pack "")) ) [10..203] | 136 | serpinskiJobs = Jobs $ M.fromList $ map (\num -> ( JobName . B.pack $ "job" ++ (show num), Job ( B.pack "$0") ( B.pack "")) ) [10..203] | 136 | serpinskiJobs = Jobs $ M.fromList $ map (\num -> ( JobName . B.pack $ "job" ++ (show num), Job ( B.pack "$0") ( B.pack "")) ) [10..203] | 136 | false | false | 0 | 13 | 27 | 81 | 42 | 39 | null | null |
cromo/deck-around-hs | DeckAroundCore.hs | mit | sampleGame = Game samplePlayers [sampleRound, sampleRound2] | 59 | sampleGame = Game samplePlayers [sampleRound, sampleRound2] | 59 | sampleGame = Game samplePlayers [sampleRound, sampleRound2] | 59 | false | false | 0 | 6 | 5 | 17 | 9 | 8 | null | null |
abakst/liquidhaskell | src/Language/Haskell/Liquid/UX/Annotate.hs | bsd-3-clause | isType = spacePrefix "type" | 27 | isType = spacePrefix "type" | 27 | isType = spacePrefix "type" | 27 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
lukexi/vr-pal | src/Graphics/VR/Pal/SDLUtils.hs | bsd-3-clause | createGLWindow :: MonadIO m => Text -> m Window
createGLWindow windowName = do
initialize
[ InitVideo
, InitEvents
-- , InitJoystick , InitGameController
]
-- Make Windows treat us as HighDPI aware
#if defined(mingw32_HOST_OS)
_ <- liftIO win32_SetProcessDpiAware
#endif
... | 809 | createGLWindow :: MonadIO m => Text -> m Window
createGLWindow windowName = do
initialize
[ InitVideo
, InitEvents
-- , InitJoystick , InitGameController
]
-- Make Windows treat us as HighDPI aware
#if defined(mingw32_HOST_OS)
_ <- liftIO win32_SetProcessDpiAware
#endif
... | 809 | createGLWindow windowName = do
initialize
[ InitVideo
, InitEvents
-- , InitJoystick , InitGameController
]
-- Make Windows treat us as HighDPI aware
#if defined(mingw32_HOST_OS)
_ <- liftIO win32_SetProcessDpiAware
#endif
window <- createWindow windowName defaultWindow... | 761 | false | true | 0 | 15 | 239 | 164 | 83 | 81 | null | null |
tolysz/hiccup | TclLib/Interp.hs | lgpl-2.1 | interpEvalStr :: BString -> Interp -> IO (Either BString BString)
interpEvalStr s i = runInterpStr (evalTcl (T.fromBStr s :: T.TclObj)) i | 137 | interpEvalStr :: BString -> Interp -> IO (Either BString BString)
interpEvalStr s i = runInterpStr (evalTcl (T.fromBStr s :: T.TclObj)) i | 137 | interpEvalStr s i = runInterpStr (evalTcl (T.fromBStr s :: T.TclObj)) i | 71 | false | true | 0 | 10 | 20 | 63 | 30 | 33 | null | null |
jprider63/yesod | yesod-core/Yesod/Core/Handler.hs | mit | notAuthenticated :: MonadHandler m => m a
notAuthenticated = hcError NotAuthenticated | 85 | notAuthenticated :: MonadHandler m => m a
notAuthenticated = hcError NotAuthenticated | 85 | notAuthenticated = hcError NotAuthenticated | 43 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
arnihermann/timedreb2erl | src/Language/Rebeca/Skelrebeca.hs | mit | transKnownRebecs :: KnownRebecs -> Result
transKnownRebecs x = case x of
NoKnownRebecs -> failure x
KnownRebecs typedvardecls -> failure x | 144 | transKnownRebecs :: KnownRebecs -> Result
transKnownRebecs x = case x of
NoKnownRebecs -> failure x
KnownRebecs typedvardecls -> failure x | 144 | transKnownRebecs x = case x of
NoKnownRebecs -> failure x
KnownRebecs typedvardecls -> failure x | 102 | false | true | 0 | 8 | 25 | 48 | 21 | 27 | null | null |
bartoszw/elca | BWLib.hs | gpl-2.0 | fstOf3 (a,b,c) = a | 19 | fstOf3 (a,b,c) = a | 19 | fstOf3 (a,b,c) = a | 19 | false | false | 0 | 5 | 4 | 19 | 10 | 9 | null | null |
ixmatus/grob | src/Network/HTTP/Robots.hs | bsd-3-clause | -- | @robotHandler@ Handle a response. Concactenate the body and
-- return the Response status and headers along with it.
robotHandler :: Response -> InputStream ByteString -> IO RobotResponse
robotHandler p i1 = do
i2 <- Streams.map Builder.fromByteString i1
x <- Streams.fold mappend mempty i2
return (s, (... | 502 | robotHandler :: Response -> InputStream ByteString -> IO RobotResponse
robotHandler p i1 = do
i2 <- Streams.map Builder.fromByteString i1
x <- Streams.fold mappend mempty i2
return (s, (hdr "Cache-Control", hdr "Expires"), Builder.toByteString x)
where
s = getStatusCode p
-- eas... | 380 | robotHandler p i1 = do
i2 <- Streams.map Builder.fromByteString i1
x <- Streams.fold mappend mempty i2
return (s, (hdr "Cache-Control", hdr "Expires"), Builder.toByteString x)
where
s = getStatusCode p
-- easy header getter
hdr x = fromMaybe "" $ getHeader p x | 309 | true | true | 1 | 10 | 119 | 127 | 61 | 66 | null | null |
dysinger/amazonka | amazonka-s3/gen/Network/AWS/S3/Types.hs | mpl-2.0 | tgGrantee :: Lens' TargetGrant (Maybe Grantee)
tgGrantee = lens _tgGrantee (\s a -> s { _tgGrantee = a }) | 105 | tgGrantee :: Lens' TargetGrant (Maybe Grantee)
tgGrantee = lens _tgGrantee (\s a -> s { _tgGrantee = a }) | 105 | tgGrantee = lens _tgGrantee (\s a -> s { _tgGrantee = a }) | 58 | false | true | 1 | 9 | 18 | 51 | 24 | 27 | null | null |
ku-fpg/kansas-amber | System/Hardware/Haskino/Data.hs | bsd-3-clause | firmwareValCmd 0x23 = BS_CMD_REQUEST_MILLIS | 43 | firmwareValCmd 0x23 = BS_CMD_REQUEST_MILLIS | 43 | firmwareValCmd 0x23 = BS_CMD_REQUEST_MILLIS | 43 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
cabrera/ghc-mod | test/TestUtils.hs | bsd-3-clause | -- | Run GhcMod in isolated cradle
runI :: Options -> GhcModT IO a -> IO a
runI = runIsolatedGhcMod | 99 | runI :: Options -> GhcModT IO a -> IO a
runI = runIsolatedGhcMod | 64 | runI = runIsolatedGhcMod | 24 | true | true | 0 | 7 | 19 | 28 | 14 | 14 | null | null |
fmapfmapfmap/amazonka | amazonka-opsworks/gen/Network/AWS/OpsWorks/Types/Product.hs | mpl-2.0 | -- | The cluster\'s ARN.
ecEcsClusterARN :: Lens' EcsCluster (Maybe Text)
ecEcsClusterARN = lens _ecEcsClusterARN (\ s a -> s{_ecEcsClusterARN = a}) | 148 | ecEcsClusterARN :: Lens' EcsCluster (Maybe Text)
ecEcsClusterARN = lens _ecEcsClusterARN (\ s a -> s{_ecEcsClusterARN = a}) | 123 | ecEcsClusterARN = lens _ecEcsClusterARN (\ s a -> s{_ecEcsClusterARN = a}) | 74 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
alexander-at-github/eta | compiler/ETA/Types/Type.hs | bsd-3-clause | splitFunTy_maybe :: Type -> Maybe (Type, Type)
-- ^ Attempts to extract the argument and result types from a type
splitFunTy_maybe ty | Just ty' <- coreView ty = splitFunTy_maybe ty' | 182 | splitFunTy_maybe :: Type -> Maybe (Type, Type)
splitFunTy_maybe ty | Just ty' <- coreView ty = splitFunTy_maybe ty' | 115 | splitFunTy_maybe ty | Just ty' <- coreView ty = splitFunTy_maybe ty' | 68 | true | true | 0 | 9 | 30 | 47 | 22 | 25 | null | null |
tomahawkins/improve | Language/ImProve/Path.hs | bsd-3-clause | dot :: Statement -> String
dot stmt = unlines $ ["digraph {"] ++ links ++ ["}"]
where
(_, _, links) = d 0 1 stmt | 116 | dot :: Statement -> String
dot stmt = unlines $ ["digraph {"] ++ links ++ ["}"]
where
(_, _, links) = d 0 1 stmt | 116 | dot stmt = unlines $ ["digraph {"] ++ links ++ ["}"]
where
(_, _, links) = d 0 1 stmt | 89 | false | true | 0 | 8 | 28 | 61 | 32 | 29 | null | null |
nsmryan/Misc | test/Test.hs | bsd-3-clause | main = defaultMain tests | 24 | main = defaultMain tests | 24 | main = defaultMain tests | 24 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
Chobbes/HaRay | src/HaRay/Rays.hs | mit | rayDir :: Exp Ray -> Exp Vec3
rayDir ray = Exp $ ZeroTupIdx `Prj` ray | 69 | rayDir :: Exp Ray -> Exp Vec3
rayDir ray = Exp $ ZeroTupIdx `Prj` ray | 69 | rayDir ray = Exp $ ZeroTupIdx `Prj` ray | 39 | false | true | 0 | 7 | 14 | 39 | 18 | 21 | null | null |
brunjlar/protop | src/Protop/Logic/Simple.hs | mit | cons :: Sig -> Scope
cons (Sig s) = Scope $ I.Cons s | 52 | cons :: Sig -> Scope
cons (Sig s) = Scope $ I.Cons s | 52 | cons (Sig s) = Scope $ I.Cons s | 31 | false | true | 0 | 7 | 12 | 37 | 17 | 20 | null | null |
zoomhub/zoomhub | vendor/servant/servant-server/test/Servant/ServerSpec.hs | mit | responseHeadersSpec :: Spec
responseHeadersSpec = describe "ResponseHeaders" $ do
with (return $ serve (Proxy :: Proxy ResponseHeadersApi) responseHeadersServer) $ do
let methods = [methodGet, methodPost, methodPut, methodPatch]
it "includes the headers in the response" $
forM_ methods $ \method ->
... | 1,098 | responseHeadersSpec :: Spec
responseHeadersSpec = describe "ResponseHeaders" $ do
with (return $ serve (Proxy :: Proxy ResponseHeadersApi) responseHeadersServer) $ do
let methods = [methodGet, methodPost, methodPut, methodPatch]
it "includes the headers in the response" $
forM_ methods $ \method ->
... | 1,098 | responseHeadersSpec = describe "ResponseHeaders" $ do
with (return $ serve (Proxy :: Proxy ResponseHeadersApi) responseHeadersServer) $ do
let methods = [methodGet, methodPost, methodPut, methodPatch]
it "includes the headers in the response" $
forM_ methods $ \method ->
THW.request method "/"... | 1,070 | false | true | 0 | 17 | 284 | 232 | 122 | 110 | null | null |
ghcjs/jsaddle-dom | src/JSDOM/Generated/HTMLAttachmentElement.hs | mit | -- | <https://developer.mozilla.org/en-US/docs/Web/API/HTMLAttachmentElement.file Mozilla HTMLAttachmentElement.file documentation>
getFileUnchecked :: (MonadDOM m) => HTMLAttachmentElement -> m File
getFileUnchecked self
= liftDOM ((self ^. js "file") >>= fromJSValUnchecked) | 279 | getFileUnchecked :: (MonadDOM m) => HTMLAttachmentElement -> m File
getFileUnchecked self
= liftDOM ((self ^. js "file") >>= fromJSValUnchecked) | 146 | getFileUnchecked self
= liftDOM ((self ^. js "file") >>= fromJSValUnchecked) | 78 | true | true | 0 | 10 | 27 | 51 | 26 | 25 | null | null |
rvion/ride | jetpack/src/Network/Wai/Middleware/RequestLogger/AsWai.hs | bsd-3-clause | get_wai_autoFlush o = I.autoFlush o | 35 | get_wai_autoFlush o = I.autoFlush o | 35 | get_wai_autoFlush o = I.autoFlush o | 35 | false | false | 1 | 6 | 4 | 17 | 6 | 11 | null | null |
brendanhay/gogol | gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Configs/Get.hs | mpl-2.0 | -- | Specifies which parts of the Service Config should be returned in the
-- response.
scgView :: Lens' ServicesConfigsGet (Maybe ServicesConfigsGetView)
scgView = lens _scgView (\ s a -> s{_scgView = a}) | 205 | scgView :: Lens' ServicesConfigsGet (Maybe ServicesConfigsGetView)
scgView = lens _scgView (\ s a -> s{_scgView = a}) | 117 | scgView = lens _scgView (\ s a -> s{_scgView = a}) | 50 | true | true | 0 | 9 | 32 | 47 | 26 | 21 | null | null |
GaloisInc/ivory-tower-posix | src/Ivory/OS/Posix/Tower/Serial.hs | bsd-3-clause | tcgetattr :: Def ('[FD, Ref s ('Struct "termios")] ':-> ())
tcgetattr = importProc "tcgetattr" "termios.h" | 106 | tcgetattr :: Def ('[FD, Ref s ('Struct "termios")] ':-> ())
tcgetattr = importProc "tcgetattr" "termios.h" | 106 | tcgetattr = importProc "tcgetattr" "termios.h" | 46 | false | true | 0 | 13 | 14 | 51 | 26 | 25 | null | null |
arekfu/funpart | test/Physics/FunPart/MCTest.hs | bsd-3-clause | anyPositive :: (Ord a, Num a) => PositiveVector a -> Bool
anyPositive (PositiveVector v) = V.any (>0) v | 103 | anyPositive :: (Ord a, Num a) => PositiveVector a -> Bool
anyPositive (PositiveVector v) = V.any (>0) v | 103 | anyPositive (PositiveVector v) = V.any (>0) v | 45 | false | true | 0 | 7 | 17 | 57 | 28 | 29 | null | null |
sgillespie/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | word64TyConName = tcQual gHC_WORD (fsLit "Word64") word64TyConKey | 68 | word64TyConName = tcQual gHC_WORD (fsLit "Word64") word64TyConKey | 68 | word64TyConName = tcQual gHC_WORD (fsLit "Word64") word64TyConKey | 68 | false | false | 0 | 7 | 9 | 19 | 9 | 10 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.