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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
devonhollowood/adventofcode | 2015/day17/day17.hs | mit | ascCombos :: Int -> [Int] -> [[Int]]
ascCombos _ [] = [] | 56 | ascCombos :: Int -> [Int] -> [[Int]]
ascCombos _ [] = [] | 56 | ascCombos _ [] = [] | 19 | false | true | 0 | 8 | 11 | 37 | 20 | 17 | null | null |
adarqui/99problems-hs | Experimentation/P21.hs | gpl-3.0 | insertAt_rec a lst@(l:ls) n = l : insertAt_rec a ls (n - 1) | 59 | insertAt_rec a lst@(l:ls) n = l : insertAt_rec a ls (n - 1) | 59 | insertAt_rec a lst@(l:ls) n = l : insertAt_rec a ls (n - 1) | 59 | false | false | 0 | 8 | 12 | 41 | 21 | 20 | null | null |
fmapfmapfmap/amazonka | amazonka-ml/gen/Network/AWS/MachineLearning/CreateBatchPrediction.hs | mpl-2.0 | -- | A user-supplied ID that uniquely identifies the 'BatchPrediction'.
cbpBatchPredictionId :: Lens' CreateBatchPrediction Text
cbpBatchPredictionId = lens _cbpBatchPredictionId (\ s a -> s{_cbpBatchPredictionId = a}) | 218 | cbpBatchPredictionId :: Lens' CreateBatchPrediction Text
cbpBatchPredictionId = lens _cbpBatchPredictionId (\ s a -> s{_cbpBatchPredictionId = a}) | 146 | cbpBatchPredictionId = lens _cbpBatchPredictionId (\ s a -> s{_cbpBatchPredictionId = a}) | 89 | true | true | 0 | 9 | 25 | 40 | 22 | 18 | null | null |
jeyoor/haskell-learning-challenge | learn_haskell_github_courses/Cis194/src/Lecture01.hs | bsd-3-clause | intSeqSynonymLength (_ :< xs) = 1 + intSeqSynonymLength xs | 58 | intSeqSynonymLength (_ :< xs) = 1 + intSeqSynonymLength xs | 58 | intSeqSynonymLength (_ :< xs) = 1 + intSeqSynonymLength xs | 58 | false | false | 0 | 7 | 8 | 23 | 11 | 12 | null | null |
GaloisInc/saw-script | src/SAWScript/HeapsterBuiltins.hs | bsd-3-clause | heapster_init_env_gen :: BuiltinContext -> Options -> DebugLevel ->
Text -> String -> TopLevel HeapsterEnv
heapster_init_env_gen _bic _opts dlevel mod_str llvm_filename =
do llvm_mod <- llvm_load_module llvm_filename
sc <- getSharedContext
let saw_mod_name = mkModuleName [mod_str]
... | 774 | heapster_init_env_gen :: BuiltinContext -> Options -> DebugLevel ->
Text -> String -> TopLevel HeapsterEnv
heapster_init_env_gen _bic _opts dlevel mod_str llvm_filename =
do llvm_mod <- llvm_load_module llvm_filename
sc <- getSharedContext
let saw_mod_name = mkModuleName [mod_str]
... | 774 | heapster_init_env_gen _bic _opts dlevel mod_str llvm_filename =
do llvm_mod <- llvm_load_module llvm_filename
sc <- getSharedContext
let saw_mod_name = mkModuleName [mod_str]
mod_loaded <- liftIO $ scModuleIsLoaded sc saw_mod_name
if mod_loaded then
fail ("SAW module with name " ++ show mod... | 642 | false | true | 0 | 13 | 200 | 189 | 88 | 101 | null | null |
phaul/chess | Chess/Move/Generator.hs | bsd-3-clause | ------------------------------------------------------------------------------
-- | Conversion from Move to PseudoLegalMove
mkPseudo :: Move -> PseudoLegalMove
mkPseudo = PseudoLegalMove | 186 | mkPseudo :: Move -> PseudoLegalMove
mkPseudo = PseudoLegalMove | 62 | mkPseudo = PseudoLegalMove | 26 | true | true | 0 | 5 | 15 | 17 | 10 | 7 | null | null |
UCSD-PL/RefScript | src/Language/Rsc/Typecheck/TCMonad.hs | bsd-3-clause | freshTyArgs :: Unif r => AnnSSA r -> Int -> IContext -> [BTVar r] -> RType r -> TCM r ([BTVar r], RType r)
--------------------------------------------------------------------------------
freshTyArgs a n ξ bs t
= do (βs, θ) <- freshSubst a n ξ bs
return $ (βs, apply θ t)
----------------------------------... | 366 | freshTyArgs :: Unif r => AnnSSA r -> Int -> IContext -> [BTVar r] -> RType r -> TCM r ([BTVar r], RType r)
freshTyArgs a n ξ bs t
= do (βs, θ) <- freshSubst a n ξ bs
return $ (βs, apply θ t)
-------------------------------------------------------------------------------- | 285 | freshTyArgs a n ξ bs t
= do (βs, θ) <- freshSubst a n ξ bs
return $ (βs, apply θ t)
-------------------------------------------------------------------------------- | 178 | true | true | 0 | 15 | 61 | 128 | 62 | 66 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/types/Type.hs | bsd-3-clause | -- Its important to use mkAppTys, rather than (foldl AppTy),
-- because the function part might well return a
-- partially-applied type constructor; indeed, usually will!
coreView _ = Nothing | 237 | coreView _ = Nothing | 36 | coreView _ = Nothing | 36 | true | false | 0 | 4 | 75 | 13 | 7 | 6 | null | null |
Persi/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | deadSimple (T_DollarSingleQuoted _ s) = [s] | 43 | deadSimple (T_DollarSingleQuoted _ s) = [s] | 43 | deadSimple (T_DollarSingleQuoted _ s) = [s] | 43 | false | false | 0 | 7 | 5 | 20 | 10 | 10 | null | null |
myfreeweb/http-link-header | library/Network/HTTP/Link/Writer.hs | unlicense | writeParamKey Anchor = "anchor" | 31 | writeParamKey Anchor = "anchor" | 31 | writeParamKey Anchor = "anchor" | 31 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
paholg/dotfiles | home/xmonad.hs | gpl-2.0 | my_pdfviewer = "okular" | 23 | my_pdfviewer = "okular" | 23 | my_pdfviewer = "okular" | 23 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
iqsf/HFitUI | src/WebUI/Widgets/UIWidget.hs | bsd-3-clause | -- | Установка ZIndex
zIndex :: Int -> WidgetUI -> UI WidgetUI
zIndex val widget =
applyStyleToWidget widget ("z-index:" ++ (show val) ++ ";") | 146 | zIndex :: Int -> WidgetUI -> UI WidgetUI
zIndex val widget =
applyStyleToWidget widget ("z-index:" ++ (show val) ++ ";") | 124 | zIndex val widget =
applyStyleToWidget widget ("z-index:" ++ (show val) ++ ";") | 83 | true | true | 0 | 10 | 27 | 56 | 26 | 30 | null | null |
markus-git/co-feldspar | src/Feldspar/Software/Optimize.hs | bsd-3-clause | simplifyUp (SymP t Not :$ (SymP _ Lt :$ a :$ b))
= simplifyUp $ SymP t Gte :$ a :$ b | 86 | simplifyUp (SymP t Not :$ (SymP _ Lt :$ a :$ b))
= simplifyUp $ SymP t Gte :$ a :$ b | 86 | simplifyUp (SymP t Not :$ (SymP _ Lt :$ a :$ b))
= simplifyUp $ SymP t Gte :$ a :$ b | 86 | false | false | 0 | 10 | 23 | 54 | 26 | 28 | null | null |
marcellussiegburg/autotool | collection/src/FD/Roll.hs | gpl-2.0 | random_subsequence xs = do
fs <- forM xs $ \ _ -> randomRIO (False,True)
return $ map fst $ filter snd $ zip xs fs
{-
roll_cnf conf = nub <$> ( forM [ 1 .. num_clauses conf ] $ \ i -> do
vs <- permIO $ map Variable [ 1 .. num_variables conf ]
l <- randomRIO $ num_literals_in_clause conf
forM (sor... | 394 | random_subsequence xs = do
fs <- forM xs $ \ _ -> randomRIO (False,True)
return $ map fst $ filter snd $ zip xs fs
{-
roll_cnf conf = nub <$> ( forM [ 1 .. num_clauses conf ] $ \ i -> do
vs <- permIO $ map Variable [ 1 .. num_variables conf ]
l <- randomRIO $ num_literals_in_clause conf
forM (sor... | 394 | random_subsequence xs = do
fs <- forM xs $ \ _ -> randomRIO (False,True)
return $ map fst $ filter snd $ zip xs fs
{-
roll_cnf conf = nub <$> ( forM [ 1 .. num_clauses conf ] $ \ i -> do
vs <- permIO $ map Variable [ 1 .. num_variables conf ]
l <- randomRIO $ num_literals_in_clause conf
forM (sor... | 394 | false | false | 0 | 11 | 108 | 64 | 30 | 34 | null | null |
w4ngyi/postgrest | src/PostgREST/PgQuery.hs | mit | pgFmtJsonbPath :: QualifiedIdentifier -> T.Text -> T.Text
pgFmtJsonbPath table p =
pgFmtJsonbPath' $ fromMaybe (ColIdentifier p) (parseJsonbPath p)
where
pgFmtJsonbPath' (ColIdentifier i) = fromQi table <> "." <> pgFmtIdent i
pgFmtJsonbPath' (KeyIdentifier i) = pgFmtLit i
pgFmtJsonbPath' (SingleArrow a ... | 471 | pgFmtJsonbPath :: QualifiedIdentifier -> T.Text -> T.Text
pgFmtJsonbPath table p =
pgFmtJsonbPath' $ fromMaybe (ColIdentifier p) (parseJsonbPath p)
where
pgFmtJsonbPath' (ColIdentifier i) = fromQi table <> "." <> pgFmtIdent i
pgFmtJsonbPath' (KeyIdentifier i) = pgFmtLit i
pgFmtJsonbPath' (SingleArrow a ... | 471 | pgFmtJsonbPath table p =
pgFmtJsonbPath' $ fromMaybe (ColIdentifier p) (parseJsonbPath p)
where
pgFmtJsonbPath' (ColIdentifier i) = fromQi table <> "." <> pgFmtIdent i
pgFmtJsonbPath' (KeyIdentifier i) = pgFmtLit i
pgFmtJsonbPath' (SingleArrow a b) =
pgFmtJsonbPath' a <> "->" <> pgFmtJsonbPath' b
... | 413 | false | true | 0 | 8 | 91 | 157 | 74 | 83 | null | null |
sinelaw/lamdu | test/InferAssert.hs | gpl-3.0 | canonizeInferred :: InferResults t -> InferResults t
canonizeInferred =
ExprUtil.randomizeParamIdsG (const ()) ExprUtil.debugNameGen Map.empty canonizePayload
where
canonizePayload gen guidMap (ival, ityp) =
( ExprUtil.randomizeParamIdsG (const ()) gen1 guidMap (\_ _ x -> x) ival
, ExprUtil.randomiz... | 437 | canonizeInferred :: InferResults t -> InferResults t
canonizeInferred =
ExprUtil.randomizeParamIdsG (const ()) ExprUtil.debugNameGen Map.empty canonizePayload
where
canonizePayload gen guidMap (ival, ityp) =
( ExprUtil.randomizeParamIdsG (const ()) gen1 guidMap (\_ _ x -> x) ival
, ExprUtil.randomiz... | 437 | canonizeInferred =
ExprUtil.randomizeParamIdsG (const ()) ExprUtil.debugNameGen Map.empty canonizePayload
where
canonizePayload gen guidMap (ival, ityp) =
( ExprUtil.randomizeParamIdsG (const ()) gen1 guidMap (\_ _ x -> x) ival
, ExprUtil.randomizeParamIdsG (const ()) gen2 guidMap (\_ _ x -> x) ityp... | 384 | false | true | 0 | 9 | 92 | 156 | 80 | 76 | null | null |
pbv/codex | src/Codex/Tester/Utils.hs | mit | -- | parse a command line string
parseArgs :: MonadIO m => String -> m [String]
parseArgs ""
= return [] | 106 | parseArgs :: MonadIO m => String -> m [String]
parseArgs ""
= return [] | 73 | parseArgs ""
= return [] | 26 | true | true | 0 | 8 | 22 | 37 | 18 | 19 | null | null |
sdiehl/ghc | testsuite/tests/parser/should_fail/readFailTraditionalRecords2.hs | bsd-3-clause | f (Foo { i = j }) = j | 21 | f (Foo { i = j }) = j | 21 | f (Foo { i = j }) = j | 21 | false | false | 0 | 8 | 8 | 22 | 11 | 11 | null | null |
kellino/TypeSystems | arith/Arith.hs | mit | isVal t = isNumeric t | 21 | isVal t = isNumeric t | 21 | isVal t = isNumeric t | 21 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
gust/feature-creature | users-service/src/Config/AppConfig.hs | mit | loadEnvVars :: AppName -> Environment -> IO ()
loadEnvVars appName env = dataDirectory appName >>= \dataDir -> do
let filePath = dataDir </> envName env <.> "env"
loadEnvFrom $ filePath
where
envName :: Environment -> FilePath
envName = T.unpack . toLower . T.pack . show
dataDirectory :: AppName -> I... | 385 | loadEnvVars :: AppName -> Environment -> IO ()
loadEnvVars appName env = dataDirectory appName >>= \dataDir -> do
let filePath = dataDir </> envName env <.> "env"
loadEnvFrom $ filePath
where
envName :: Environment -> FilePath
envName = T.unpack . toLower . T.pack . show
dataDirectory :: AppName -> I... | 385 | loadEnvVars appName env = dataDirectory appName >>= \dataDir -> do
let filePath = dataDir </> envName env <.> "env"
loadEnvFrom $ filePath
where
envName :: Environment -> FilePath
envName = T.unpack . toLower . T.pack . show
dataDirectory :: AppName -> IO FilePath
dataDirectory = getAppUserDataDi... | 338 | false | true | 5 | 14 | 78 | 129 | 62 | 67 | null | null |
jberthold/rts-serialisation | Data/MemoCombinators.hs | bsd-3-clause | -- | Memoize the third argument of a function.
memoThird :: Memo c -> (a -> b -> c -> r) -> (a -> b -> c -> r)
memoThird c = (memoSecond c .) | 141 | memoThird :: Memo c -> (a -> b -> c -> r) -> (a -> b -> c -> r)
memoThird c = (memoSecond c .) | 94 | memoThird c = (memoSecond c .) | 30 | true | true | 0 | 12 | 34 | 69 | 34 | 35 | null | null |
anthezium/MonadicRP | src/RPListMoveTest.hs | gpl-3.0 | compactShow :: (Show a, Eq a) => [a] -> String
compactShow xs = intercalate ", " $ map (\xs -> show (length xs) ++ " x " ++ show (head xs)) $ group xs | 150 | compactShow :: (Show a, Eq a) => [a] -> String
compactShow xs = intercalate ", " $ map (\xs -> show (length xs) ++ " x " ++ show (head xs)) $ group xs | 150 | compactShow xs = intercalate ", " $ map (\xs -> show (length xs) ++ " x " ++ show (head xs)) $ group xs | 103 | false | true | 0 | 14 | 33 | 92 | 44 | 48 | null | null |
aochagavia/CompilerConstruction | funflow/src/FunFlow/TypeSystem.hs | apache-2.0 | {- W algorithm for Hilney Miler type inference -}
fresh :: State Int Type
fresh = Alpha <$> freshInt | 100 | fresh :: State Int Type
fresh = Alpha <$> freshInt | 50 | fresh = Alpha <$> freshInt | 26 | true | true | 2 | 6 | 18 | 28 | 12 | 16 | null | null |
elieux/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | -- Base classes (Eq, Ord, Functor)
fmapName, eqClassName, eqName, ordClassName, geName, functorClassName :: Name
eqClassName = clsQual gHC_CLASSES (fsLit "Eq") eqClassKey | 181 | fmapName, eqClassName, eqName, ordClassName, geName, functorClassName :: Name
eqClassName = clsQual gHC_CLASSES (fsLit "Eq") eqClassKey | 146 | eqClassName = clsQual gHC_CLASSES (fsLit "Eq") eqClassKey | 68 | true | true | 0 | 7 | 31 | 35 | 23 | 12 | null | null |
oldmanmike/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | negateIntegerName = varQual gHC_INTEGER_TYPE (fsLit "negateInteger") negateIntegerIdKey | 95 | negateIntegerName = varQual gHC_INTEGER_TYPE (fsLit "negateInteger") negateIntegerIdKey | 95 | negateIntegerName = varQual gHC_INTEGER_TYPE (fsLit "negateInteger") negateIntegerIdKey | 95 | false | false | 0 | 7 | 14 | 19 | 9 | 10 | null | null |
DanielWaterworth/Idris-dev | src/Idris/WhoCalls.hs | bsd-3-clause | occurs n (Proj t _) = occurs n t | 32 | occurs n (Proj t _) = occurs n t | 32 | occurs n (Proj t _) = occurs n t | 32 | false | false | 0 | 6 | 8 | 26 | 11 | 15 | null | null |
ksaveljev/hNES | NES/EmulatorHelpers.hs | mit | loadY :: MonadEmulator m => m Word8
loadY = load8 Y | 51 | loadY :: MonadEmulator m => m Word8
loadY = load8 Y | 51 | loadY = load8 Y | 15 | false | true | 0 | 6 | 10 | 24 | 11 | 13 | null | null |
bos/statistics | Statistics/Distribution/Binomial.hs | bsd-2-clause | errMsg :: Int -> Double -> String
errMsg n p
= "Statistics.Distribution.Binomial.binomial: n=" ++ show n
++ " p=" ++ show p ++ "but n>=0 and p in [0,1]" | 156 | errMsg :: Int -> Double -> String
errMsg n p
= "Statistics.Distribution.Binomial.binomial: n=" ++ show n
++ " p=" ++ show p ++ "but n>=0 and p in [0,1]" | 156 | errMsg n p
= "Statistics.Distribution.Binomial.binomial: n=" ++ show n
++ " p=" ++ show p ++ "but n>=0 and p in [0,1]" | 122 | false | true | 6 | 8 | 32 | 55 | 23 | 32 | null | null |
junnf/Functional-Programming | codes/trigdeg.hs | unlicense | -- Lagged Difference of a time serie
-- lagddif [xi] = [x_i+1 - x_i]
lagdiff lst = zipWith (-) (tail lst) lst | 109 | lagdiff lst = zipWith (-) (tail lst) lst | 40 | lagdiff lst = zipWith (-) (tail lst) lst | 40 | true | false | 0 | 7 | 21 | 26 | 14 | 12 | null | null |
DavidAlphaFox/ghc | libraries/Cabal/cabal-install/Distribution/Client/Sandbox/Timestamp.hs | bsd-3-clause | -- | The 'add-source-timestamps' file keeps the timestamps of all add-source
-- dependencies. It is initially populated by 'sandbox add-source' and kept
-- current by 'reinstallAddSourceDeps' and 'configure -w'. The user can install
-- add-source deps manually with 'cabal install' after having edited them, so we
-- can... | 520 | timestampFileName :: FilePath
timestampFileName = "add-source-timestamps" | 73 | timestampFileName = "add-source-timestamps" | 43 | true | true | 0 | 6 | 77 | 25 | 14 | 11 | null | null |
HIPERFIT/futhark | src/Futhark/Transform/Rename.hs | isc | -- | Perform a renaming using the 'Substitute' instance. This only
-- works if the argument does not itself perform any name binding, but
-- it can save on boilerplate for simple types.
substituteRename :: Substitute a => a -> RenameM a
substituteRename x = do
substs <- renamerSubstitutions
return $ substituteName... | 387 | substituteRename :: Substitute a => a -> RenameM a
substituteRename x = do
substs <- renamerSubstitutions
return $ substituteNames substs x
-- | Members of class 'Rename' can be uniquely renamed. | 200 | substituteRename x = do
substs <- renamerSubstitutions
return $ substituteNames substs x
-- | Members of class 'Rename' can be uniquely renamed. | 149 | true | true | 0 | 8 | 69 | 51 | 25 | 26 | null | null |
michalkonecny/aern | aern-real/src/Numeric/AERN/RealArithmetic/RefinementOrderRounding/FieldOps.hs | bsd-3-clause | powerToNonnegIntIn :: (RoundedPowerToNonnegInt t) => t -> Int -> t
powerToNonnegIntIn a = powerToNonnegIntInEff (powerToNonnegIntDefaultEffort a) a | 147 | powerToNonnegIntIn :: (RoundedPowerToNonnegInt t) => t -> Int -> t
powerToNonnegIntIn a = powerToNonnegIntInEff (powerToNonnegIntDefaultEffort a) a | 147 | powerToNonnegIntIn a = powerToNonnegIntInEff (powerToNonnegIntDefaultEffort a) a | 80 | false | true | 0 | 7 | 16 | 42 | 21 | 21 | null | null |
Paow/encore | src/ir/AST/PrettyPrinter.hs | bsd-3-clause | ppVar :: VarDecl -> Doc
ppVar (VarType x ty) = ppName x <+> ":" <+> ppType ty | 77 | ppVar :: VarDecl -> Doc
ppVar (VarType x ty) = ppName x <+> ":" <+> ppType ty | 77 | ppVar (VarType x ty) = ppName x <+> ":" <+> ppType ty | 53 | false | true | 0 | 7 | 16 | 44 | 20 | 24 | null | null |
wouwouwou/2017_module_8 | src/haskell/PP-project-2017/lib/sprockell-2017/src/Sprockell/Simulation.hs | apache-2.0 | setupBuffering :: IO (BufferMode,BufferMode)
setupBuffering = do
oldin <- hGetBuffering stdin
oldout <- hGetBuffering stdout
hSetBuffering stdin NoBuffering -- needed to make charIO work nicely
hSetBuffering stdout NoBuffering
return (oldin,oldout) | 271 | setupBuffering :: IO (BufferMode,BufferMode)
setupBuffering = do
oldin <- hGetBuffering stdin
oldout <- hGetBuffering stdout
hSetBuffering stdin NoBuffering -- needed to make charIO work nicely
hSetBuffering stdout NoBuffering
return (oldin,oldout) | 271 | setupBuffering = do
oldin <- hGetBuffering stdin
oldout <- hGetBuffering stdout
hSetBuffering stdin NoBuffering -- needed to make charIO work nicely
hSetBuffering stdout NoBuffering
return (oldin,oldout) | 226 | false | true | 0 | 8 | 52 | 69 | 32 | 37 | null | null |
JPMoresmau/haskell-ide-engine | src/Haskell/Ide/Engine/Transport/JsonHttp.hs | bsd-3-clause | server :: HieServer plugins => Proxy plugins -> TChan ChannelRequest -> TChan ChannelResponse -> Server (PluginRoutes plugins)
server proxy cin cout = hieServer proxy cin cout | 176 | server :: HieServer plugins => Proxy plugins -> TChan ChannelRequest -> TChan ChannelResponse -> Server (PluginRoutes plugins)
server proxy cin cout = hieServer proxy cin cout | 176 | server proxy cin cout = hieServer proxy cin cout | 48 | false | true | 0 | 11 | 26 | 62 | 28 | 34 | null | null |
frsoares/hsimplesearch | src/Search/Interpreter.hs | gpl-2.0 | isExclude (QExclude _) = True | 29 | isExclude (QExclude _) = True | 29 | isExclude (QExclude _) = True | 29 | false | false | 0 | 7 | 4 | 15 | 7 | 8 | null | null |
mightymoose/liquidhaskell | benchmarks/text-0.11.2.3/Data/Text/Lazy.hs | bsd-3-clause | -- | /O(n)/ 'all' @p@ @t@ determines whether all characters in the
-- 'Text' @t@ satisify the predicate @p@. Subject to fusion.
all :: (Char -> Bool) -> Text -> Bool
all p t = S.all p (stream t) | 194 | all :: (Char -> Bool) -> Text -> Bool
all p t = S.all p (stream t) | 66 | all p t = S.all p (stream t) | 28 | true | true | 0 | 7 | 38 | 50 | 25 | 25 | null | null |
clample/lamdabtc | backend/test/Protocol/ServerTest.hs | bsd-3-clause | longerChain = testProperty
"We should use the correct active chain"
prop_longerChain | 88 | longerChain = testProperty
"We should use the correct active chain"
prop_longerChain | 88 | longerChain = testProperty
"We should use the correct active chain"
prop_longerChain | 88 | false | false | 0 | 4 | 14 | 12 | 5 | 7 | null | null |
Numberartificial/workflow | snipets/src/Craft/Chapter14_2.hs | mit | mapMaybe g (Just x) = Just (g x) | 32 | mapMaybe g (Just x) = Just (g x) | 32 | mapMaybe g (Just x) = Just (g x) | 32 | false | false | 0 | 7 | 7 | 28 | 12 | 16 | null | null |
brendanhay/gogol | gogol-androidmanagement/gen/Network/Google/AndroidManagement/Types/Product.hs | mpl-2.0 | -- | Whether configuring Wi-Fi access points is disabled.Note: If a network
-- connection can\'t be made at boot time and configuring Wi-Fi is disabled
-- then network escape hatch will be shown in order to refresh the device
-- policy (see networkEscapeHatchEnabled).
pWifiConfigDisabled :: Lens' Policy (Maybe Bool)
pW... | 412 | pWifiConfigDisabled :: Lens' Policy (Maybe Bool)
pWifiConfigDisabled
= lens _pWifiConfigDisabled
(\ s a -> s{_pWifiConfigDisabled = a}) | 143 | pWifiConfigDisabled
= lens _pWifiConfigDisabled
(\ s a -> s{_pWifiConfigDisabled = a}) | 94 | true | true | 0 | 8 | 67 | 52 | 28 | 24 | null | null |
keithodulaigh/Hets | QVTR/StatAna.hs | gpl-2.0 | collectRecursivePreds :: [RelVar] -> Maybe ObjectTemplate ->
[(String, String, OCL)]
collectRecursivePreds _ Nothing = [] | 146 | collectRecursivePreds :: [RelVar] -> Maybe ObjectTemplate ->
[(String, String, OCL)]
collectRecursivePreds _ Nothing = [] | 146 | collectRecursivePreds _ Nothing = [] | 36 | false | true | 0 | 8 | 39 | 44 | 24 | 20 | null | null |
samplecount/shake-language-c | src/Development/Shake/Language/C/Target/Android.hs | apache-2.0 | abiString (X86 _) = "x86" | 29 | abiString (X86 _) = "x86" | 29 | abiString (X86 _) = "x86" | 29 | false | false | 0 | 6 | 8 | 16 | 7 | 9 | null | null |
vikraman/ghc | compiler/hsSyn/HsExpr.hs | bsd-3-clause | isTypedSplice _ = False | 40 | isTypedSplice _ = False | 40 | isTypedSplice _ = False | 40 | false | false | 0 | 5 | 20 | 9 | 4 | 5 | null | null |
houshuang/frame | src/Data/Frame/Types.hs | mit | subsumes _ Any = True | 21 | subsumes _ Any = True | 21 | subsumes _ Any = True | 21 | false | false | 0 | 5 | 4 | 11 | 5 | 6 | null | null |
juliankopkalarsen/FpStats | GMM/src/LikSpecLang.hs | mit | (%) :: Expr a o -> Expr i a -> Expr i o
b % a = Pipe b a | 56 | (%) :: Expr a o -> Expr i a -> Expr i o
b % a = Pipe b a | 56 | b % a = Pipe b a | 16 | false | true | 0 | 9 | 19 | 52 | 23 | 29 | null | null |
rahulmutt/ghcvm | compiler/Eta/Utils/OrdList.hs | bsd-3-clause | foldrOL k z (Snoc xs x) = foldrOL k (k x z) xs | 46 | foldrOL k z (Snoc xs x) = foldrOL k (k x z) xs | 46 | foldrOL k z (Snoc xs x) = foldrOL k (k x z) xs | 46 | false | false | 0 | 7 | 12 | 36 | 17 | 19 | null | null |
tolysz/prepare-ghcjs | spec-lts8/cabal/cabal-install/Distribution/Client/FileMonitor.hs | bsd-3-clause | ------------------------------------------------------------------------------
-- | Update the input value and the set of files monitored by the
-- 'FileMonitor', plus the cached value that may be returned in future.
--
-- This takes a snapshot of the state of the monitored files right now, so
-- 'checkFileMonitorChan... | 2,384 | updateFileMonitor
:: (Binary a, Binary b)
=> FileMonitor a b -- ^ cache file path
-> FilePath -- ^ root directory
-> Maybe MonitorTimestamp -- ^ timestamp when the update action started
-> [MonitorFilePath] -- ^ files of interest relative to root
-> a ... | 813 | updateFileMonitor monitor root startTime monitorFiles
cachedKey cachedResult = do
hashcache <- readCacheFileHashes monitor
msfs <- buildMonitorStateFileSet startTime hashcache root monitorFiles
rewriteCacheFile monitor msfs cachedKey cachedResult
-- | A timestamp to help with the problem ... | 394 | true | true | 0 | 14 | 498 | 158 | 92 | 66 | null | null |
rueshyna/gogol | gogol-compute/gen/Network/Google/Compute/Types/Product.hs | mpl-2.0 | -- | The project ID. For example: my-example-project. Use the project ID to
-- make requests to Compute Engine.
pName :: Lens' Project (Maybe Text)
pName = lens _pName (\ s a -> s{_pName = a}) | 192 | pName :: Lens' Project (Maybe Text)
pName = lens _pName (\ s a -> s{_pName = a}) | 80 | pName = lens _pName (\ s a -> s{_pName = a}) | 44 | true | true | 2 | 9 | 35 | 56 | 26 | 30 | null | null |
facebookincubator/duckling | Duckling/Time/DE/Rules.hs | bsd-3-clause | ruleTimeofdayApproximately :: Rule
ruleTimeofdayApproximately = Rule
{ name = "<time-of-day> approximately"
, pattern =
[ Predicate isATimeOfDay
, regex "ca\\.?|circa|zirka|ungef(ä)hr|(in )?etwa"
]
, prod = \tokens -> case tokens of
(Token Time td:_) -> tt $ notLatent td
_ -> Nothing
} | 318 | ruleTimeofdayApproximately :: Rule
ruleTimeofdayApproximately = Rule
{ name = "<time-of-day> approximately"
, pattern =
[ Predicate isATimeOfDay
, regex "ca\\.?|circa|zirka|ungef(ä)hr|(in )?etwa"
]
, prod = \tokens -> case tokens of
(Token Time td:_) -> tt $ notLatent td
_ -> Nothing
} | 318 | ruleTimeofdayApproximately = Rule
{ name = "<time-of-day> approximately"
, pattern =
[ Predicate isATimeOfDay
, regex "ca\\.?|circa|zirka|ungef(ä)hr|(in )?etwa"
]
, prod = \tokens -> case tokens of
(Token Time td:_) -> tt $ notLatent td
_ -> Nothing
} | 283 | false | true | 0 | 14 | 73 | 93 | 47 | 46 | null | null |
facebookincubator/duckling | Duckling/Numeral/AR/EG/Rules.hs | bsd-3-clause | ruleInteger900 :: Rule
ruleInteger900 = Rule
{ name = "integer (900)"
, pattern =
[ regex "([تط]و?سعو?)مي[هةت]"
]
, prod = const $ integer 900
} | 160 | ruleInteger900 :: Rule
ruleInteger900 = Rule
{ name = "integer (900)"
, pattern =
[ regex "([تط]و?سعو?)مي[هةت]"
]
, prod = const $ integer 900
} | 160 | ruleInteger900 = Rule
{ name = "integer (900)"
, pattern =
[ regex "([تط]و?سعو?)مي[هةت]"
]
, prod = const $ integer 900
} | 137 | false | true | 0 | 9 | 41 | 48 | 26 | 22 | null | null |
bordaigorl/jamesbound | src/Language/PiCalc/Analysis/PetriNet.hs | gpl-2.0 | places :: Ord pl => PN pl -> Set pl
places pn = foldr Set.insert Set.empty $ concatMap extract $ rules pn
where extract (pre,post) = map fst $ pre ++ post | 157 | places :: Ord pl => PN pl -> Set pl
places pn = foldr Set.insert Set.empty $ concatMap extract $ rules pn
where extract (pre,post) = map fst $ pre ++ post | 156 | places pn = foldr Set.insert Set.empty $ concatMap extract $ rules pn
where extract (pre,post) = map fst $ pre ++ post | 120 | false | true | 0 | 8 | 34 | 86 | 39 | 47 | null | null |
julmue/UntypedLambda | test/Language/Lambda/Semantics/Named/BigStep/Tests.hs | bsd-3-clause | iszro_Tests = testGroup "iszro_Tests"
[ testCase "iszro_ 1" $
normalOrder (iszro_ # zro_) @=? tru_
, testCase "iszro_ 2" $
normalOrder (iszro_ # (scc_ # zro_)) @=? fls_
] | 198 | iszro_Tests = testGroup "iszro_Tests"
[ testCase "iszro_ 1" $
normalOrder (iszro_ # zro_) @=? tru_
, testCase "iszro_ 2" $
normalOrder (iszro_ # (scc_ # zro_)) @=? fls_
] | 198 | iszro_Tests = testGroup "iszro_Tests"
[ testCase "iszro_ 1" $
normalOrder (iszro_ # zro_) @=? tru_
, testCase "iszro_ 2" $
normalOrder (iszro_ # (scc_ # zro_)) @=? fls_
] | 198 | false | false | 0 | 12 | 56 | 67 | 33 | 34 | null | null |
spacekitteh/smcghc | compiler/codeGen/StgCmmPrim.hs | bsd-3-clause | -- Atomic read-modify-write
emitPrimOp dflags [res] FetchAddByteArrayOp_Int [mba, ix, n] =
doAtomicRMW res AMO_Add mba ix (bWord dflags) n | 142 | emitPrimOp dflags [res] FetchAddByteArrayOp_Int [mba, ix, n] =
doAtomicRMW res AMO_Add mba ix (bWord dflags) n | 114 | emitPrimOp dflags [res] FetchAddByteArrayOp_Int [mba, ix, n] =
doAtomicRMW res AMO_Add mba ix (bWord dflags) n | 114 | true | false | 0 | 7 | 22 | 53 | 25 | 28 | null | null |
ktvoelker/state-record | src/Data/Record/StateFields.hs | gpl-3.0 | proj :: (FieldReader f, MonadReader a m) => f a b -> Reader b x -> m x
proj f m = do
b <- askf f
let x = runReader m b
return x
-- | Like 'proj', but allows the subcomputation to share the underlying
-- monad of the enclosing computation. | 247 | proj :: (FieldReader f, MonadReader a m) => f a b -> Reader b x -> m x
proj f m = do
b <- askf f
let x = runReader m b
return x
-- | Like 'proj', but allows the subcomputation to share the underlying
-- monad of the enclosing computation. | 247 | proj f m = do
b <- askf f
let x = runReader m b
return x
-- | Like 'proj', but allows the subcomputation to share the underlying
-- monad of the enclosing computation. | 176 | false | true | 0 | 11 | 61 | 91 | 41 | 50 | null | null |
robdockins/orlin | src/Orlin/PureTypeSys.hs | bsd-2-clause | whnf pn x@(ExprIdent ident _) = return (Just (BlockIdent ident), x) | 67 | whnf pn x@(ExprIdent ident _) = return (Just (BlockIdent ident), x) | 67 | whnf pn x@(ExprIdent ident _) = return (Just (BlockIdent ident), x) | 67 | false | false | 0 | 9 | 10 | 40 | 20 | 20 | null | null |
nstott/GradeLevel | src/NLP/GradeLevel.hs | bsd-3-clause | colemanLiauIndex :: String -> Float
colemanLiauIndex str = (0.0588 * l) - (0.296 * s) - 15.8
where
l = 100.0 * (fromIntegral (length (filter isAlphaNum str)) / fromIntegral (totalWords str))
s = 100.0 * (fromIntegral (totalSentences str) / fromIntegral (totalWords str))
| 285 | colemanLiauIndex :: String -> Float
colemanLiauIndex str = (0.0588 * l) - (0.296 * s) - 15.8
where
l = 100.0 * (fromIntegral (length (filter isAlphaNum str)) / fromIntegral (totalWords str))
s = 100.0 * (fromIntegral (totalSentences str) / fromIntegral (totalWords str))
| 284 | colemanLiauIndex str = (0.0588 * l) - (0.296 * s) - 15.8
where
l = 100.0 * (fromIntegral (length (filter isAlphaNum str)) / fromIntegral (totalWords str))
s = 100.0 * (fromIntegral (totalSentences str) / fromIntegral (totalWords str))
| 248 | false | true | 7 | 11 | 56 | 135 | 62 | 73 | null | null |
nevrenato/HetsAlloy | CSMOF/Parser.hs | gpl-2.0 | equalClassName :: String -> NamedElement -> Bool
equalClassName name ne =
case ne of
(NamedElement _ _ (TType (Type _ (DClass _)))) -> namedElementName ne == name
_ -> False | 183 | equalClassName :: String -> NamedElement -> Bool
equalClassName name ne =
case ne of
(NamedElement _ _ (TType (Type _ (DClass _)))) -> namedElementName ne == name
_ -> False | 183 | equalClassName name ne =
case ne of
(NamedElement _ _ (TType (Type _ (DClass _)))) -> namedElementName ne == name
_ -> False | 134 | false | true | 3 | 12 | 39 | 72 | 37 | 35 | null | null |
ksaveljev/hake-2 | src/Game/Monsters/MBoss31.hs | bsd-3-clause | jorgFramesAttack1 :: V.Vector MFrameT
jorgFramesAttack1 =
V.fromList [ MFrameT (Just GameAI.aiCharge) 0 (Just jorgFireBullet)
, MFrameT (Just GameAI.aiCharge) 0 (Just jorgFireBullet)
, MFrameT (Just GameAI.aiCharge) 0 (Just jorgFireBullet)
, MFrameT (Just GameAI.aiCharge... | 506 | jorgFramesAttack1 :: V.Vector MFrameT
jorgFramesAttack1 =
V.fromList [ MFrameT (Just GameAI.aiCharge) 0 (Just jorgFireBullet)
, MFrameT (Just GameAI.aiCharge) 0 (Just jorgFireBullet)
, MFrameT (Just GameAI.aiCharge) 0 (Just jorgFireBullet)
, MFrameT (Just GameAI.aiCharge... | 506 | jorgFramesAttack1 =
V.fromList [ MFrameT (Just GameAI.aiCharge) 0 (Just jorgFireBullet)
, MFrameT (Just GameAI.aiCharge) 0 (Just jorgFireBullet)
, MFrameT (Just GameAI.aiCharge) 0 (Just jorgFireBullet)
, MFrameT (Just GameAI.aiCharge) 0 (Just jorgFireBullet)
... | 468 | false | true | 0 | 10 | 143 | 165 | 82 | 83 | null | null |
rahulmutt/ghcvm | compiler/Eta/TypeCheck/TcRnTypes.hs | bsd-3-clause | pprArisingAt :: CtLoc -> SDoc
pprArisingAt (CtLoc { ctl_origin = o, ctl_env = lcl})
= sep [ pprCtOrigin o
, text "at" <+> ppr (tcl_loc lcl)] | 150 | pprArisingAt :: CtLoc -> SDoc
pprArisingAt (CtLoc { ctl_origin = o, ctl_env = lcl})
= sep [ pprCtOrigin o
, text "at" <+> ppr (tcl_loc lcl)] | 150 | pprArisingAt (CtLoc { ctl_origin = o, ctl_env = lcl})
= sep [ pprCtOrigin o
, text "at" <+> ppr (tcl_loc lcl)] | 120 | false | true | 6 | 10 | 35 | 73 | 34 | 39 | null | null |
jfdm/hUML | src/ClassDiagram/Lexer.hs | bsd-3-clause | -- | Lex keywords
reserved :: String -> Parser ()
reserved = Tok.reserved lexer | 79 | reserved :: String -> Parser ()
reserved = Tok.reserved lexer | 61 | reserved = Tok.reserved lexer | 29 | true | true | 0 | 8 | 13 | 32 | 14 | 18 | null | null |
vladimir-ipatov/ganeti | src/Ganeti/Query/Query.hs | gpl-2.0 | queryInner _ _ (Query qkind _ _) _ =
return . Bad . GenericError $ "Query '" ++ show qkind ++ "' not supported" | 113 | queryInner _ _ (Query qkind _ _) _ =
return . Bad . GenericError $ "Query '" ++ show qkind ++ "' not supported" | 113 | queryInner _ _ (Query qkind _ _) _ =
return . Bad . GenericError $ "Query '" ++ show qkind ++ "' not supported" | 113 | false | false | 0 | 9 | 25 | 48 | 23 | 25 | null | null |
alonho/bottle | src/Graphics/UI/Bottle/Widget.hs | gpl-3.0 | -- ^ If doesn't take focus, event map is ignored
strongerEvents :: EventHandlers f -> Widget f -> Widget f
strongerEvents = atEventMap . mappend | 144 | strongerEvents :: EventHandlers f -> Widget f -> Widget f
strongerEvents = atEventMap . mappend | 95 | strongerEvents = atEventMap . mappend | 37 | true | true | 1 | 8 | 24 | 40 | 17 | 23 | null | null |
mokus0/s-expression | src/Text/SExpr/Parse.hs | bsd-3-clause | -- <decimal> :: <decimal-digit>+ ;
fromDec :: Num a => String -> a
fromDec = foldl' (\x c -> x * 10 + fromIntegral (digitToInt c)) 0 | 134 | fromDec :: Num a => String -> a
fromDec = foldl' (\x c -> x * 10 + fromIntegral (digitToInt c)) 0 | 97 | fromDec = foldl' (\x c -> x * 10 + fromIntegral (digitToInt c)) 0 | 65 | true | true | 0 | 11 | 28 | 61 | 29 | 32 | null | null |
nsmryan/Misc | src/PipeOperators.hs | bsd-3-clause | probably' prob loc ind = do
let len = S.length ind
if len > loc
then do
let (top, bottom) = S.splitAt loc ind
yield . Piece $ top
yield . Location $ S.index bottom 0
loc' <- lift $ geo0 prob
probably' prob loc' $ S.drop 1 bottom
else do
yield $ Piece ind
yield Flush... | 378 | probably' prob loc ind = do
let len = S.length ind
if len > loc
then do
let (top, bottom) = S.splitAt loc ind
yield . Piece $ top
yield . Location $ S.index bottom 0
loc' <- lift $ geo0 prob
probably' prob loc' $ S.drop 1 bottom
else do
yield $ Piece ind
yield Flush... | 378 | probably' prob loc ind = do
let len = S.length ind
if len > loc
then do
let (top, bottom) = S.splitAt loc ind
yield . Piece $ top
yield . Location $ S.index bottom 0
loc' <- lift $ geo0 prob
probably' prob loc' $ S.drop 1 bottom
else do
yield $ Piece ind
yield Flush... | 378 | false | false | 0 | 14 | 131 | 167 | 75 | 92 | null | null |
alexvong1995/pandoc | src/Text/Pandoc/Templates.hs | gpl-2.0 | replaceVar (v:vs) new (Object o) =
Object $ H.adjust (\x -> replaceVar vs new x) v o | 86 | replaceVar (v:vs) new (Object o) =
Object $ H.adjust (\x -> replaceVar vs new x) v o | 86 | replaceVar (v:vs) new (Object o) =
Object $ H.adjust (\x -> replaceVar vs new x) v o | 86 | false | false | 0 | 9 | 18 | 54 | 27 | 27 | null | null |
DanielWaterworth/Idris-dev | src/Idris/Core/Elaborate.hs | bsd-3-clause | -- Insert a 'proofSearchFail' error if necessary to shortcut any further
-- fruitless searching
proofFail :: Elab' aux a -> Elab' aux a
proofFail e = do s <- get
case runStateT e s of
OK (a, s') -> do put s'
return $! a
... | 367 | proofFail :: Elab' aux a -> Elab' aux a
proofFail e = do s <- get
case runStateT e s of
OK (a, s') -> do put s'
return $! a
Error err -> lift $ Error (ProofSearchFail err) | 271 | proofFail e = do s <- get
case runStateT e s of
OK (a, s') -> do put s'
return $! a
Error err -> lift $ Error (ProofSearchFail err) | 231 | true | true | 0 | 13 | 152 | 99 | 46 | 53 | null | null |
jekor/jigplate | jigplate.hs | mit | showJig ((JigFragment s):x) = s ++ showJig x | 44 | showJig ((JigFragment s):x) = s ++ showJig x | 44 | showJig ((JigFragment s):x) = s ++ showJig x | 44 | false | false | 2 | 8 | 7 | 32 | 14 | 18 | null | null |
keera-studios/hsQt | Qtc/ClassTypes/Gui.hs | bsd-2-clause | qTableViewListFromPtrList :: [Ptr (TQTableView a)] -> IO [QTableView a]
qTableViewListFromPtrList p
= objectListFromPtrList qtc_QTableView_getFinalizer p | 155 | qTableViewListFromPtrList :: [Ptr (TQTableView a)] -> IO [QTableView a]
qTableViewListFromPtrList p
= objectListFromPtrList qtc_QTableView_getFinalizer p | 155 | qTableViewListFromPtrList p
= objectListFromPtrList qtc_QTableView_getFinalizer p | 83 | false | true | 0 | 9 | 16 | 44 | 21 | 23 | null | null |
dpwright/z80 | tests/tests.hs | mit | main :: IO ()
main = defaultMain $ testGroup "Tests" [
testGroup "Load Group"
[ testCase "LD r, r'" $ ld H E $?= [0x63]
, testCase "LD r, n" $ ld E 0xa5 $?= [0x1e, 0xa5]
, testCase "LD r, (HL)" $ ld C [HL] $?= [0x4e]
, testCase "LD r, (IX+d)" $ ld B [IX + 0x19] ... | 11,781 | main :: IO ()
main = defaultMain $ testGroup "Tests" [
testGroup "Load Group"
[ testCase "LD r, r'" $ ld H E $?= [0x63]
, testCase "LD r, n" $ ld E 0xa5 $?= [0x1e, 0xa5]
, testCase "LD r, (HL)" $ ld C [HL] $?= [0x4e]
, testCase "LD r, (IX+d)" $ ld B [IX + 0x19] ... | 11,781 | main = defaultMain $ testGroup "Tests" [
testGroup "Load Group"
[ testCase "LD r, r'" $ ld H E $?= [0x63]
, testCase "LD r, n" $ ld E 0xa5 $?= [0x1e, 0xa5]
, testCase "LD r, (HL)" $ ld C [HL] $?= [0x4e]
, testCase "LD r, (IX+d)" $ ld B [IX + 0x19] $?= [0xdd, ... | 11,767 | false | true | 2 | 14 | 4,830 | 4,353 | 2,326 | 2,027 | null | null |
gabesoft/kapi | src/Handlers/Common.hs | bsd-3-clause | -- ^
-- Create a single record
createSingle
:: RecordDefinition
-> (Text -> String)
-> Record
-> Api (Headers '[ Header "Location" String, Header "Link" String] (ApiData ApiResult))
createSingle def getLink input =
runSingle (dbInsert def input) (mkCreateSingleResult getLink) | 286 | createSingle
:: RecordDefinition
-> (Text -> String)
-> Record
-> Api (Headers '[ Header "Location" String, Header "Link" String] (ApiData ApiResult))
createSingle def getLink input =
runSingle (dbInsert def input) (mkCreateSingleResult getLink) | 255 | createSingle def getLink input =
runSingle (dbInsert def input) (mkCreateSingleResult getLink) | 96 | true | true | 0 | 14 | 48 | 97 | 48 | 49 | null | null |
matterhorn-chat/matterhorn | src/Matterhorn/Login.hs | bsd-3-clause | credentialsForm :: State -> Widget Name
credentialsForm st =
hCenter $ hLimit uiWidth $ vLimit 15 $
border $
vBox [ renderText "Please enter your Mattermost credentials to log in."
, padTop (Pad 1) $ renderForm (st^.loginForm)
, hCenter $ renderText "Press Enter to log in or Esc to exit."
... | 330 | credentialsForm :: State -> Widget Name
credentialsForm st =
hCenter $ hLimit uiWidth $ vLimit 15 $
border $
vBox [ renderText "Please enter your Mattermost credentials to log in."
, padTop (Pad 1) $ renderForm (st^.loginForm)
, hCenter $ renderText "Press Enter to log in or Esc to exit."
... | 330 | credentialsForm st =
hCenter $ hLimit uiWidth $ vLimit 15 $
border $
vBox [ renderText "Please enter your Mattermost credentials to log in."
, padTop (Pad 1) $ renderForm (st^.loginForm)
, hCenter $ renderText "Press Enter to log in or Esc to exit."
] | 290 | false | true | 0 | 11 | 89 | 88 | 42 | 46 | null | null |
achirkin/qua-kit | apps/hs/qua-server/src/Application.hs | mit | -- | Run DB queries
db :: ReaderT SqlBackend (HandlerT App IO) a -> IO a
db = handler . runDB | 93 | db :: ReaderT SqlBackend (HandlerT App IO) a -> IO a
db = handler . runDB | 73 | db = handler . runDB | 20 | true | true | 0 | 9 | 20 | 44 | 20 | 24 | null | null |
elieux/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | failM_RDR = nameRdrName failMName | 47 | failM_RDR = nameRdrName failMName | 47 | failM_RDR = nameRdrName failMName | 47 | false | false | 0 | 5 | 17 | 9 | 4 | 5 | null | null |
david-caro/shellcheck | ShellCheck/Analytics.hs | gpl-3.0 | prop_checkConditionalAndOrs5 = verify checkConditionalAndOrs "[ -z 3 -o a = b ]" | 80 | prop_checkConditionalAndOrs5 = verify checkConditionalAndOrs "[ -z 3 -o a = b ]" | 80 | prop_checkConditionalAndOrs5 = verify checkConditionalAndOrs "[ -z 3 -o a = b ]" | 80 | false | false | 0 | 5 | 11 | 11 | 5 | 6 | null | null |
ahmadsalim/p3-tool | p3-tool/TVL/Pretty.hs | gpl-3.0 | prettySetExpr (SRange b1 b2) = brackets (prettySetExprBound b1 <+> text ".." <+> prettySetExprBound b2) | 103 | prettySetExpr (SRange b1 b2) = brackets (prettySetExprBound b1 <+> text ".." <+> prettySetExprBound b2) | 103 | prettySetExpr (SRange b1 b2) = brackets (prettySetExprBound b1 <+> text ".." <+> prettySetExprBound b2) | 103 | false | false | 0 | 9 | 13 | 40 | 18 | 22 | null | null |
mzini/termlib | Termlib/Trs.hs | gpl-3.0 | unions :: [Trs] -> Trs
unions = List.foldl union empty | 54 | unions :: [Trs] -> Trs
unions = List.foldl union empty | 54 | unions = List.foldl union empty | 31 | false | true | 0 | 6 | 9 | 25 | 13 | 12 | null | null |
abakst/liquidhaskell | tests/pos/transpose.hs | bsd-3-clause | transpose n m ([] : _) = liquidError "transpose1" | 55 | transpose n m ([] : _) = liquidError "transpose1" | 55 | transpose n m ([] : _) = liquidError "transpose1" | 55 | false | false | 0 | 7 | 14 | 28 | 12 | 16 | null | null |
thewoolleyman/haskellbook | 10/10/haskell-club/ch10exercises.hs | unlicense | myMap :: (a -> b) -> [a] -> [b]
myMap f = foldr (\x acc -> f x : acc) [] | 72 | myMap :: (a -> b) -> [a] -> [b]
myMap f = foldr (\x acc -> f x : acc) [] | 72 | myMap f = foldr (\x acc -> f x : acc) [] | 40 | false | true | 0 | 9 | 20 | 59 | 31 | 28 | null | null |
ejlilley/AbstractMusic | Examples.hs | gpl-3.0 | somelength = AbstractDur3 4.56 | 30 | somelength = AbstractDur3 4.56 | 30 | somelength = AbstractDur3 4.56 | 30 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
isomorphism/hackage2 | Distribution/Server/Packages/Downloads.hs | bsd-3-clause | initialDownloadCounts :: DownloadCounts
initialDownloadCounts = emptyDownloadCounts | 83 | initialDownloadCounts :: DownloadCounts
initialDownloadCounts = emptyDownloadCounts | 83 | initialDownloadCounts = emptyDownloadCounts | 43 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
Raynes/fsutils | src/System/Path.hs | mit | -- | Remove useless paths from a list of paths.
filterUseless :: [FilePath] -> [FilePath]
filterUseless = (\\ [".", ".."]) | 122 | filterUseless :: [FilePath] -> [FilePath]
filterUseless = (\\ [".", ".."]) | 74 | filterUseless = (\\ [".", ".."]) | 32 | true | true | 0 | 8 | 19 | 39 | 21 | 18 | null | null |
shmookey/pure | install/Installer.hs | bsd-3-clause | guessInitSystem :: Installer InitSystem
guessInitSystem =
do
hasSystemd <- FS.isDirectory "/usr/lib/systemd"
hasUpstart <- FS.isDirectory "/usr/share/upstart"
hasSysVInit <- FS.isDirectory "/etc/init.d"
hasLaunchd <- FS.isFile "/sbin/launchd"
return $
if hasSystemd then Systemd
els... | 447 | guessInitSystem :: Installer InitSystem
guessInitSystem =
do
hasSystemd <- FS.isDirectory "/usr/lib/systemd"
hasUpstart <- FS.isDirectory "/usr/share/upstart"
hasSysVInit <- FS.isDirectory "/etc/init.d"
hasLaunchd <- FS.isFile "/sbin/launchd"
return $
if hasSystemd then Systemd
els... | 447 | guessInitSystem =
do
hasSystemd <- FS.isDirectory "/usr/lib/systemd"
hasUpstart <- FS.isDirectory "/usr/share/upstart"
hasSysVInit <- FS.isDirectory "/etc/init.d"
hasLaunchd <- FS.isFile "/sbin/launchd"
return $
if hasSystemd then Systemd
else if hasLaunchd then Launchd
else ... | 407 | false | true | 0 | 11 | 101 | 101 | 50 | 51 | null | null |
green-haskell/ghc | compiler/cmm/CLabel.hs | bsd-3-clause | pprCLbl (RtsLabel (RtsApInfoTable upd_reqd arity))
= hcat [ptext (sLit "stg_ap_"), text (show arity),
ptext (if upd_reqd
then (sLit "_upd_info")
else (sLit "_noupd_info"))
] | 247 | pprCLbl (RtsLabel (RtsApInfoTable upd_reqd arity))
= hcat [ptext (sLit "stg_ap_"), text (show arity),
ptext (if upd_reqd
then (sLit "_upd_info")
else (sLit "_noupd_info"))
] | 247 | pprCLbl (RtsLabel (RtsApInfoTable upd_reqd arity))
= hcat [ptext (sLit "stg_ap_"), text (show arity),
ptext (if upd_reqd
then (sLit "_upd_info")
else (sLit "_noupd_info"))
] | 247 | false | false | 0 | 11 | 96 | 79 | 40 | 39 | null | null |
gsdlab/clafer | src/Language/Clafer/Generator/Graph.hs | mit | graphCVLElement :: Element -> Maybe String -> Map.Map Span [Ir] -> String
graphCVLElement (Subclafer _ clafer) parent' irMap = graphCVLClafer clafer parent' irMap | 163 | graphCVLElement :: Element -> Maybe String -> Map.Map Span [Ir] -> String
graphCVLElement (Subclafer _ clafer) parent' irMap = graphCVLClafer clafer parent' irMap | 163 | graphCVLElement (Subclafer _ clafer) parent' irMap = graphCVLClafer clafer parent' irMap | 89 | false | true | 0 | 9 | 23 | 58 | 28 | 30 | null | null |
WraithM/peertrader-backend | src/PeerTrader/Socket/Activity.hs | bsd-3-clause | -- Need status
investmentJSON :: Investment -> Value
investmentJSON (Investment _ t _ ir) = investJSON t ir | 108 | investmentJSON :: Investment -> Value
investmentJSON (Investment _ t _ ir) = investJSON t ir | 92 | investmentJSON (Investment _ t _ ir) = investJSON t ir | 54 | true | true | 0 | 7 | 18 | 36 | 18 | 18 | null | null |
laanwj/Purecoin | Purecoin/Core/Script.hs | mit | reverseReplicateM :: (MonadPlus m) => Integer -> m a -> m [a]
-- reverseReplicateM n cmd | 0 <= n = reverse <$> replicateM n cmd
-- | otherwise = fail "reverseReplicateM given negative number"
reverseReplicateM n cmd = go n []
where
go 0 l = return l
go m l | 0 < m = do { i <- cmd; go (m... | 402 | reverseReplicateM :: (MonadPlus m) => Integer -> m a -> m [a]
reverseReplicateM n cmd = go n []
where
go 0 l = return l
go m l | 0 < m = do { i <- cmd; go (m-1) (i:l) }
| otherwise = fail "reverseReplicateM given negative number" | 247 | reverseReplicateM n cmd = go n []
where
go 0 l = return l
go m l | 0 < m = do { i <- cmd; go (m-1) (i:l) }
| otherwise = fail "reverseReplicateM given negative number" | 185 | true | true | 3 | 12 | 115 | 130 | 64 | 66 | null | null |
ocharles/hackage-server | Distribution/Server/Framework/Auth.hs | bsd-3-clause | adminRealm = RealmName "Hackage admin" | 40 | adminRealm = RealmName "Hackage admin" | 40 | adminRealm = RealmName "Hackage admin" | 40 | false | false | 1 | 5 | 6 | 13 | 4 | 9 | null | null |
urbanslug/ghc | testsuite/tests/gadt/T1999a.hs | bsd-3-clause | eqUnConstr :: EqTypes (s a) (s b) -> EqTypes a b
eqUnConstr (EqConstr eq) = eq | 78 | eqUnConstr :: EqTypes (s a) (s b) -> EqTypes a b
eqUnConstr (EqConstr eq) = eq | 78 | eqUnConstr (EqConstr eq) = eq | 29 | false | true | 0 | 8 | 15 | 46 | 22 | 24 | null | null |
ghcjs/ghcjs | src/Gen2/Compactor.hs | mit | staticIdentsV f (StaticThunk (Just (i, args))) =
StaticThunk . Just <$> liftA2 (,) (f i) (traverse (staticIdentsA f) args) | 124 | staticIdentsV f (StaticThunk (Just (i, args))) =
StaticThunk . Just <$> liftA2 (,) (f i) (traverse (staticIdentsA f) args) | 124 | staticIdentsV f (StaticThunk (Just (i, args))) =
StaticThunk . Just <$> liftA2 (,) (f i) (traverse (staticIdentsA f) args) | 124 | false | false | 0 | 10 | 20 | 67 | 34 | 33 | null | null |
markuspf/Idris-dev | src/IRTS/Compiler.hs | bsd-3-clause | irMain :: TT Name -> Idris LDecl
irMain tm = do
i <- irTerm (sMN 0 "runMain") M.empty [] tm
return $ LFun [] (sMN 0 "runMain") [] (LForce i) | 148 | irMain :: TT Name -> Idris LDecl
irMain tm = do
i <- irTerm (sMN 0 "runMain") M.empty [] tm
return $ LFun [] (sMN 0 "runMain") [] (LForce i) | 148 | irMain tm = do
i <- irTerm (sMN 0 "runMain") M.empty [] tm
return $ LFun [] (sMN 0 "runMain") [] (LForce i) | 115 | false | true | 0 | 10 | 37 | 86 | 40 | 46 | null | null |
alessandroleite/hephaestus-pl | src/graphusion/src/Data/FDTMC.hs | lgpl-3.0 | -- sem isso usa o formato científico...
transitionToString (FeatureExpression e) = show e | 89 | transitionToString (FeatureExpression e) = show e | 49 | transitionToString (FeatureExpression e) = show e | 49 | true | false | 0 | 7 | 12 | 19 | 9 | 10 | null | null |
brendanhay/gogol | gogol-run/gen/Network/Google/Resource/Run/Projects/Locations/Services/Create.hs | mpl-2.0 | -- | Legacy upload protocol for media (e.g. \"media\", \"multipart\").
plscUploadType :: Lens' ProjectsLocationsServicesCreate (Maybe Text)
plscUploadType
= lens _plscUploadType
(\ s a -> s{_plscUploadType = a}) | 219 | plscUploadType :: Lens' ProjectsLocationsServicesCreate (Maybe Text)
plscUploadType
= lens _plscUploadType
(\ s a -> s{_plscUploadType = a}) | 148 | plscUploadType
= lens _plscUploadType
(\ s a -> s{_plscUploadType = a}) | 79 | true | true | 0 | 9 | 34 | 48 | 25 | 23 | null | null |
olsner/ghc | compiler/main/HscTypes.hs | bsd-3-clause | -- | Constructs an empty PackageIfaceTable
emptyPackageIfaceTable :: PackageIfaceTable
emptyPackageIfaceTable = emptyModuleEnv | 126 | emptyPackageIfaceTable :: PackageIfaceTable
emptyPackageIfaceTable = emptyModuleEnv | 83 | emptyPackageIfaceTable = emptyModuleEnv | 39 | true | true | 0 | 4 | 11 | 12 | 7 | 5 | null | null |
apyrgio/ganeti | test/hs/Test/Ganeti/Locking/Waiting.hs | bsd-2-clause | -- | Fold a sequence of requests to transform a waiting strucutre onto the
-- empty waiting. As we consider all exported transformations, any waiting
-- structure can be obtained this way.
foldUpdates :: (Lock a, Ord b, Ord c)
=> [UpdateRequest a b c] -> LockWaiting a b c
foldUpdates = foldl asWaitingTrans ... | 332 | foldUpdates :: (Lock a, Ord b, Ord c)
=> [UpdateRequest a b c] -> LockWaiting a b c
foldUpdates = foldl asWaitingTrans emptyWaiting | 143 | foldUpdates = foldl asWaitingTrans emptyWaiting | 47 | true | true | 0 | 8 | 66 | 61 | 32 | 29 | null | null |
prl-tokyo/bigul-configuration-adaptation | Transformations/src/BiFlux/DTD/TypeDef.hs | mit | ppRepStructGeneric modname (Defined n) = pK1R <+> ppHName modname n | 78 | ppRepStructGeneric modname (Defined n) = pK1R <+> ppHName modname n | 78 | ppRepStructGeneric modname (Defined n) = pK1R <+> ppHName modname n | 78 | false | false | 0 | 7 | 20 | 26 | 12 | 14 | null | null |
expipiplus1/vulkan | generate-new/src/Render/Utils.hs | bsd-3-clause | chooseAlign :: Int -> (Doc ann, TH.Name, Doc ann -> Doc ann)
chooseAlign align = if align <= 8
then ("allocaBytes", 'allocaBytes, id)
else ("allocaBytesAligned", 'allocaBytesAligned, (<+> viaShow align)) | 207 | chooseAlign :: Int -> (Doc ann, TH.Name, Doc ann -> Doc ann)
chooseAlign align = if align <= 8
then ("allocaBytes", 'allocaBytes, id)
else ("allocaBytesAligned", 'allocaBytesAligned, (<+> viaShow align)) | 207 | chooseAlign align = if align <= 8
then ("allocaBytes", 'allocaBytes, id)
else ("allocaBytesAligned", 'allocaBytesAligned, (<+> viaShow align)) | 146 | false | true | 0 | 8 | 32 | 81 | 46 | 35 | null | null |
vesalvojdani/haskell-fm | Side.hs | gpl-2.0 | updSigma f = modify $ \(x,y,z) -> (f x,y,z) | 47 | updSigma f = modify $ \(x,y,z) -> (f x,y,z) | 47 | updSigma f = modify $ \(x,y,z) -> (f x,y,z) | 47 | false | false | 1 | 9 | 12 | 43 | 22 | 21 | null | null |
neosam/haskelltodo | src/Todo/Changelog.hs | bsd-3-clause | {-| Turns a LogEntry and its parent to a List.
Starting with the most recent LogEntry. -}
parentEntryToEntryList :: ParentLogEntry -> [LogEntry]
parentEntryToEntryList (StartLogEntry _) = [] | 194 | parentEntryToEntryList :: ParentLogEntry -> [LogEntry]
parentEntryToEntryList (StartLogEntry _) = [] | 100 | parentEntryToEntryList (StartLogEntry _) = [] | 45 | true | true | 0 | 6 | 30 | 34 | 17 | 17 | null | null |
forked-upstream-packages-for-ghcjs/ghc | compiler/main/TidyPgm.hs | bsd-3-clause | getClassImplicitBinds :: Class -> [CoreBind]
getClassImplicitBinds cls
= [ NonRec op (mkDictSelRhs cls val_index)
| (op, val_index) <- classAllSelIds cls `zip` [0..] ] | 173 | getClassImplicitBinds :: Class -> [CoreBind]
getClassImplicitBinds cls
= [ NonRec op (mkDictSelRhs cls val_index)
| (op, val_index) <- classAllSelIds cls `zip` [0..] ] | 173 | getClassImplicitBinds cls
= [ NonRec op (mkDictSelRhs cls val_index)
| (op, val_index) <- classAllSelIds cls `zip` [0..] ] | 128 | false | true | 0 | 10 | 28 | 69 | 35 | 34 | null | null |
micknelso/language-c | src/Language/CFamily/C/TravMonad.hs | bsd-3-clause | addRef :: (MonadCError m, MonadSymtab m, CNode u, CNode d) => u -> d -> m ()
addRef use def =
case (nodeInfo use, nodeInfo def) of
(NodeInfo _ _ useName, NodeInfo _ _ defName) ->
withDefTable
(\dt ->
((),
dt { refTable = insert (nameId useName) defName (refTable dt) }
)
... | 395 | addRef :: (MonadCError m, MonadSymtab m, CNode u, CNode d) => u -> d -> m ()
addRef use def =
case (nodeInfo use, nodeInfo def) of
(NodeInfo _ _ useName, NodeInfo _ _ defName) ->
withDefTable
(\dt ->
((),
dt { refTable = insert (nameId useName) defName (refTable dt) }
)
... | 395 | addRef use def =
case (nodeInfo use, nodeInfo def) of
(NodeInfo _ _ useName, NodeInfo _ _ defName) ->
withDefTable
(\dt ->
((),
dt { refTable = insert (nameId useName) defName (refTable dt) }
)
)
(_, _) -> return () -- Don't have Names for both, so can't record. | 318 | false | true | 2 | 13 | 122 | 163 | 84 | 79 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.