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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
alexander-at-github/eta | compiler/ETA/Main/Packages.hs | bsd-3-clause | reportUnusable :: DynFlags -> UnusablePackages -> IO ()
reportUnusable dflags pkgs = mapM_ report (Map.toList pkgs)
where
report (ipid, (_, reason)) =
debugTraceMsg dflags 2 $
pprReason
(ptext (sLit "package") <+>
ppr ipid <+> text "is") reason
-- --------------------------... | 694 | reportUnusable :: DynFlags -> UnusablePackages -> IO ()
reportUnusable dflags pkgs = mapM_ report (Map.toList pkgs)
where
report (ipid, (_, reason)) =
debugTraceMsg dflags 2 $
pprReason
(ptext (sLit "package") <+>
ppr ipid <+> text "is") reason
-- --------------------------... | 694 | reportUnusable dflags pkgs = mapM_ report (Map.toList pkgs)
where
report (ipid, (_, reason)) =
debugTraceMsg dflags 2 $
pprReason
(ptext (sLit "package") <+>
ppr ipid <+> text "is") reason
-- ----------------------------------------------------------------------------
--
--... | 638 | false | true | 0 | 12 | 139 | 112 | 59 | 53 | null | null |
termite2/bv | BV/Canonize.hs | bsd-3-clause | catomsConj :: [Either Bool CAtom] -> Either Bool [CAtom]
catomsConj = (\as -> if' (null as) (Left True) $
if' (any (== Left False) as) (Left False) (Right $ map fromRight as))
. filter (/= Left True) | 249 | catomsConj :: [Either Bool CAtom] -> Either Bool [CAtom]
catomsConj = (\as -> if' (null as) (Left True) $
if' (any (== Left False) as) (Left False) (Right $ map fromRight as))
. filter (/= Left True) | 249 | catomsConj = (\as -> if' (null as) (Left True) $
if' (any (== Left False) as) (Left False) (Right $ map fromRight as))
. filter (/= Left True) | 192 | false | true | 0 | 13 | 86 | 114 | 58 | 56 | null | null |
dmp1ce/DMSS | src-bin/dmssd.hs | unlicense | main :: IO ()
main = daemonMain | 31 | main :: IO ()
main = daemonMain | 31 | main = daemonMain | 17 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
eatobin/cis194 | lesson2/src/HW02.hs | bsd-3-clause | -- Exercise 4 -----------------------------------------
isConsistent :: Move -> Code -> Bool
isConsistent = undefined | 118 | isConsistent :: Move -> Code -> Bool
isConsistent = undefined | 61 | isConsistent = undefined | 24 | true | true | 0 | 6 | 14 | 20 | 11 | 9 | null | null |
olsner/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | gHC_TOP_HANDLER = mkBaseModule (fsLit "GHC.TopHandler") | 55 | gHC_TOP_HANDLER = mkBaseModule (fsLit "GHC.TopHandler") | 55 | gHC_TOP_HANDLER = mkBaseModule (fsLit "GHC.TopHandler") | 55 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
rueshyna/gogol | gogol-servicemanagement/gen/Network/Google/Resource/ServiceManagement/Services/Delete.hs | mpl-2.0 | -- | V1 error format.
sdXgafv :: Lens' ServicesDelete (Maybe Xgafv)
sdXgafv = lens _sdXgafv (\ s a -> s{_sdXgafv = a}) | 118 | sdXgafv :: Lens' ServicesDelete (Maybe Xgafv)
sdXgafv = lens _sdXgafv (\ s a -> s{_sdXgafv = a}) | 96 | sdXgafv = lens _sdXgafv (\ s a -> s{_sdXgafv = a}) | 50 | true | true | 0 | 9 | 21 | 46 | 25 | 21 | null | null |
reidwilbur/aoc2016 | src/Day7.hs | bsd-3-clause | getABAs _ = [] | 14 | getABAs _ = [] | 14 | getABAs _ = [] | 14 | false | false | 0 | 5 | 3 | 12 | 5 | 7 | null | null |
robrix/derivative-parsing | test/Derivative/Parser/Spec.hs | bsd-3-clause | sexprP :: Parser SexprT Sexpr
sexprP = parser $ Derivative.Parser.mu (\ a ->
Atom <$> match (\ t -> case t of { AtomT a -> Just a ; _ -> Nothing })
<|> List <$> (token OpenT *> many a) <* token CloseT) | 209 | sexprP :: Parser SexprT Sexpr
sexprP = parser $ Derivative.Parser.mu (\ a ->
Atom <$> match (\ t -> case t of { AtomT a -> Just a ; _ -> Nothing })
<|> List <$> (token OpenT *> many a) <* token CloseT) | 209 | sexprP = parser $ Derivative.Parser.mu (\ a ->
Atom <$> match (\ t -> case t of { AtomT a -> Just a ; _ -> Nothing })
<|> List <$> (token OpenT *> many a) <* token CloseT) | 179 | false | true | 0 | 19 | 51 | 102 | 52 | 50 | null | null |
beni55/ghcjs | test/ghc/perf/t4474a.hs | mit | flatListNaive (Leaf n) = [n] | 30 | flatListNaive (Leaf n) = [n] | 30 | flatListNaive (Leaf n) = [n] | 30 | false | false | 0 | 7 | 6 | 18 | 9 | 9 | null | null |
grnet/snf-ganeti | src/Ganeti/Query/Query.hs | bsd-2-clause | queryFields (QueryFields qkind _) =
Bad . GenericError $ "QueryFields '" ++ show qkind ++ "' not supported" | 109 | queryFields (QueryFields qkind _) =
Bad . GenericError $ "QueryFields '" ++ show qkind ++ "' not supported" | 109 | queryFields (QueryFields qkind _) =
Bad . GenericError $ "QueryFields '" ++ show qkind ++ "' not supported" | 109 | false | false | 1 | 7 | 19 | 38 | 17 | 21 | null | null |
AlexanderPankiv/ghc | compiler/prelude/TysWiredIn.hs | bsd-3-clause | ipClass :: Class
ipClass = mkClass (tyConTyVars ipTyCon) [([ip], [a])] [] [] [] [] (mkAnd [])
ipTyCon
where
[ip, a] = tyConTyVars ipTyCon
-- this is a fake version of the CallStack TyCon so we can refer to it
-- in MkCore.errorTy | 248 | ipClass :: Class
ipClass = mkClass (tyConTyVars ipTyCon) [([ip], [a])] [] [] [] [] (mkAnd [])
ipTyCon
where
[ip, a] = tyConTyVars ipTyCon
-- this is a fake version of the CallStack TyCon so we can refer to it
-- in MkCore.errorTy | 248 | ipClass = mkClass (tyConTyVars ipTyCon) [([ip], [a])] [] [] [] [] (mkAnd [])
ipTyCon
where
[ip, a] = tyConTyVars ipTyCon
-- this is a fake version of the CallStack TyCon so we can refer to it
-- in MkCore.errorTy | 231 | false | true | 0 | 8 | 60 | 94 | 47 | 47 | null | null |
nishiuramakoto/erasm-plusplus | src/haskell/EncodedInstructionDefinition.hs | gpl-3.0 | updateOperands :: [OperandType] -> EncodedInstructionDefinition
-> EncodedInstructionDefinition
updateOperands ps e = updatePrototype (Prototype m ps) e
where m = mnemonic e | 191 | updateOperands :: [OperandType] -> EncodedInstructionDefinition
-> EncodedInstructionDefinition
updateOperands ps e = updatePrototype (Prototype m ps) e
where m = mnemonic e | 191 | updateOperands ps e = updatePrototype (Prototype m ps) e
where m = mnemonic e | 80 | false | true | 0 | 7 | 38 | 51 | 25 | 26 | null | null |
snapframework/heist | src/Heist/Compiled/Internal.hs | bsd-3-clause | ------------------------------------------------------------------------------
-- | A convenience wrapper around yieldPure for working with Text. Roughly
-- equivalent to 'textSplice' from Heist.Interpreted.
yieldPureText :: Text -> DList (Chunk n)
yieldPureText = DL.singleton . pureTextChunk | 294 | yieldPureText :: Text -> DList (Chunk n)
yieldPureText = DL.singleton . pureTextChunk | 85 | yieldPureText = DL.singleton . pureTextChunk | 44 | true | true | 1 | 9 | 31 | 40 | 19 | 21 | null | null |
fugyk/cabal | Cabal/Distribution/Simple/Program/HcPkg.hs | bsd-3-clause | packageDbOpts :: HcPkgInfo -> PackageDB -> String
packageDbOpts _ GlobalPackageDB = "--global" | 101 | packageDbOpts :: HcPkgInfo -> PackageDB -> String
packageDbOpts _ GlobalPackageDB = "--global" | 101 | packageDbOpts _ GlobalPackageDB = "--global" | 51 | false | true | 0 | 6 | 18 | 24 | 12 | 12 | null | null |
ghc-android/ghc | compiler/deSugar/Coverage.hs | bsd-3-clause | addTickArithSeqInfo :: ArithSeqInfo Id -> TM (ArithSeqInfo Id)
addTickArithSeqInfo (From e1) =
liftM From
(addTickLHsExpr e1) | 149 | addTickArithSeqInfo :: ArithSeqInfo Id -> TM (ArithSeqInfo Id)
addTickArithSeqInfo (From e1) =
liftM From
(addTickLHsExpr e1) | 149 | addTickArithSeqInfo (From e1) =
liftM From
(addTickLHsExpr e1) | 86 | false | true | 0 | 8 | 39 | 47 | 22 | 25 | null | null |
urbanslug/ghc | testsuite/tests/cabal/cabal05/q/Q.hs | bsd-3-clause | q = not p | 9 | q = not p | 9 | q = not p | 9 | false | false | 1 | 5 | 3 | 12 | 4 | 8 | null | null |
mietek/catools | src/caparse.hs | bsd-3-clause | --------------------------------------------------------------------------------
main :: IO ()
main = do
csv <- L.getContents
doTxns (decode NoHeader csv) | 163 | main :: IO ()
main = do
csv <- L.getContents
doTxns (decode NoHeader csv) | 81 | main = do
csv <- L.getContents
doTxns (decode NoHeader csv) | 67 | true | true | 0 | 9 | 23 | 40 | 19 | 21 | null | null |
haskellbr/missingh | missingh-all/src/System/Debian/ControlParser.hs | mit | entry :: GenParser Char st (String, String)
entry = do key <- many1 (noneOf ":\r\n")
char ':'
val <- many (noneOf "\r\n")
eol
exts <- many extline
return (key, unlines ([val] ++ exts))
{- | Main parser for the control file -} | 281 | entry :: GenParser Char st (String, String)
entry = do key <- many1 (noneOf ":\r\n")
char ':'
val <- many (noneOf "\r\n")
eol
exts <- many extline
return (key, unlines ([val] ++ exts))
{- | Main parser for the control file -} | 281 | entry = do key <- many1 (noneOf ":\r\n")
char ':'
val <- many (noneOf "\r\n")
eol
exts <- many extline
return (key, unlines ([val] ++ exts))
{- | Main parser for the control file -} | 237 | false | true | 0 | 12 | 97 | 101 | 48 | 53 | null | null |
apyrgio/ganeti | test/hs/Test/Ganeti/TestHelper.hs | bsd-2-clause | conInfo (RecC name t) = (name, map (\(_, _, x) -> x) t) | 62 | conInfo (RecC name t) = (name, map (\(_, _, x) -> x) t) | 62 | conInfo (RecC name t) = (name, map (\(_, _, x) -> x) t) | 62 | false | false | 0 | 9 | 19 | 45 | 25 | 20 | null | null |
spechub/Hets | MMT/XMLtoPT.hs | gpl-2.0 | parseDeclR :: Element -> Result Decl
parseDeclR e = let
chil = elChildren e
chilR = mapM parseTreeR chil
in
case maybeResult chilR of
(Just r) -> Result
(diags chilR)
(Just (Decl
... | 481 | parseDeclR :: Element -> Result Decl
parseDeclR e = let
chil = elChildren e
chilR = mapM parseTreeR chil
in
case maybeResult chilR of
(Just r) -> Result
(diags chilR)
(Just (Decl
... | 481 | parseDeclR e = let
chil = elChildren e
chilR = mapM parseTreeR chil
in
case maybeResult chilR of
(Just r) -> Result
(diags chilR)
(Just (Decl
(getAttByName "pat... | 444 | false | true | 0 | 16 | 252 | 127 | 60 | 67 | null | null |
ezyang/ghc | compiler/utils/Outputable.hs | bsd-3-clause | sdocWithPlatform :: (Platform -> SDoc) -> SDoc
sdocWithPlatform f = sdocWithDynFlags (f . targetPlatform) | 105 | sdocWithPlatform :: (Platform -> SDoc) -> SDoc
sdocWithPlatform f = sdocWithDynFlags (f . targetPlatform) | 105 | sdocWithPlatform f = sdocWithDynFlags (f . targetPlatform) | 58 | false | true | 0 | 7 | 13 | 35 | 18 | 17 | null | null |
apyrgio/ganeti | src/Ganeti/Locking/Waiting.hs | bsd-2-clause | manipulateLocksPredicate :: (Lock a, Ord b, Ord c)
=> (a -> L.LockRequest a)
-> (a -> Bool)
-> b
-> LockWaiting a b c -> (LockWaiting a b c, S.Set b)
manipulateLocksPredicate req prop owner state =
second snd . flip (u... | 455 | manipulateLocksPredicate :: (Lock a, Ord b, Ord c)
=> (a -> L.LockRequest a)
-> (a -> Bool)
-> b
-> LockWaiting a b c -> (LockWaiting a b c, S.Set b)
manipulateLocksPredicate req prop owner state =
second snd . flip (u... | 455 | manipulateLocksPredicate req prop owner state =
second snd . flip (updateLocks owner) (removePendingRequest owner state)
. map req . filter prop . M.keys
. L.listLocks owner $ getAllocation state | 205 | false | true | 2 | 12 | 169 | 165 | 79 | 86 | null | null |
urbanslug/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | {-
************************************************************************
* *
Any
* *
************************************************************************
Note... | 2,649 | anyTyConName :: Name
anyTyConName = mkPrimTc (fsLit "Any") anyTyConKey anyTyCon | 79 | anyTyConName = mkPrimTc (fsLit "Any") anyTyConKey anyTyCon | 58 | true | true | 0 | 7 | 717 | 25 | 13 | 12 | null | null |
rolph-recto/liquid-fixpoint | src/Language/Fixpoint/Partition.hs | bsd-3-clause | cycleDep :: (Cutable a) => Cutter a -> [(a,a,[a])] -> GDeps a
cycleDep _ [] = mempty | 84 | cycleDep :: (Cutable a) => Cutter a -> [(a,a,[a])] -> GDeps a
cycleDep _ [] = mempty | 84 | cycleDep _ [] = mempty | 22 | false | true | 0 | 10 | 16 | 56 | 30 | 26 | null | null |
mihaimaruseac/blog-demos | brainfsck/bf.hs | mit | parseDummy' ps p ('<':ss) = DP : parseDummy' ps (p + 1) ss | 58 | parseDummy' ps p ('<':ss) = DP : parseDummy' ps (p + 1) ss | 58 | parseDummy' ps p ('<':ss) = DP : parseDummy' ps (p + 1) ss | 58 | false | false | 0 | 8 | 12 | 41 | 19 | 22 | null | null |
olsner/ghc | utils/genapply/Main.hs | bsd-3-clause | argSize P = 1 | 15 | argSize P = 1 | 15 | argSize P = 1 | 15 | false | false | 1 | 5 | 5 | 13 | 4 | 9 | null | null |
Paulo-Janrain/timeparsers | Data/Time/Parsers/Timestamp.hs | bsd-3-clause | namedTimeZone' :: Bool -> Parser TimeZone
namedTimeZone' aussie = (lookup' <$> takeWhile isAlpha_ascii) >>=
maybe (fail "Invalid TimeZone") return
where
lookup' = if aussie then lookupAusTimeZone else lookupTimeZone
-- | Parse a rational number and interpret as seconds since the Epoch | 316 | namedTimeZone' :: Bool -> Parser TimeZone
namedTimeZone' aussie = (lookup' <$> takeWhile isAlpha_ascii) >>=
maybe (fail "Invalid TimeZone") return
where
lookup' = if aussie then lookupAusTimeZone else lookupTimeZone
-- | Parse a rational number and interpret as seconds since the Epoch | 316 | namedTimeZone' aussie = (lookup' <$> takeWhile isAlpha_ascii) >>=
maybe (fail "Invalid TimeZone") return
where
lookup' = if aussie then lookupAusTimeZone else lookupTimeZone
-- | Parse a rational number and interpret as seconds since the Epoch | 274 | false | true | 1 | 8 | 71 | 72 | 33 | 39 | null | null |
uduki/hsQt | Qtc/Gui/QTextFrameFormat.hs | bsd-2-clause | setBorderBrush :: QTextFrameFormat a -> ((QBrush t1)) -> IO ()
setBorderBrush x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
withObjectPtr x1 $ \cobj_x1 ->
qtc_QTextFrameFormat_setBorderBrush cobj_x0 cobj_x1 | 211 | setBorderBrush :: QTextFrameFormat a -> ((QBrush t1)) -> IO ()
setBorderBrush x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
withObjectPtr x1 $ \cobj_x1 ->
qtc_QTextFrameFormat_setBorderBrush cobj_x0 cobj_x1 | 211 | setBorderBrush x0 (x1)
= withObjectPtr x0 $ \cobj_x0 ->
withObjectPtr x1 $ \cobj_x1 ->
qtc_QTextFrameFormat_setBorderBrush cobj_x0 cobj_x1 | 148 | false | true | 4 | 10 | 36 | 80 | 37 | 43 | null | null |
demhydraz/waffle | src/Core/Lower.hs | bsd-3-clause | lowerLiteral (A.LString s) = C.LString s | 40 | lowerLiteral (A.LString s) = C.LString s | 40 | lowerLiteral (A.LString s) = C.LString s | 40 | false | false | 0 | 8 | 5 | 22 | 10 | 12 | null | null |
MasseR/Shopping-list | Data/ShoppingList.hs | bsd-3-clause | disable :: Text -> ShoppingList -> ShoppingList
disable x (S s) = S $ M.update (const (Just 0)) (titleCase x) s | 112 | disable :: Text -> ShoppingList -> ShoppingList
disable x (S s) = S $ M.update (const (Just 0)) (titleCase x) s | 112 | disable x (S s) = S $ M.update (const (Just 0)) (titleCase x) s | 63 | false | true | 2 | 10 | 21 | 67 | 31 | 36 | null | null |
phaazon/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Tokens.hs | bsd-3-clause | gl_UNPACK_CMYK_HINT_EXT :: GLenum
gl_UNPACK_CMYK_HINT_EXT = 0x800F | 66 | gl_UNPACK_CMYK_HINT_EXT :: GLenum
gl_UNPACK_CMYK_HINT_EXT = 0x800F | 66 | gl_UNPACK_CMYK_HINT_EXT = 0x800F | 32 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
michalkonecny/aern2 | aern2-mfun/src/AERN2/BoxFunMinMax/Expressions/Parsers/Lisp/DataTypes.hs | bsd-3-clause | -- Helper functions for pair manipulation.
pairToList :: Expression -> [Expression]
pairToList Null = [] | 104 | pairToList :: Expression -> [Expression]
pairToList Null = [] | 61 | pairToList Null = [] | 20 | true | true | 0 | 6 | 14 | 24 | 13 | 11 | null | null |
ribag/ganeti-experiments | src/Ganeti/Jobs.hs | gpl-2.0 | submitJobs :: [[MetaOpCode]] -> L.Client -> IO (Result [L.JobId])
submitJobs opcodes client = do
jids <- L.submitManyJobs client opcodes
return (case jids of
Bad e -> Bad $ "Job submission error: " ++ formatError e
Ok jids' -> Ok jids')
-- | Executes a set of jobs and waits for their com... | 355 | submitJobs :: [[MetaOpCode]] -> L.Client -> IO (Result [L.JobId])
submitJobs opcodes client = do
jids <- L.submitManyJobs client opcodes
return (case jids of
Bad e -> Bad $ "Job submission error: " ++ formatError e
Ok jids' -> Ok jids')
-- | Executes a set of jobs and waits for their com... | 355 | submitJobs opcodes client = do
jids <- L.submitManyJobs client opcodes
return (case jids of
Bad e -> Bad $ "Job submission error: " ++ formatError e
Ok jids' -> Ok jids')
-- | Executes a set of jobs and waits for their completion, returning their
-- status. | 289 | false | true | 0 | 13 | 87 | 107 | 52 | 55 | null | null |
mcschroeder/social-example | social2/SocialDB.hs | mit | getUser :: UserName -> TX SocialDB User
getUser name = do
db <- getData
liftSTM $ do
user <- Map.lookup name (users db)
case user of
Just user -> return user
Nothing -> throwSTM (UserNotFound name) | 247 | getUser :: UserName -> TX SocialDB User
getUser name = do
db <- getData
liftSTM $ do
user <- Map.lookup name (users db)
case user of
Just user -> return user
Nothing -> throwSTM (UserNotFound name) | 247 | getUser name = do
db <- getData
liftSTM $ do
user <- Map.lookup name (users db)
case user of
Just user -> return user
Nothing -> throwSTM (UserNotFound name) | 207 | false | true | 0 | 15 | 85 | 91 | 41 | 50 | null | null |
yjwen/hada | test/Test.hs | lgpl-3.0 | test1 :: (Random a, Show a, Eq b, Show b) => (a -> b) -> (a -> IO b) -> IO (Maybe String)
test1 goldenF testF = fmap (fmap show) $ runTest1 goldenF testF | 153 | test1 :: (Random a, Show a, Eq b, Show b) => (a -> b) -> (a -> IO b) -> IO (Maybe String)
test1 goldenF testF = fmap (fmap show) $ runTest1 goldenF testF | 153 | test1 goldenF testF = fmap (fmap show) $ runTest1 goldenF testF | 63 | false | true | 0 | 10 | 33 | 95 | 47 | 48 | null | null |
flatrapp/core | app/Web/Endpoints/Auth.hs | apache-2.0 | -- |The secret key with which the key is signed
jwtSecret :: Text
jwtSecret = "6QQf4YsgAmyJzZFipkC5sMIXMI4hccbqdF8rmlcN" | 120 | jwtSecret :: Text
jwtSecret = "6QQf4YsgAmyJzZFipkC5sMIXMI4hccbqdF8rmlcN" | 72 | jwtSecret = "6QQf4YsgAmyJzZFipkC5sMIXMI4hccbqdF8rmlcN" | 54 | true | true | 0 | 4 | 15 | 12 | 7 | 5 | null | null |
grnet/snf-ganeti | src/Ganeti/WConfd/Core.hs | bsd-2-clause | -- | Commit all reserved/released IP address to an IP pool.
-- The IP addresses are taken from the network's IP pool and marked as
-- reserved/free for instances.
--
-- Note that the reservations are kept, they are supposed to be cleaned
-- when a job finishes.
commitTemporaryIps :: ClientId -> WConfdMonad ()
commitTem... | 374 | commitTemporaryIps :: ClientId -> WConfdMonad ()
commitTemporaryIps = modifyConfigDataErr_ . T.commitReservedIps | 112 | commitTemporaryIps = modifyConfigDataErr_ . T.commitReservedIps | 63 | true | true | 0 | 7 | 58 | 32 | 19 | 13 | null | null |
amutake/andon-yesod | Andon/Gallery.hs | bsd-2-clause | classImages :: Class -> [FilePath]
classImages = (map toAbsolutePath) . takeImages . classDirectory | 99 | classImages :: Class -> [FilePath]
classImages = (map toAbsolutePath) . takeImages . classDirectory | 99 | classImages = (map toAbsolutePath) . takeImages . classDirectory | 64 | false | true | 0 | 8 | 12 | 32 | 17 | 15 | null | null |
input-output-hk/pos-haskell-prototype | chain/src/Pos/Chain/Ssc/VssCertData.hs | mit | setLastKnownSlot :: SlotId -> VssCertData -> VssCertData
setLastKnownSlot = setLastKnownEoS . EpochOrSlot . Right | 113 | setLastKnownSlot :: SlotId -> VssCertData -> VssCertData
setLastKnownSlot = setLastKnownEoS . EpochOrSlot . Right | 113 | setLastKnownSlot = setLastKnownEoS . EpochOrSlot . Right | 56 | false | true | 0 | 6 | 13 | 27 | 14 | 13 | null | null |
ekmett/wxHaskell | wx/src/Graphics/UI/WX/Menu.hs | lgpl-2.1 | -- | Append a menu item. The label can contain
-- menu accellerators by using an ampersand. It can also contain keyboard accellerators
-- after a tab (@'\\t'@) character.
--
-- > menuItem menu [text := "&Open\tCtrl+O", help := "Opens an existing document"]
--
-- You can create a checkable menu item by setting 'checkab... | 1,345 | menuItem :: Menu a -> [Prop (MenuItem ())] -> IO (MenuItem ())
menuItem menu props
= do let kind = case (findProperty checkable False props) of
Just (True,_) -> wxITEM_CHECK
_ -> wxITEM_NORMAL
menuItemKind menu kind props
-- | Append a r... | 760 | menuItem menu props
= do let kind = case (findProperty checkable False props) of
Just (True,_) -> wxITEM_CHECK
_ -> wxITEM_NORMAL
menuItemKind menu kind props
-- | Append a radio menu item. These items are 'checkable' by default.
-- A se... | 697 | true | true | 0 | 15 | 300 | 133 | 74 | 59 | null | null |
reenberg/xmonad | XMonad/Core.hs | bsd-3-clause | getXMonadDir :: MonadIO m => m String
getXMonadDir = io $ getAppUserDataDirectory "xmonad" | 90 | getXMonadDir :: MonadIO m => m String
getXMonadDir = io $ getAppUserDataDirectory "xmonad" | 90 | getXMonadDir = io $ getAppUserDataDirectory "xmonad" | 52 | false | true | 0 | 7 | 12 | 33 | 14 | 19 | null | null |
wuxb45/Haskell-RBTree | Data/Tree/RBTree.hs | bsd-3-clause | -- |convert a zip to tree.
toTree :: RBZip a -> RBTree a
toTree z = tree
where (RBZip tree _) = topMostZip z
-- |Zip up. | 125 | toTree :: RBZip a -> RBTree a
toTree z = tree
where (RBZip tree _) = topMostZip z
-- |Zip up. | 98 | toTree z = tree
where (RBZip tree _) = topMostZip z
-- |Zip up. | 68 | true | true | 0 | 7 | 31 | 45 | 22 | 23 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/cabal-install/Distribution/Client/Config.hs | bsd-3-clause | liftUserInstallDirs :: FieldDescr (InstallDirs (Flag PathTemplate))
-> FieldDescr SavedConfig
liftUserInstallDirs = liftField
savedUserInstallDirs (\flags conf -> conf { savedUserInstallDirs = flags }) | 223 | liftUserInstallDirs :: FieldDescr (InstallDirs (Flag PathTemplate))
-> FieldDescr SavedConfig
liftUserInstallDirs = liftField
savedUserInstallDirs (\flags conf -> conf { savedUserInstallDirs = flags }) | 223 | liftUserInstallDirs = liftField
savedUserInstallDirs (\flags conf -> conf { savedUserInstallDirs = flags }) | 109 | false | true | 0 | 10 | 43 | 57 | 29 | 28 | null | null |
redneb/hubic-auth-swift | src/Hubic.hs | agpl-3.0 | getEndpoint
:: Manager
-> ByteString
-> ByteString
-> ByteString
-> IO (Text, Text, Int)
getEndpoint man client_id client_secret refresh_token = do
access_token <- getAccessToken man client_id client_secret refresh_token
let auth = "Bearer " <> access_token
req0 <- parseUrlThrow "https:/... | 927 | getEndpoint
:: Manager
-> ByteString
-> ByteString
-> ByteString
-> IO (Text, Text, Int)
getEndpoint man client_id client_secret refresh_token = do
access_token <- getAccessToken man client_id client_secret refresh_token
let auth = "Bearer " <> access_token
req0 <- parseUrlThrow "https:/... | 927 | getEndpoint man client_id client_secret refresh_token = do
access_token <- getAccessToken man client_id client_secret refresh_token
let auth = "Bearer " <> access_token
req0 <- parseUrlThrow "https://api.hubic.com/1.0/account/credentials"
let req = req0
{ requestHeaders = ("Authorization", a... | 818 | false | true | 0 | 18 | 254 | 266 | 129 | 137 | null | null |
forsyde/forsyde-shallow | src/ForSyDe/Shallow/Utility/Matrix.hs | bsd-3-clause | wellFormedMat m@(_:>NullV) = m | 30 | wellFormedMat m@(_:>NullV) = m | 30 | wellFormedMat m@(_:>NullV) = m | 30 | false | false | 0 | 8 | 3 | 19 | 10 | 9 | null | null |
nomeata/ghc | compiler/main/DynFlags.hs | bsd-3-clause | pgm_T :: DynFlags -> String
pgm_T dflags = sPgm_T (settings dflags) | 83 | pgm_T :: DynFlags -> String
pgm_T dflags = sPgm_T (settings dflags) | 83 | pgm_T dflags = sPgm_T (settings dflags) | 39 | false | true | 0 | 7 | 26 | 27 | 13 | 14 | null | null |
input-output-hk/pos-haskell-prototype | db/test/Test/Pos/DB/Functions.hs | mit | tests :: IO Bool
tests = checkSequential $$(discover) | 53 | tests :: IO Bool
tests = checkSequential $$(discover) | 53 | tests = checkSequential $$(discover) | 36 | false | true | 0 | 7 | 7 | 26 | 11 | 15 | null | null |
green-haskell/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | toSlowEntryLbl l = pprPanic "toSlowEntryLbl" (ppr l) | 52 | toSlowEntryLbl l = pprPanic "toSlowEntryLbl" (ppr l) | 52 | toSlowEntryLbl l = pprPanic "toSlowEntryLbl" (ppr l) | 52 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
AubreyEAnderson/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkUnused12= verifyNotTree checkUnusedAssignments "read foo; echo ${!foo}" | 81 | prop_checkUnused12= verifyNotTree checkUnusedAssignments "read foo; echo ${!foo}" | 81 | prop_checkUnused12= verifyNotTree checkUnusedAssignments "read foo; echo ${!foo}" | 81 | false | false | 0 | 5 | 6 | 11 | 5 | 6 | null | null |
nh2/shake | Development/Shake/Sys.hs | bsd-3-clause | -- | A variable arity version of 'system''.
sys :: SysArguments v => String -> v :-> Action ()
sys x = sys_ [] x | 112 | sys :: SysArguments v => String -> v :-> Action ()
sys x = sys_ [] x | 68 | sys x = sys_ [] x | 17 | true | true | 0 | 9 | 24 | 42 | 20 | 22 | null | null |
teuffy/interactive-brokers | library/API/IB/Request.hs | bsd-3-clause | -- -----------------------------------------------------------------------------
createRequestContractDataMsg :: Int -> Int -> IBContract -> Msg
createRequestContractDataMsg sversion requestid IBContract{..} =
return $ ibMsgConcat 7 ReqContractDataT
[ [ intDec requestid
, intDec _conId
, stringUtf8 _... | 887 | createRequestContractDataMsg :: Int -> Int -> IBContract -> Msg
createRequestContractDataMsg sversion requestid IBContract{..} =
return $ ibMsgConcat 7 ReqContractDataT
[ [ intDec requestid
, intDec _conId
, stringUtf8 _conSymbol
, bEncode _conSecType
, stringUtf8 (maybe "" ibFormatDay _co... | 805 | createRequestContractDataMsg sversion requestid IBContract{..} =
return $ ibMsgConcat 7 ReqContractDataT
[ [ intDec requestid
, intDec _conId
, stringUtf8 _conSymbol
, bEncode _conSecType
, stringUtf8 (maybe "" ibFormatDay _conExpiry)
, buildDecimal _conStrike
, stringUtf8 (may... | 741 | true | true | 2 | 10 | 200 | 209 | 104 | 105 | null | null |
keithodulaigh/Hets | CspCASLProver/TransProcesses.hs | gpl-2.0 | {- | Translate a CASL term into an Isabelle term. The result of this function
depends on the term target. a target of TermPrefix indicates we must land
in the alphabet and have a flat constructor wrapped around the
translation. A ChanSendOrParam indicates that the translated term will be
used in a channel send operator... | 3,946 | transCASLTerm :: CASL_Sign.Sign () () -> CASL_Sign.Sign () () ->
CASL_Sign.Sign () () -> VSM -> TermTarget ->
CASL_AS_Basic_CASL.TERM () -> Term
transCASLTerm caslSign pcfolSign cfolSign vsm termTarget caslTerm =
let strs = CFOL2IsabelleHOL.getAssumpsToks caslSign
{- We make a ... | 3,508 | transCASLTerm caslSign pcfolSign cfolSign vsm termTarget caslTerm =
let strs = CFOL2IsabelleHOL.getAssumpsToks caslSign
{- We make a case on the type of term, then on the term target, then if we
have a variable we make a case on the source of the variable -}
in case caslTerm of
-- Variable
... | 3,329 | true | true | 0 | 23 | 1,573 | 459 | 220 | 239 | null | null |
dimara/ganeti | src/Ganeti/HTools/Instance.hs | bsd-2-clause | -- | Checks if an instance is smaller/bigger than a given spec. Returns
-- OpGood for a correct spec, otherwise Bad one of the possible
-- failure modes.
instCompareISpec :: Ordering -> Instance-> T.ISpec -> Bool -> T.OpResult ()
instCompareISpec which inst ispec exclstor
| which == mem inst `compare` T.iSpecMemorySi... | 944 | instCompareISpec :: Ordering -> Instance-> T.ISpec -> Bool -> T.OpResult ()
instCompareISpec which inst ispec exclstor
| which == mem inst `compare` T.iSpecMemorySize ispec = Bad T.FailMem
| which `elem` map ((`compare` T.iSpecDiskSize ispec) . dskSize)
(disks inst) = Bad T.FailDisk
| which == vcpus inst `com... | 790 | instCompareISpec which inst ispec exclstor
| which == mem inst `compare` T.iSpecMemorySize ispec = Bad T.FailMem
| which `elem` map ((`compare` T.iSpecDiskSize ispec) . dskSize)
(disks inst) = Bad T.FailDisk
| which == vcpus inst `compare` T.iSpecCpuCount ispec = Bad T.FailCPU
| exclstor &&
case getTota... | 714 | true | true | 1 | 14 | 187 | 325 | 158 | 167 | null | null |
JamesSullivan1/Mpp | src/MppCodeGen.hs | mit | gen_stmt (I_PRINT_C e) l
= (gen_expr e
++ "\tPRINT_C\n",
l) | 72 | gen_stmt (I_PRINT_C e) l
= (gen_expr e
++ "\tPRINT_C\n",
l) | 72 | gen_stmt (I_PRINT_C e) l
= (gen_expr e
++ "\tPRINT_C\n",
l) | 72 | false | false | 0 | 7 | 22 | 30 | 15 | 15 | null | null |
sisirkoppaka/brick | src/Brick/Types.hs | bsd-3-clause | lookupAttrName :: AttrName -> RenderM Attr
lookupAttrName n = do
c <- getContext
return $ attrMapLookup n (c^.ctxAttrMapL) | 130 | lookupAttrName :: AttrName -> RenderM Attr
lookupAttrName n = do
c <- getContext
return $ attrMapLookup n (c^.ctxAttrMapL) | 130 | lookupAttrName n = do
c <- getContext
return $ attrMapLookup n (c^.ctxAttrMapL) | 87 | false | true | 0 | 10 | 25 | 47 | 22 | 25 | null | null |
rueshyna/gogol | gogol-dfareporting/gen/Network/Google/Resource/DFAReporting/Creatives/List.hs | mpl-2.0 | -- | Value of the nextPageToken from the previous result page.
cPageToken :: Lens' CreativesList (Maybe Text)
cPageToken
= lens _cPageToken (\ s a -> s{_cPageToken = a}) | 171 | cPageToken :: Lens' CreativesList (Maybe Text)
cPageToken
= lens _cPageToken (\ s a -> s{_cPageToken = a}) | 108 | cPageToken
= lens _cPageToken (\ s a -> s{_cPageToken = a}) | 61 | true | true | 0 | 9 | 29 | 48 | 25 | 23 | null | null |
mapinguari/SC_HS_Proxy | src/Proxy/Query/Unit.hs | mit | supplyProvided TerranRefinery = 0 | 33 | supplyProvided TerranRefinery = 0 | 33 | supplyProvided TerranRefinery = 0 | 33 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
sgillespie/ghc | compiler/basicTypes/OccName.hs | bsd-3-clause | mkRepEqOcc = mk_simple_deriv tvName "$r" | 51 | mkRepEqOcc = mk_simple_deriv tvName "$r" | 51 | mkRepEqOcc = mk_simple_deriv tvName "$r" | 51 | false | false | 0 | 5 | 15 | 11 | 5 | 6 | null | null |
gallais/potpourri | haskell/hsubst/HSubst.hs | gpl-3.0 | elimNf nf ElimPr2 = proj2 nf | 43 | elimNf nf ElimPr2 = proj2 nf | 43 | elimNf nf ElimPr2 = proj2 nf | 43 | false | false | 0 | 5 | 20 | 14 | 6 | 8 | null | null |
ezyang/ghc | compiler/nativeGen/RegAlloc/Liveness.hs | bsd-3-clause | regLiveness platform (CmmProc info lbl live sccs)
| LiveInfo static mFirst _ liveSlotsOnEntry <- info
= let (ann_sccs, block_live) = computeLiveness platform sccs
in return $ CmmProc (LiveInfo static mFirst (Just block_live) liveSlotsOnEntry)
lbl live ann_... | 324 | regLiveness platform (CmmProc info lbl live sccs)
| LiveInfo static mFirst _ liveSlotsOnEntry <- info
= let (ann_sccs, block_live) = computeLiveness platform sccs
in return $ CmmProc (LiveInfo static mFirst (Just block_live) liveSlotsOnEntry)
lbl live ann_... | 324 | regLiveness platform (CmmProc info lbl live sccs)
| LiveInfo static mFirst _ liveSlotsOnEntry <- info
= let (ann_sccs, block_live) = computeLiveness platform sccs
in return $ CmmProc (LiveInfo static mFirst (Just block_live) liveSlotsOnEntry)
lbl live ann_... | 324 | false | false | 0 | 13 | 99 | 96 | 45 | 51 | null | null |
eb-gh-cr/XMonadContrib1 | XMonad/Hooks/UrgencyHook.hs | bsd-3-clause | -- | An HOF version of 'readUrgents', for those who prefer that sort of thing.
withUrgents :: ([Window] -> X a) -> X a
withUrgents f = readUrgents >>= f | 152 | withUrgents :: ([Window] -> X a) -> X a
withUrgents f = readUrgents >>= f | 73 | withUrgents f = readUrgents >>= f | 33 | true | true | 0 | 8 | 29 | 39 | 20 | 19 | null | null |
shadwstalkr/phase-zero | CollectVariables.hs | bsd-3-clause | defaultVars :: MonadIO m => m Variables
defaultVars = return Map.empty | 70 | defaultVars :: MonadIO m => m Variables
defaultVars = return Map.empty | 70 | defaultVars = return Map.empty | 30 | false | true | 0 | 6 | 10 | 26 | 12 | 14 | null | null |
mcmaniac/ghc | compiler/cmm/CmmNode.hs | bsd-3-clause | -- Take a folder on expressions and apply it recursively.
wrapRecExpf :: (CmmExpr -> z -> z) -> CmmExpr -> z -> z
wrapRecExpf f e@(CmmMachOp _ es) z = foldr (wrapRecExpf f) (f e z) es | 183 | wrapRecExpf :: (CmmExpr -> z -> z) -> CmmExpr -> z -> z
wrapRecExpf f e@(CmmMachOp _ es) z = foldr (wrapRecExpf f) (f e z) es | 125 | wrapRecExpf f e@(CmmMachOp _ es) z = foldr (wrapRecExpf f) (f e z) es | 69 | true | true | 1 | 8 | 36 | 82 | 39 | 43 | null | null |
Cahu/krpc-hs | src/KRPCHS/Drawing.hs | gpl-3.0 | setTextStyle :: KRPCHS.Drawing.Text -> KRPCHS.UI.FontStyle -> RPCContext ()
setTextStyle thisArg valueArg = do
let r = makeRequest "Drawing" "Text_set_Style" [makeArgument 0 thisArg, makeArgument 1 valueArg]
res <- sendRequest r
processResponse res
{-
- Whether the object is visible.
-} | 303 | setTextStyle :: KRPCHS.Drawing.Text -> KRPCHS.UI.FontStyle -> RPCContext ()
setTextStyle thisArg valueArg = do
let r = makeRequest "Drawing" "Text_set_Style" [makeArgument 0 thisArg, makeArgument 1 valueArg]
res <- sendRequest r
processResponse res
{-
- Whether the object is visible.
-} | 303 | setTextStyle thisArg valueArg = do
let r = makeRequest "Drawing" "Text_set_Style" [makeArgument 0 thisArg, makeArgument 1 valueArg]
res <- sendRequest r
processResponse res
{-
- Whether the object is visible.
-} | 227 | false | true | 0 | 13 | 54 | 89 | 41 | 48 | null | null |
chemist/highlighter | src/Text/Highlighter/Lexers/Cython.hs | bsd-3-clause | strings' :: TokenMatcher
strings' =
[ tok "%(\\([a-zA-Z0-9]+\\))?[-#0 +]*([0-9]+|[*])?(\\.([0-9]+|[*]))?[hlL]?[diouxXeEfFgGcrs%]" (Arbitrary "Literal" :. Arbitrary "String" :. Arbitrary "Interpol")
, tok "[^\\\\\\'\"%\\n]+" (Arbitrary "Literal" :. Arbitrary "String")
, tok "[\\'\"\\\\]" (Arbitrary "Literal"... | 407 | strings' :: TokenMatcher
strings' =
[ tok "%(\\([a-zA-Z0-9]+\\))?[-#0 +]*([0-9]+|[*])?(\\.([0-9]+|[*]))?[hlL]?[diouxXeEfFgGcrs%]" (Arbitrary "Literal" :. Arbitrary "String" :. Arbitrary "Interpol")
, tok "[^\\\\\\'\"%\\n]+" (Arbitrary "Literal" :. Arbitrary "String")
, tok "[\\'\"\\\\]" (Arbitrary "Literal"... | 407 | strings' =
[ tok "%(\\([a-zA-Z0-9]+\\))?[-#0 +]*([0-9]+|[*])?(\\.([0-9]+|[*]))?[hlL]?[diouxXeEfFgGcrs%]" (Arbitrary "Literal" :. Arbitrary "String" :. Arbitrary "Interpol")
, tok "[^\\\\\\'\"%\\n]+" (Arbitrary "Literal" :. Arbitrary "String")
, tok "[\\'\"\\\\]" (Arbitrary "Literal" :. Arbitrary "String")
... | 382 | false | true | 0 | 10 | 61 | 102 | 49 | 53 | null | null |
dancor/melang | src/Wikt/ProcDefs.hs | mit | spPartAbbr :: Str -> Str
spPartAbbr "Adjective" = "ADJ" | 55 | spPartAbbr :: Str -> Str
spPartAbbr "Adjective" = "ADJ" | 55 | spPartAbbr "Adjective" = "ADJ" | 30 | false | true | 0 | 5 | 8 | 18 | 9 | 9 | null | null |
bitemyapp/ghc | libraries/base/GHC/Event/Thread.hs | bsd-3-clause | getSystemTimerManager :: IO TM.TimerManager
getSystemTimerManager = do
Just mgr <- readIORef timerManager
return mgr | 120 | getSystemTimerManager :: IO TM.TimerManager
getSystemTimerManager = do
Just mgr <- readIORef timerManager
return mgr | 120 | getSystemTimerManager = do
Just mgr <- readIORef timerManager
return mgr | 76 | false | true | 0 | 8 | 17 | 35 | 15 | 20 | null | null |
YoshikuniJujo/funpaala | samples/43_alternative/superYoshio.hs | bsd-3-clause | stage2 = [E Vampire, E Vampire, I Star, I Star, I Star, I Coin, I Star] | 71 | stage2 = [E Vampire, E Vampire, I Star, I Star, I Star, I Coin, I Star] | 71 | stage2 = [E Vampire, E Vampire, I Star, I Star, I Star, I Coin, I Star] | 71 | false | false | 0 | 6 | 15 | 48 | 24 | 24 | null | null |
adinapoli/Shelly.hs | src/Shelly/Pipe.hs | bsd-3-clause | -- | see 'S.command_'
command_ :: FilePath -> [Text] -> [Text] -> Sh ()
command_ = sh3 S.command_ | 97 | command_ :: FilePath -> [Text] -> [Text] -> Sh ()
command_ = sh3 S.command_ | 75 | command_ = sh3 S.command_ | 25 | true | true | 0 | 9 | 17 | 40 | 21 | 19 | null | null |
seereason/ghcjs | src/Gen2/Prim.hs | mit | genPrim _ _ SizeofSmallMutableArrayOp [r] [a] = PrimInline [j| `r` = `a`.length; |] | 96 | genPrim _ _ SizeofSmallMutableArrayOp [r] [a] = PrimInline [j| `r` = `a`.length; |] | 96 | genPrim _ _ SizeofSmallMutableArrayOp [r] [a] = PrimInline [j| `r` = `a`.length; |] | 96 | false | false | 0 | 6 | 25 | 30 | 17 | 13 | null | null |
SKA-ScienceDataProcessor/RC | MS3/Sketches/GPU_Gridders/GPUGridder.hs | apache-2.0 | -- FIXME: Add permutations option to config
-- and *generate* name from gcfIsFull and permutation option
runGridder :: GridderConfig -> TaskData -> GCFDev -> IO Grid
runGridder (GridderConfig _ fun _ iter) td gcf = do
gridptr <- CUDA.mallocArray gridsize
CUDA.memset gridptr (fromIntegral $ gridsize * cxdSize)... | 1,146 | runGridder :: GridderConfig -> TaskData -> GCFDev -> IO Grid
runGridder (GridderConfig _ fun _ iter) td gcf = do
gridptr <- CUDA.mallocArray gridsize
CUDA.memset gridptr (fromIntegral $ gridsize * cxdSize) 0
CUDA.allocaArray uvwSize $ \uvwp ->
CUDA.allocaArray visSize $ \visp ->
CUDA.allocaArr... | 1,039 | runGridder (GridderConfig _ fun _ iter) td gcf = do
gridptr <- CUDA.mallocArray gridsize
CUDA.memset gridptr (fromIntegral $ gridsize * cxdSize) 0
CUDA.allocaArray uvwSize $ \uvwp ->
CUDA.allocaArray visSize $ \visp ->
CUDA.allocaArray nBaselines $ \permp -> do
CUDA.pokeArray uvwSize... | 978 | true | true | 0 | 19 | 284 | 333 | 165 | 168 | null | null |
pparkkin/eta | compiler/ETA/TypeCheck/TcType.hs | bsd-3-clause | getDFunTyLitKey (StrTyLit n) = mkOccName Name.varName (show n) | 62 | getDFunTyLitKey (StrTyLit n) = mkOccName Name.varName (show n) | 62 | getDFunTyLitKey (StrTyLit n) = mkOccName Name.varName (show n) | 62 | false | false | 0 | 7 | 7 | 28 | 13 | 15 | null | null |
nymacro/hs-kmip | src/Ttlv/Validator/Structures.hs | bsd-3-clause | ok :: TtlvParser Ttlv
ok = TtlvParser $ \t -> Right t | 53 | ok :: TtlvParser Ttlv
ok = TtlvParser $ \t -> Right t | 53 | ok = TtlvParser $ \t -> Right t | 31 | false | true | 1 | 7 | 11 | 29 | 13 | 16 | null | null |
urbanslug/ghc | compiler/basicTypes/Id.hs | bsd-3-clause | setIdUnfoldingLazily :: Id -> Unfolding -> Id
setIdUnfoldingLazily id unfolding = modifyIdInfo (`setUnfoldingInfoLazily` unfolding) id | 134 | setIdUnfoldingLazily :: Id -> Unfolding -> Id
setIdUnfoldingLazily id unfolding = modifyIdInfo (`setUnfoldingInfoLazily` unfolding) id | 134 | setIdUnfoldingLazily id unfolding = modifyIdInfo (`setUnfoldingInfoLazily` unfolding) id | 88 | false | true | 0 | 6 | 14 | 35 | 19 | 16 | null | null |
bkoropoff/Idris-dev | src/IRTS/Compiler.hs | bsd-3-clause | isCon (TyDecl _ _) = True | 25 | isCon (TyDecl _ _) = True | 25 | isCon (TyDecl _ _) = True | 25 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
mfpi/OpenGLRaw | src/Graphics/Rendering/OpenGL/Raw/Core31/Tokens.hs | bsd-3-clause | gl_STATIC_READ :: GLenum
gl_STATIC_READ = 0x88E5 | 48 | gl_STATIC_READ :: GLenum
gl_STATIC_READ = 0x88E5 | 48 | gl_STATIC_READ = 0x88E5 | 23 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
ekohl/ganeti | htools/Ganeti/HTools/Cluster.hs | gpl-2.0 | -- * Utility functions
-- | Verifies the N+1 status and return the affected nodes.
verifyN1 :: [Node.Node] -> [Node.Node]
verifyN1 = filter Node.failN1 | 152 | verifyN1 :: [Node.Node] -> [Node.Node]
verifyN1 = filter Node.failN1 | 68 | verifyN1 = filter Node.failN1 | 29 | true | true | 0 | 9 | 24 | 39 | 19 | 20 | null | null |
diminishedprime/.org | reading-list/haskell_programming_from_first_principles/11_16.hs | mit | unCaeser :: Int -> [Char] -> [Char]
unCaeser n = caeser (26 - n) | 64 | unCaeser :: Int -> [Char] -> [Char]
unCaeser n = caeser (26 - n) | 64 | unCaeser n = caeser (26 - n) | 28 | false | true | 0 | 9 | 13 | 43 | 21 | 22 | null | null |
input-output-hk/pos-haskell-prototype | infra/src/Pos/Infra/Network/Types.hs | mit | getNodeTypeDefault ::
forall kademlia ctx. HasLens' ctx (NetworkConfig kademlia)
=> ctx
-> NodeType
getNodeTypeDefault =
topologyNodeType . ncTopology <$> view (lensOf @(NetworkConfig kademlia)) | 213 | getNodeTypeDefault ::
forall kademlia ctx. HasLens' ctx (NetworkConfig kademlia)
=> ctx
-> NodeType
getNodeTypeDefault =
topologyNodeType . ncTopology <$> view (lensOf @(NetworkConfig kademlia)) | 213 | getNodeTypeDefault =
topologyNodeType . ncTopology <$> view (lensOf @(NetworkConfig kademlia)) | 98 | false | true | 1 | 11 | 41 | 68 | 32 | 36 | null | null |
jeroenk/iTRSsImplemented | ChurchRosserExamples.hs | agpl-3.0 | cRed1d :: CReduction Sigma Var System_a_f_x
cRed1d = CRCons red1d (constructModulus phi)
where phi m = e * 2 + o + 2
where e = m `div` 2
o = m `div` 2 + m `mod` 2 | 200 | cRed1d :: CReduction Sigma Var System_a_f_x
cRed1d = CRCons red1d (constructModulus phi)
where phi m = e * 2 + o + 2
where e = m `div` 2
o = m `div` 2 + m `mod` 2 | 200 | cRed1d = CRCons red1d (constructModulus phi)
where phi m = e * 2 + o + 2
where e = m `div` 2
o = m `div` 2 + m `mod` 2 | 156 | false | true | 8 | 7 | 75 | 112 | 49 | 63 | null | null |
redfish64/IrcScanner | src/Parser/Irssi/Log/Regex.hs | bsd-3-clause | calcOffset :: Text -> Offset
calcOffset text =
let hh = (read $ T.unpack (T.take 2 text) :: Int)
mm = (read $ T.unpack (T.drop 3 text) :: Int)
in fromIntegral (60 * (mm + hh * 60)) | 194 | calcOffset :: Text -> Offset
calcOffset text =
let hh = (read $ T.unpack (T.take 2 text) :: Int)
mm = (read $ T.unpack (T.drop 3 text) :: Int)
in fromIntegral (60 * (mm + hh * 60)) | 194 | calcOffset text =
let hh = (read $ T.unpack (T.take 2 text) :: Int)
mm = (read $ T.unpack (T.drop 3 text) :: Int)
in fromIntegral (60 * (mm + hh * 60)) | 165 | false | true | 0 | 14 | 51 | 105 | 54 | 51 | null | null |
rueshyna/gogol | gogol-admin-directory/gen/Network/Google/Directory/Types/Product.hs | mpl-2.0 | -- | Custom Type.
uwCustomType :: Lens' UserWebsite (Maybe Text)
uwCustomType
= lens _uwCustomType (\ s a -> s{_uwCustomType = a}) | 132 | uwCustomType :: Lens' UserWebsite (Maybe Text)
uwCustomType
= lens _uwCustomType (\ s a -> s{_uwCustomType = a}) | 114 | uwCustomType
= lens _uwCustomType (\ s a -> s{_uwCustomType = a}) | 67 | true | true | 0 | 9 | 22 | 48 | 25 | 23 | null | null |
seahug/seattlehaskell-org | test/TestUtil/TestServer.hs | mit | -- | Start test server
-- Starts test server using specified request handler and returns
-- server information for use by stopTestServer etc.
startTestServer :: Port -> RequestHandler -> IO ServerInfo
startTestServer p h = do
-- Signalled when server is ready to handle connections
ready <- newMEvent
-- Num... | 2,066 | startTestServer :: Port -> RequestHandler -> IO ServerInfo
startTestServer p h = do
-- Signalled when server is ready to handle connections
ready <- newMEvent
-- Number of active connections
connectionCount <- newTVarIO (0 :: Int)
-- Signalled when server has shut down
shutdown <- newTMEventIO... | 1,924 | startTestServer p h = do
-- Signalled when server is ready to handle connections
ready <- newMEvent
-- Number of active connections
connectionCount <- newTVarIO (0 :: Int)
-- Signalled when server has shut down
shutdown <- newTMEventIO
-- Application settings including event handlers
... | 1,865 | true | true | 0 | 22 | 710 | 424 | 211 | 213 | null | null |
hvr/vector | Data/Vector/Generic/New.hs | bsd-3-clause | transformR f g (New p) = New (MVector.transformR f =<< p) | 57 | transformR f g (New p) = New (MVector.transformR f =<< p) | 57 | transformR f g (New p) = New (MVector.transformR f =<< p) | 57 | false | false | 0 | 9 | 10 | 34 | 16 | 18 | null | null |
qpliu/esolang | blo/hs/Value.hs | gpl-3.0 | updateRuntimeValue :: Value -> (rtv -> rtv) -> Memory (Data rtv)
-> Memory (Data rtv)
updateRuntimeValue (Value ref (_,importOffset,_,_)) f mem =
update mem ref (\ (Data bits rtv) ->
Data bits (take importOffset rtv ++ f (head (drop importOffset rtv))
... | 364 | updateRuntimeValue :: Value -> (rtv -> rtv) -> Memory (Data rtv)
-> Memory (Data rtv)
updateRuntimeValue (Value ref (_,importOffset,_,_)) f mem =
update mem ref (\ (Data bits rtv) ->
Data bits (take importOffset rtv ++ f (head (drop importOffset rtv))
... | 364 | updateRuntimeValue (Value ref (_,importOffset,_,_)) f mem =
update mem ref (\ (Data bits rtv) ->
Data bits (take importOffset rtv ++ f (head (drop importOffset rtv))
: (drop (importOffset+1) rtv))) | 250 | false | true | 0 | 16 | 125 | 151 | 77 | 74 | null | null |
ihc/futhark | src/Futhark/CodeGen/ImpGen/Kernels.hs | isc | compileKernelResult :: KernelConstants -> ImpGen.ValueDestination -> KernelResult
-> InKernelGen ()
compileKernelResult constants dest (ThreadsReturn (OneThreadPerGroup who) what) = do
write_result <-
ImpGen.collect $
ImpGen.copyDWIMDest dest [ImpGen.varIndex $ kernelGroupId constants] wha... | 505 | compileKernelResult :: KernelConstants -> ImpGen.ValueDestination -> KernelResult
-> InKernelGen ()
compileKernelResult constants dest (ThreadsReturn (OneThreadPerGroup who) what) = do
write_result <-
ImpGen.collect $
ImpGen.copyDWIMDest dest [ImpGen.varIndex $ kernelGroupId constants] wha... | 505 | compileKernelResult constants dest (ThreadsReturn (OneThreadPerGroup who) what) = do
write_result <-
ImpGen.collect $
ImpGen.copyDWIMDest dest [ImpGen.varIndex $ kernelGroupId constants] what []
let me = Imp.var (kernelLocalThreadId constants) int32
who' <- ImpGen.compileSubExp who
ImpGen.emit $
Im... | 385 | false | true | 0 | 12 | 96 | 159 | 75 | 84 | null | null |
khibino/haskell-hdbc-tool.201303 | src/Language/SQL/SqlWord.hs | bsd-3-clause | commaed' :: [SqlWord] -> [SqlWord] -> [SqlWord]
commaed' ws = (intersperse "," ws ++) | 85 | commaed' :: [SqlWord] -> [SqlWord] -> [SqlWord]
commaed' ws = (intersperse "," ws ++) | 85 | commaed' ws = (intersperse "," ws ++) | 37 | false | true | 0 | 7 | 13 | 40 | 22 | 18 | null | null |
brendanhay/gogol | gogol-cloudidentity/gen/Network/Google/Resource/CloudIdentity/Devices/Get.hs | mpl-2.0 | -- | Required. [Resource
-- name](https:\/\/cloud.google.com\/apis\/design\/resource_names) of the
-- Device in the format: \`devices\/{device_id}\`, where device_id is the
-- unique ID assigned to the Device.
dgName :: Lens' DevicesGet Text
dgName = lens _dgName (\ s a -> s{_dgName = a}) | 289 | dgName :: Lens' DevicesGet Text
dgName = lens _dgName (\ s a -> s{_dgName = a}) | 79 | dgName = lens _dgName (\ s a -> s{_dgName = a}) | 47 | true | true | 0 | 9 | 40 | 50 | 26 | 24 | null | null |
brendanhay/gogol | gogol-dataflow/gen/Network/Google/Resource/Dataflow/Projects/CatalogTemplates/Delete.hs | mpl-2.0 | -- | name includes project_id and display_name. Delete by project_id(pid1)
-- and display_name(tid1). Format:
-- projects\/{pid1}\/catalogTemplates\/{tid1}
pctdName :: Lens' ProjectsCatalogTemplatesDelete Text
pctdName = lens _pctdName (\ s a -> s{_pctdName = a}) | 263 | pctdName :: Lens' ProjectsCatalogTemplatesDelete Text
pctdName = lens _pctdName (\ s a -> s{_pctdName = a}) | 107 | pctdName = lens _pctdName (\ s a -> s{_pctdName = a}) | 53 | true | true | 0 | 9 | 31 | 42 | 24 | 18 | null | null |
keithodulaigh/Hets | OMDoc/Import.hs | gpl-2.0 | computeSymbolMap :: forall lid sublogics
basic_spec sentence symb_items symb_map_items
sign morphism symbol raw_symbol proof_tree .
Logic lid sublogics
basic_spec sentence symb_items symb_map_items
sign morphism symbol raw_symbol proof_tree =>
Maybe (Map.Map OMName St... | 1,790 | computeSymbolMap :: forall lid sublogics
basic_spec sentence symb_items symb_map_items
sign morphism symbol raw_symbol proof_tree .
Logic lid sublogics
basic_spec sentence symb_items symb_map_items
sign morphism symbol raw_symbol proof_tree =>
Maybe (Map.Map OMName St... | 1,790 | computeSymbolMap mNots nsmapS nsmapT morph lid =
case (nsmapS, nsmapT) of
(G_mapofsymbol sLid sm, G_mapofsymbol tLid tm) ->
do
-- REMARK: Logic-homogeneous environment assumed
let sNSMap = coerceMapofsymbol sLid lid sm
tNSMap = coerceMapofsymbol tLid lid tm
... | 1,282 | false | true | 0 | 23 | 735 | 384 | 196 | 188 | null | null |
mstksg/hledger | bin/hledger-check.hs | gpl-3.0 | -- | Check if two postings are in the same week.
sameWeek :: Bool -> H.Posting -> H.Posting -> Bool
sameWeek startSunday p1 p2 =
let startWeek = if startSunday then sundayStartWeek else mondayStartWeek
d1 = H.postingDate p1
d2 = H.postingDate p2
y1 = fst (toOrdinalDate d1)
y2 = fst (toOrdinalD... | 612 | sameWeek :: Bool -> H.Posting -> H.Posting -> Bool
sameWeek startSunday p1 p2 =
let startWeek = if startSunday then sundayStartWeek else mondayStartWeek
d1 = H.postingDate p1
d2 = H.postingDate p2
y1 = fst (toOrdinalDate d1)
y2 = fst (toOrdinalDate d2)
w1 = fst (startWeek d1)
w2 = ... | 563 | sameWeek startSunday p1 p2 =
let startWeek = if startSunday then sundayStartWeek else mondayStartWeek
d1 = H.postingDate p1
d2 = H.postingDate p2
y1 = fst (toOrdinalDate d1)
y2 = fst (toOrdinalDate d2)
w1 = fst (startWeek d1)
w2 = fst (startWeek d2)
sameYearSameWeek = y1 ==... | 512 | true | true | 0 | 14 | 179 | 213 | 109 | 104 | null | null |
pascal-knodel/haskell-craft | _/links/E'6'32.hs | mit | printImage :: Image -> IO ()
printImage (picture , _)
= printPicture picture | 79 | printImage :: Image -> IO ()
printImage (picture , _)
= printPicture picture | 79 | printImage (picture , _)
= printPicture picture | 50 | false | true | 0 | 7 | 15 | 32 | 16 | 16 | null | null |
rvion/ride | jetpack/src/Data/Vector/AsVec.hs | bsd-3-clause | -- vec_sum :: forall a. Num a => Vector a -> a
vec_sum = I.sum | 62 | vec_sum = I.sum | 15 | vec_sum = I.sum | 15 | true | false | 1 | 6 | 14 | 13 | 5 | 8 | null | null |
matonix/pfds | src/PFDS/Sec9/NonZero4aryNumber.hs | bsd-3-clause | dec (Four : ds) = Three : ds | 28 | dec (Four : ds) = Three : ds | 28 | dec (Four : ds) = Three : ds | 28 | false | false | 0 | 7 | 7 | 20 | 10 | 10 | null | null |
ghcjs/ghcjs-base | test/Tests/Properties.hs | mit | j_splitOn'_i (NotEmpty t) = id `eq` (J.intercalate t . J.splitOn' t) | 69 | j_splitOn'_i (NotEmpty t) = id `eq` (J.intercalate t . J.splitOn' t) | 69 | j_splitOn'_i (NotEmpty t) = id `eq` (J.intercalate t . J.splitOn' t) | 69 | false | false | 0 | 9 | 11 | 38 | 19 | 19 | null | null |
ford-prefect/gir2jni | src/Data/GI/CodeGen/JNI/Utils/Type.hs | lgpl-2.1 | -- Java doesn't have unsigned types, so we promote all unsigned types to
-- the next wider Java signed type (except long, where we just have to hope
-- there aren't overflows -- writing bindings is fun.)
giBasicTypeToJava :: GIType.BasicType -> JSyn.Type
giBasicTypeToJava typ =
case typ of
GIType.TBoolean -> JSy... | 1,353 | giBasicTypeToJava :: GIType.BasicType -> JSyn.Type
giBasicTypeToJava typ =
case typ of
GIType.TBoolean -> JSyn.PrimType JSyn.BooleanT
GIType.TInt -> JSyn.PrimType JSyn.IntT
GIType.TUInt -> JSyn.PrimType JSyn.LongT
GIType.TLong -> JSyn.PrimType JSyn.LongT
GIType.TULong -> JSyn.Prim... | 1,149 | giBasicTypeToJava typ =
case typ of
GIType.TBoolean -> JSyn.PrimType JSyn.BooleanT
GIType.TInt -> JSyn.PrimType JSyn.IntT
GIType.TUInt -> JSyn.PrimType JSyn.LongT
GIType.TLong -> JSyn.PrimType JSyn.LongT
GIType.TULong -> JSyn.PrimType JSyn.LongT
GIType.TInt8 -> JSyn.PrimTy... | 1,098 | true | true | 0 | 9 | 283 | 351 | 165 | 186 | null | null |
yigitozkavci/ivy | src/Cenary/Lexer.hs | mit | whitespace = Tok.whiteSpace lexer | 36 | whitespace = Tok.whiteSpace lexer | 36 | whitespace = Tok.whiteSpace lexer | 36 | false | false | 1 | 5 | 6 | 15 | 5 | 10 | null | null |
clupascu/codegolf | 135541-toggle-the-box/toggleBox.hs | mit | hasBox :: [String] -> Bool
hasBox = and . applyStartMiddleEnd isTopBottomLine isMiddleLine | 90 | hasBox :: [String] -> Bool
hasBox = and . applyStartMiddleEnd isTopBottomLine isMiddleLine | 90 | hasBox = and . applyStartMiddleEnd isTopBottomLine isMiddleLine | 63 | false | true | 0 | 6 | 11 | 27 | 14 | 13 | null | null |
acowley/ghc | libraries/template-haskell/Language/Haskell/TH/Syntax.hs | bsd-3-clause | -- | Look up the given name in the (value namespace of the) current splice's scope. See "Language.Haskell.TH.Syntax#namelookup" for more details.
lookupValueName :: String -> Q (Maybe Name)
lookupValueName s = Q (qLookupName False s) | 233 | lookupValueName :: String -> Q (Maybe Name)
lookupValueName s = Q (qLookupName False s) | 87 | lookupValueName s = Q (qLookupName False s) | 43 | true | true | 0 | 8 | 34 | 39 | 19 | 20 | null | null |
gumgl/project-euler | 63/63.hs | mit | -- lend (9^x) > x for x>30
pairs = [(base,exponent) | base <- bases, exponent <- exponents] | 92 | pairs = [(base,exponent) | base <- bases, exponent <- exponents] | 64 | pairs = [(base,exponent) | base <- bases, exponent <- exponents] | 64 | true | false | 1 | 8 | 17 | 36 | 18 | 18 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.