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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
rgaiacs/pandoc | src/Text/Pandoc/MIME.hs | gpl-2.0 | -- | Determime mime type appropriate for file path, defaulting to
-- “application/octet-stream” if nothing else fits.
getMimeTypeDef :: FilePath -> MimeType
getMimeTypeDef = fromMaybe "application/octet-stream" . getMimeType | 224 | getMimeTypeDef :: FilePath -> MimeType
getMimeTypeDef = fromMaybe "application/octet-stream" . getMimeType | 106 | getMimeTypeDef = fromMaybe "application/octet-stream" . getMimeType | 67 | true | true | 0 | 7 | 27 | 31 | 14 | 17 | null | null |
TomMD/ghc | compiler/types/InstEnv.hs | bsd-3-clause | classInstances :: InstEnvs -> Class -> [ClsInst]
classInstances (InstEnvs { ie_global = pkg_ie, ie_local = home_ie, ie_visible = vis_mods }) cls
= get home_ie ++ get pkg_ie
where
get env = case lookupUFM env cls of
Just (ClsIE insts) -> filter (instIsVisible vis_mods) insts
Nothi... | 636 | classInstances :: InstEnvs -> Class -> [ClsInst]
classInstances (InstEnvs { ie_global = pkg_ie, ie_local = home_ie, ie_visible = vis_mods }) cls
= get home_ie ++ get pkg_ie
where
get env = case lookupUFM env cls of
Just (ClsIE insts) -> filter (instIsVisible vis_mods) insts
Nothi... | 636 | classInstances (InstEnvs { ie_global = pkg_ie, ie_local = home_ie, ie_visible = vis_mods }) cls
= get home_ie ++ get pkg_ie
where
get env = case lookupUFM env cls of
Just (ClsIE insts) -> filter (instIsVisible vis_mods) insts
Nothing -> []
-- | Collects the names of c... | 587 | false | true | 0 | 10 | 157 | 121 | 65 | 56 | null | null |
ankhers/haskell-ide-engine | src/Haskell/Ide/Engine/Utils.hs | bsd-3-clause | -- |For all the plugins, validate that parameter names are unique within each
-- command. Otherwise return an error, describing the collisions.
validatePlugins :: Plugins -> Maybe PluginDescriptionError
validatePlugins plugins =
case paramNameCollisions plugins of
[] -> Nothing
collisions -> Just PluginDescrip... | 441 | validatePlugins :: Plugins -> Maybe PluginDescriptionError
validatePlugins plugins =
case paramNameCollisions plugins of
[] -> Nothing
collisions -> Just PluginDescriptionError {
pdeCollisions = collisions
, pdeErrorMsg = formatParamNameCollisionErrorMsg collisions
} | 297 | validatePlugins plugins =
case paramNameCollisions plugins of
[] -> Nothing
collisions -> Just PluginDescriptionError {
pdeCollisions = collisions
, pdeErrorMsg = formatParamNameCollisionErrorMsg collisions
} | 238 | true | true | 0 | 11 | 81 | 64 | 33 | 31 | null | null |
mettekou/ghc | compiler/basicTypes/MkId.hs | bsd-3-clause | -------------------------
dataConArgUnpack
:: Type
-> ( [(Type, StrictnessMark)] -- Rep types
, (Unboxer, Boxer) )
dataConArgUnpack arg_ty
| Just (tc, tc_args) <- splitTyConApp_maybe arg_ty
, Just con <- tyConSingleAlgDataCon_maybe tc
-- NB: check for an *algebraic* data type
-- A recur... | 1,107 | dataConArgUnpack
:: Type
-> ( [(Type, StrictnessMark)] -- Rep types
, (Unboxer, Boxer) )
dataConArgUnpack arg_ty
| Just (tc, tc_args) <- splitTyConApp_maybe arg_ty
, Just con <- tyConSingleAlgDataCon_maybe tc
-- NB: check for an *algebraic* data type
-- A recursive newtype might mean tha... | 1,080 | dataConArgUnpack arg_ty
| Just (tc, tc_args) <- splitTyConApp_maybe arg_ty
, Just con <- tyConSingleAlgDataCon_maybe tc
-- NB: check for an *algebraic* data type
-- A recursive newtype might mean that
-- 'arg_ty' is a newtype
, let rep_tys = dataConInstArgTys con tc_args
= ASSERT( isVanillaDat... | 975 | true | true | 0 | 17 | 341 | 314 | 163 | 151 | null | null |
jwiegley/ghc-release | libraries/bytestring/Data/ByteString/Internal.hs | gpl-3.0 | -- | Like 'unsafeCreate' but instead of giving the final size of the
-- ByteString, it is just an upper bound. The inner action returns
-- the actual size. Unlike 'createAndTrim' the ByteString is not
-- reallocated if the final size is less than the estimated size.
unsafeCreateUptoN :: Int -> (Ptr Word8 -> IO Int) -> ... | 395 | unsafeCreateUptoN :: Int -> (Ptr Word8 -> IO Int) -> ByteString
unsafeCreateUptoN l f = unsafeDupablePerformIO (createUptoN l f) | 128 | unsafeCreateUptoN l f = unsafeDupablePerformIO (createUptoN l f) | 64 | true | true | 0 | 9 | 65 | 52 | 27 | 25 | null | null |
ingemaradahl/bilder | src/Compiler/Lifter.hs | lgpl-3.0 | expandECall e = mapExpM expandECall e | 37 | expandECall e = mapExpM expandECall e | 37 | expandECall e = mapExpM expandECall e | 37 | false | false | 0 | 5 | 5 | 14 | 6 | 8 | null | null |
alexander-at-github/eta | compiler/ETA/Utils/Util.hs | bsd-3-clause | isSingleton _ = False | 23 | isSingleton _ = False | 23 | isSingleton _ = False | 23 | false | false | 0 | 4 | 5 | 10 | 4 | 6 | null | null |
GaloisInc/galua | galua-rts/src/Galua/FunValue.hs | mit | luaOpCodes (CFunction {}) = Nothing | 40 | luaOpCodes (CFunction {}) = Nothing | 40 | luaOpCodes (CFunction {}) = Nothing | 40 | false | false | 0 | 7 | 9 | 16 | 8 | 8 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 4575 = 4574 | 11 | 4575 = 4574 | 11 | 4575 = 4574 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
philipturnbull/quenelle | src/Quenelle/Match.hs | gpl-2.0 | comprehensionExprExprs path (ComprehensionDict dmp) = dictChildExprs (path._ComprehensionDict) dmp | 98 | comprehensionExprExprs path (ComprehensionDict dmp) = dictChildExprs (path._ComprehensionDict) dmp | 98 | comprehensionExprExprs path (ComprehensionDict dmp) = dictChildExprs (path._ComprehensionDict) dmp | 98 | false | false | 0 | 7 | 7 | 29 | 13 | 16 | null | null |
krisajenkins/Shakespeare-Trie | src/ShakespeareTrie.hs | bsd-3-clause | addPhrase Empty (T.uncons -> Just (c,cs)) =
Edge $
Map.singleton c
(addPhrase Empty cs) | 107 | addPhrase Empty (T.uncons -> Just (c,cs)) =
Edge $
Map.singleton c
(addPhrase Empty cs) | 107 | addPhrase Empty (T.uncons -> Just (c,cs)) =
Edge $
Map.singleton c
(addPhrase Empty cs) | 107 | false | false | 0 | 9 | 33 | 48 | 24 | 24 | null | null |
kwibus/myLang | src/Lexer.hs | bsd-3-clause | toString :: ReservedWord -> String
toString w = case show w of
(x : xs) -> toLower x : xs
[] -> error "incorrect instance show ReservedWord" | 156 | toString :: ReservedWord -> String
toString w = case show w of
(x : xs) -> toLower x : xs
[] -> error "incorrect instance show ReservedWord" | 156 | toString w = case show w of
(x : xs) -> toLower x : xs
[] -> error "incorrect instance show ReservedWord" | 121 | false | true | 2 | 6 | 42 | 57 | 27 | 30 | null | null |
svenkeidel/gnome-citadel | src/Path/Internal.hs | gpl-3.0 | evalPathFinder :: PathFinderConfig ->
PathFinderState ->
PathFinder a ->
a
evalPathFinder c st a = fst $ runPathFinder c st a | 179 | evalPathFinder :: PathFinderConfig ->
PathFinderState ->
PathFinder a ->
a
evalPathFinder c st a = fst $ runPathFinder c st a | 179 | evalPathFinder c st a = fst $ runPathFinder c st a | 50 | false | true | 2 | 9 | 74 | 50 | 22 | 28 | null | null |
spechub/Hets | Comorphisms/HolLight2Isabelle.hs | gpl-2.0 | arity2tp :: Int -> [(IsaSign.IsaClass, [(IsaSign.Typ, IsaSign.Sort)])]
arity2tp i = [(isaTerm, map (\ k -> (IsaSign.TFree ("'a" ++ show k) [],
[isaTerm])) [1 .. i])] | 167 | arity2tp :: Int -> [(IsaSign.IsaClass, [(IsaSign.Typ, IsaSign.Sort)])]
arity2tp i = [(isaTerm, map (\ k -> (IsaSign.TFree ("'a" ++ show k) [],
[isaTerm])) [1 .. i])] | 167 | arity2tp i = [(isaTerm, map (\ k -> (IsaSign.TFree ("'a" ++ show k) [],
[isaTerm])) [1 .. i])] | 96 | false | true | 0 | 15 | 26 | 104 | 57 | 47 | null | null |
R-Morgan/NGramCrackers | testsuite/NGramCrackers/Parsers/Metadata.hs | agpl-3.0 | toDay :: Int -> Day
toDay n | n < 1 = error "Not a day!"
| n > 31 = error "Not a day!"
| otherwise = Day n | 123 | toDay :: Int -> Day
toDay n | n < 1 = error "Not a day!"
| n > 31 = error "Not a day!"
| otherwise = Day n | 123 | toDay n | n < 1 = error "Not a day!"
| n > 31 = error "Not a day!"
| otherwise = Day n | 103 | false | true | 1 | 8 | 46 | 64 | 28 | 36 | null | null |
authchir/mini-ml | src/Compiler.hs | isc | clCo s (COpEQ ty e1 e2) = CCOpEQ ty (clAt s e1) (clAt s e2) | 65 | clCo s (COpEQ ty e1 e2) = CCOpEQ ty (clAt s e1) (clAt s e2) | 65 | clCo s (COpEQ ty e1 e2) = CCOpEQ ty (clAt s e1) (clAt s e2) | 65 | false | false | 0 | 7 | 20 | 44 | 21 | 23 | null | null |
ezyang/ghc | compiler/basicTypes/Id.hs | bsd-3-clause | -- | This predicate says whether the 'Id' has a strict demand placed on it or
-- has a type such that it can always be evaluated strictly (i.e an
-- unlifted type, as of GHC 7.6). We need to
-- check separately whether the 'Id' has a so-called \"strict type\" because if
-- the demand for the given @id@ hasn't been com... | 699 | isStrictId :: Id -> Bool
isStrictId id
= ASSERT2( isId id, text "isStrictId: not an id: " <+> ppr id )
not (isJoinId id) && (
(isStrictType (idType id)) ||
-- Take the best of both strictnesses - old and new
(isStrictDmd (idDemandInfo id))
) | 294 | isStrictId id
= ASSERT2( isId id, text "isStrictId: not an id: " <+> ppr id )
not (isJoinId id) && (
(isStrictType (idType id)) ||
-- Take the best of both strictnesses - old and new
(isStrictDmd (idDemandInfo id))
) | 269 | true | true | 2 | 11 | 177 | 101 | 50 | 51 | null | null |
cbare/Etudes | haskell/interpretter_01.hs | apache-2.0 | (Success a) `bindM` k = k a | 27 | (Success a) `bindM` k = k a | 27 | (Success a) `bindM` k = k a | 27 | false | false | 0 | 7 | 6 | 23 | 11 | 12 | null | null |
xu-hao/QueryArrow | QueryArrow-db-cypher/src/QueryArrow/Cypher/Cypher.hs | bsd-3-clause | translateFormulaToCypher (Aggregate (FReturn vars) a) =
translateFormulaToCypher a | 88 | translateFormulaToCypher (Aggregate (FReturn vars) a) =
translateFormulaToCypher a | 88 | translateFormulaToCypher (Aggregate (FReturn vars) a) =
translateFormulaToCypher a | 88 | false | false | 0 | 9 | 13 | 26 | 12 | 14 | null | null |
Baranowski/SourceGraph | Analyse/Utils.hs | gpl-3.0 | cliqueEdges' :: NGroup -> Set Edge
cliqueEdges' ns = S.fromList [(f,t) | f <- ns, t <- ns, f /= t] | 101 | cliqueEdges' :: NGroup -> Set Edge
cliqueEdges' ns = S.fromList [(f,t) | f <- ns, t <- ns, f /= t] | 101 | cliqueEdges' ns = S.fromList [(f,t) | f <- ns, t <- ns, f /= t] | 63 | false | true | 0 | 8 | 23 | 64 | 31 | 33 | null | null |
keithodulaigh/Hets | CASL_DL/Parse_AS.hs | gpl-2.0 | cardKeyword :: AParser st (CardType, Range)
cardKeyword = choice $ map ( \ v -> do
kw <- asKey $ show v
return (v, tokPos kw)) caslDLCardTypes | 150 | cardKeyword :: AParser st (CardType, Range)
cardKeyword = choice $ map ( \ v -> do
kw <- asKey $ show v
return (v, tokPos kw)) caslDLCardTypes | 150 | cardKeyword = choice $ map ( \ v -> do
kw <- asKey $ show v
return (v, tokPos kw)) caslDLCardTypes | 106 | false | true | 2 | 11 | 34 | 76 | 35 | 41 | null | null |
ucsd-progsys/csv-table | examples/test1.hs | mit | makeText r = printf "ID=%s: %s eats on %s at %s"
(lookupCol (C "PID") r)
(lookupCol (C "NAME") r)
(lookupCol (C "DAY") r)
(lookupCol (C "HOUR") r) | 208 | makeText r = printf "ID=%s: %s eats on %s at %s"
(lookupCol (C "PID") r)
(lookupCol (C "NAME") r)
(lookupCol (C "DAY") r)
(lookupCol (C "HOUR") r) | 208 | makeText r = printf "ID=%s: %s eats on %s at %s"
(lookupCol (C "PID") r)
(lookupCol (C "NAME") r)
(lookupCol (C "DAY") r)
(lookupCol (C "HOUR") r) | 208 | false | false | 0 | 9 | 88 | 76 | 37 | 39 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | attentively = id | 16 | attentively = id | 16 | attentively = id | 16 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
crufter/jobs | src/jobs.hs | bsd-3-clause | unregister :: Scheduler -> T.Text -> IO ()
unregister s name = E.bracket_ (lock s) (unlock s) $ do
Ref.modifyIORef (i s) $ \x -> x{jobs=M.delete name $ jobs x}
-- | Changes the interval of the job scheduler. | 212 | unregister :: Scheduler -> T.Text -> IO ()
unregister s name = E.bracket_ (lock s) (unlock s) $ do
Ref.modifyIORef (i s) $ \x -> x{jobs=M.delete name $ jobs x}
-- | Changes the interval of the job scheduler. | 212 | unregister s name = E.bracket_ (lock s) (unlock s) $ do
Ref.modifyIORef (i s) $ \x -> x{jobs=M.delete name $ jobs x}
-- | Changes the interval of the job scheduler. | 169 | false | true | 0 | 14 | 43 | 98 | 48 | 50 | null | null |
brendanhay/gogol | gogol-games-configuration/gen/Network/Google/GamesConfiguration/Types/Product.hs | mpl-2.0 | -- | The token for this resource.
lcToken :: Lens' LeaderboardConfiguration (Maybe Text)
lcToken = lens _lcToken (\ s a -> s{_lcToken = a}) | 139 | lcToken :: Lens' LeaderboardConfiguration (Maybe Text)
lcToken = lens _lcToken (\ s a -> s{_lcToken = a}) | 105 | lcToken = lens _lcToken (\ s a -> s{_lcToken = a}) | 50 | true | true | 1 | 9 | 23 | 49 | 25 | 24 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrimOp.hs | bsd-3-clause | primOpInfo Int64Ge = mkCompare (fsLit "geInt64#") int64PrimTy | 73 | primOpInfo Int64Ge = mkCompare (fsLit "geInt64#") int64PrimTy | 73 | primOpInfo Int64Ge = mkCompare (fsLit "geInt64#") int64PrimTy | 73 | false | false | 0 | 7 | 18 | 20 | 9 | 11 | null | null |
brendanhay/gogol | gogol-adexchangebuyer2/gen/Network/Google/Resource/AdExchangeBuyer2/Bidders/Accounts/FilterSets/List.hs | mpl-2.0 | -- | V1 error format.
bafslXgafv :: Lens' BiddersAccountsFilterSetsList (Maybe Xgafv)
bafslXgafv
= lens _bafslXgafv (\ s a -> s{_bafslXgafv = a}) | 147 | bafslXgafv :: Lens' BiddersAccountsFilterSetsList (Maybe Xgafv)
bafslXgafv
= lens _bafslXgafv (\ s a -> s{_bafslXgafv = a}) | 125 | bafslXgafv
= lens _bafslXgafv (\ s a -> s{_bafslXgafv = a}) | 61 | true | true | 1 | 9 | 23 | 50 | 25 | 25 | null | null |
kovach/web | res2/Syntax.hs | gpl-2.0 | tokenize ">" = Just $ Requires | 30 | tokenize ">" = Just $ Requires | 30 | tokenize ">" = Just $ Requires | 30 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
johan1a/haskell-go | src/Eval.hs | gpl-2.0 | --TODO rename
storeDecl :: Declaration -> State -> IO State
storeDecl (ConstDecl idDecls type_ exprs) state = bindDecls idDecls type_ exprs state | 145 | storeDecl :: Declaration -> State -> IO State
storeDecl (ConstDecl idDecls type_ exprs) state = bindDecls idDecls type_ exprs state | 131 | storeDecl (ConstDecl idDecls type_ exprs) state = bindDecls idDecls type_ exprs state | 85 | true | true | 0 | 10 | 21 | 51 | 24 | 27 | null | null |
nrolland/react-flux | src/React/Flux/DOM.hs | bsd-3-clause | progress_ :: Term eventHandler arg result => arg -> result; progress_ = term "progress" | 87 | progress_ :: Term eventHandler arg result => arg -> result
progress_ = term "progress" | 86 | progress_ = term "progress" | 27 | false | true | 0 | 6 | 13 | 30 | 15 | 15 | null | null |
dudebout/game-theoretic-learning | GTL/Plotting.hs | isc | linlogP :: Dataset d => d -> Plot ()
linlogP ds = do setDataset ds
addAxis XAxis (Side Lower) $ return ()
addAxis YAxis (Side Lower) $ return ()
setRangeFromData XAxis Lower Linear
setRangeFromData YAxis Lower Log | 277 | linlogP :: Dataset d => d -> Plot ()
linlogP ds = do setDataset ds
addAxis XAxis (Side Lower) $ return ()
addAxis YAxis (Side Lower) $ return ()
setRangeFromData XAxis Lower Linear
setRangeFromData YAxis Lower Log | 277 | linlogP ds = do setDataset ds
addAxis XAxis (Side Lower) $ return ()
addAxis YAxis (Side Lower) $ return ()
setRangeFromData XAxis Lower Linear
setRangeFromData YAxis Lower Log | 240 | false | true | 0 | 11 | 100 | 107 | 45 | 62 | null | null |
christiaanb/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | unPar1_RDR = varQual_RDR gHC_GENERICS (fsLit "unPar1") | 55 | unPar1_RDR = varQual_RDR gHC_GENERICS (fsLit "unPar1") | 55 | unPar1_RDR = varQual_RDR gHC_GENERICS (fsLit "unPar1") | 55 | false | false | 0 | 7 | 6 | 17 | 8 | 9 | null | null |
bitemyapp/hpp | src/Hpp/Expr.hs | bsd-3-clause | precedenceBin And = 1 | 21 | precedenceBin And = 1 | 21 | precedenceBin And = 1 | 21 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
isomorphism/hackage2 | Distribution/Server.hs | bsd-3-clause | -- | If we made a server instance from this 'ServerConfig', would we find some
-- existing saved state or would it be a totally clean instance with no
-- existing state.
--
hasSavedState :: ServerConfig -> IO Bool
hasSavedState = doesDirectoryExist . confAcidStateDir | 267 | hasSavedState :: ServerConfig -> IO Bool
hasSavedState = doesDirectoryExist . confAcidStateDir | 94 | hasSavedState = doesDirectoryExist . confAcidStateDir | 53 | true | true | 0 | 6 | 43 | 26 | 15 | 11 | null | null |
cabrera/stack | src/Stack/Types/Config.hs | bsd-3-clause | -- | Directory containing the project's stack.yaml file
bcRoot :: BuildConfig -> Path Abs Dir
bcRoot = parent . bcStackYaml | 123 | bcRoot :: BuildConfig -> Path Abs Dir
bcRoot = parent . bcStackYaml | 67 | bcRoot = parent . bcStackYaml | 29 | true | true | 0 | 7 | 19 | 31 | 14 | 17 | null | null |
rzil/honours | LeavittPathAlgebras/Example13.hs | mit | phi (WLPA.AEdge "e" 1) = a1 | 27 | phi (WLPA.AEdge "e" 1) = a1 | 27 | phi (WLPA.AEdge "e" 1) = a1 | 27 | false | false | 0 | 7 | 5 | 20 | 9 | 11 | null | null |
athanclark/Idris-dev | src/Idris/IBC.hs | bsd-3-clause | pCGFlags :: [(Codegen, String)] -> Idris ()
pCGFlags ls = mapM_ (uncurry addFlag) ls | 84 | pCGFlags :: [(Codegen, String)] -> Idris ()
pCGFlags ls = mapM_ (uncurry addFlag) ls | 84 | pCGFlags ls = mapM_ (uncurry addFlag) ls | 40 | false | true | 0 | 8 | 13 | 48 | 23 | 25 | null | null |
genos/online_problems | advent_of_code_2020/day12/Main.hs | mit | rotate' :: Point -> Int -> Point
rotate' p n = foldr (!*) p $ replicate (n `div` 90) m
where m = V2 (V2 0 (-1)) (V2 1 0) -- 90° clockwise rotation | 149 | rotate' :: Point -> Int -> Point
rotate' p n = foldr (!*) p $ replicate (n `div` 90) m
where m = V2 (V2 0 (-1)) (V2 1 0) -- 90° clockwise rotation | 149 | rotate' p n = foldr (!*) p $ replicate (n `div` 90) m
where m = V2 (V2 0 (-1)) (V2 1 0) -- 90° clockwise rotation | 116 | false | true | 0 | 9 | 36 | 84 | 44 | 40 | null | null |
liefswanson/projectEuler | src/Cards.hs | gpl-2.0 | stringToPokerHand :: String -> PokerHand
stringToPokerHand s = makePokerHand (a,b,c,d,e)
where
cardStrings = words s
[a,b,c,d,e] = map stringToCard cardStrings
-- Should not be used to create a new PokerHand, only for matching
-- All expected properties are enforced by the makePokerHand function | 317 | stringToPokerHand :: String -> PokerHand
stringToPokerHand s = makePokerHand (a,b,c,d,e)
where
cardStrings = words s
[a,b,c,d,e] = map stringToCard cardStrings
-- Should not be used to create a new PokerHand, only for matching
-- All expected properties are enforced by the makePokerHand function | 317 | stringToPokerHand s = makePokerHand (a,b,c,d,e)
where
cardStrings = words s
[a,b,c,d,e] = map stringToCard cardStrings
-- Should not be used to create a new PokerHand, only for matching
-- All expected properties are enforced by the makePokerHand function | 276 | false | true | 0 | 7 | 63 | 74 | 42 | 32 | null | null |
intolerable/project-utilities | post-to-arff/Main.hs | bsd-3-clause | main :: IO ()
main = getArgs >>= \case
[infile, outfile] -> go infile outfile
_ -> do
putStrLn "Invalid arguments"
exitFailure | 138 | main :: IO ()
main = getArgs >>= \case
[infile, outfile] -> go infile outfile
_ -> do
putStrLn "Invalid arguments"
exitFailure | 138 | main = getArgs >>= \case
[infile, outfile] -> go infile outfile
_ -> do
putStrLn "Invalid arguments"
exitFailure | 124 | false | true | 2 | 7 | 33 | 56 | 26 | 30 | null | null |
talanis85/mudblood | src/Mudblood/Screen/Gtk.hs | gpl-3.0 | updateTimer :: Int -> Screen u ()
updateTimer n = do
modify $ \s -> s { scrTime = n }
mb $ processTime n
updateWidgets
-- | Run the screen | 151 | updateTimer :: Int -> Screen u ()
updateTimer n = do
modify $ \s -> s { scrTime = n }
mb $ processTime n
updateWidgets
-- | Run the screen | 151 | updateTimer n = do
modify $ \s -> s { scrTime = n }
mb $ processTime n
updateWidgets
-- | Run the screen | 117 | false | true | 0 | 10 | 43 | 59 | 29 | 30 | null | null |
RomainGehrig/ConsoleChess | src/ConsoleChess/Utils.hs | mit | takeUntilWithHard hard soft (x:xs) = if hard x then []
else x : (if soft x then []
else takeUntilWithHard hard soft xs) | 215 | takeUntilWithHard hard soft (x:xs) = if hard x then []
else x : (if soft x then []
else takeUntilWithHard hard soft xs) | 215 | takeUntilWithHard hard soft (x:xs) = if hard x then []
else x : (if soft x then []
else takeUntilWithHard hard soft xs) | 215 | false | false | 0 | 9 | 118 | 60 | 31 | 29 | null | null |
ezyang/ghc | compiler/prelude/TysPrim.hs | bsd-3-clause | mkPrimTyConName :: FastString -> Unique -> TyCon -> Name
mkPrimTyConName = mkPrimTcName BuiltInSyntax | 101 | mkPrimTyConName :: FastString -> Unique -> TyCon -> Name
mkPrimTyConName = mkPrimTcName BuiltInSyntax | 101 | mkPrimTyConName = mkPrimTcName BuiltInSyntax | 44 | false | true | 0 | 7 | 12 | 26 | 13 | 13 | null | null |
blynn/combotrain | 15-haste.hs | gpl-3.0 | tile x y n = color (RGB c c c) $ fill $ rect (fromIntegral x, fromIntegral y)
(fromIntegral $ x + sz, fromIntegral $ y + sz)
where c | n == m^2 = 0
| otherwise = 255 - (225 * (n - 1) `div` (m^2 - 1)) | 214 | tile x y n = color (RGB c c c) $ fill $ rect (fromIntegral x, fromIntegral y)
(fromIntegral $ x + sz, fromIntegral $ y + sz)
where c | n == m^2 = 0
| otherwise = 255 - (225 * (n - 1) `div` (m^2 - 1)) | 214 | tile x y n = color (RGB c c c) $ fill $ rect (fromIntegral x, fromIntegral y)
(fromIntegral $ x + sz, fromIntegral $ y + sz)
where c | n == m^2 = 0
| otherwise = 255 - (225 * (n - 1) `div` (m^2 - 1)) | 214 | false | false | 1 | 12 | 64 | 151 | 72 | 79 | null | null |
sdiehl/ghc | compiler/types/Coercion.hs | bsd-3-clause | seqCo (SubCo co) = seqCo co | 42 | seqCo (SubCo co) = seqCo co | 42 | seqCo (SubCo co) = seqCo co | 42 | false | false | 0 | 6 | 20 | 19 | 8 | 11 | null | null |
Helium4Haskell/helium | lib/Prelude.hs | gpl-3.0 | id :: a -> a
id x = x | 21 | id :: a -> a
id x = x | 21 | id x = x | 8 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
gnn/Hets | Driver/Options.hs | gpl-2.0 | parseOutTypes :: String -> Flag
parseOutTypes str = case reads $ bracket str of
[(l, "")] -> OutTypes l
_ -> hetsError (str ++ " is not a valid OTYPES")
-- | parses a comma separated list from user input | 212 | parseOutTypes :: String -> Flag
parseOutTypes str = case reads $ bracket str of
[(l, "")] -> OutTypes l
_ -> hetsError (str ++ " is not a valid OTYPES")
-- | parses a comma separated list from user input | 212 | parseOutTypes str = case reads $ bracket str of
[(l, "")] -> OutTypes l
_ -> hetsError (str ++ " is not a valid OTYPES")
-- | parses a comma separated list from user input | 180 | false | true | 0 | 10 | 48 | 67 | 34 | 33 | null | null |
LambdaHack/LambdaHack | engine-src/Game/LambdaHack/Client/UI/Slideshow.hs | bsd-3-clause | emptySlideshow :: Slideshow
emptySlideshow = Slideshow [] | 57 | emptySlideshow :: Slideshow
emptySlideshow = Slideshow [] | 57 | emptySlideshow = Slideshow [] | 29 | false | true | 0 | 6 | 6 | 16 | 8 | 8 | null | null |
aelve/Jane | ClassesLens.hs | mit | (<>=) :: (MonadState s m, Monoid a) => ASetter' s a → a → m ()
l <>= a = modify (l <>~ a) | 89 | (<>=) :: (MonadState s m, Monoid a) => ASetter' s a → a → m ()
l <>= a = modify (l <>~ a) | 89 | l <>= a = modify (l <>~ a) | 26 | false | true | 0 | 11 | 23 | 64 | 32 | 32 | null | null |
olsner/sedition | Sed.hs | mit | forkState pgm = get >>= \state -> liftIO $ do
ipcState' <- forkIPCState (ipcState state)
return state {
program = pgm
, lineNumber = 0
, predicates = S.empty
, ipcState = ipcState'
} | 197 | forkState pgm = get >>= \state -> liftIO $ do
ipcState' <- forkIPCState (ipcState state)
return state {
program = pgm
, lineNumber = 0
, predicates = S.empty
, ipcState = ipcState'
} | 197 | forkState pgm = get >>= \state -> liftIO $ do
ipcState' <- forkIPCState (ipcState state)
return state {
program = pgm
, lineNumber = 0
, predicates = S.empty
, ipcState = ipcState'
} | 197 | false | false | 0 | 13 | 48 | 72 | 38 | 34 | null | null |
alphaHeavy/cabal | Cabal/Distribution/Simple/Setup.hs | bsd-3-clause | configureCCompiler :: Verbosity -> ProgramConfiguration -> IO (FilePath, [String])
configureCCompiler verbosity lbi = configureProg verbosity lbi gccProgram | 156 | configureCCompiler :: Verbosity -> ProgramConfiguration -> IO (FilePath, [String])
configureCCompiler verbosity lbi = configureProg verbosity lbi gccProgram | 156 | configureCCompiler verbosity lbi = configureProg verbosity lbi gccProgram | 73 | false | true | 0 | 9 | 16 | 47 | 23 | 24 | null | null |
mcmaniac/ghc | compiler/cmm/CmmOpt.hs | bsd-3-clause | inlineExpr _ _ other_expr = other_expr | 38 | inlineExpr _ _ other_expr = other_expr | 38 | inlineExpr _ _ other_expr = other_expr | 38 | false | false | 0 | 5 | 5 | 13 | 6 | 7 | null | null |
deech/stack | src/main/Main.hs | bsd-3-clause | uploadCmd (args, mpvpBounds, ignoreCheck, don'tSign, sigServerUrl) go = do
let partitionM _ [] = return ([], [])
partitionM f (x:xs) = do
r <- f x
(as, bs) <- partitionM f xs
return $ if r then (x:as, bs) else (as, x:bs)
(files, nonFiles) <- partitionM D.doesFileExist... | 1,926 | uploadCmd (args, mpvpBounds, ignoreCheck, don'tSign, sigServerUrl) go = do
let partitionM _ [] = return ([], [])
partitionM f (x:xs) = do
r <- f x
(as, bs) <- partitionM f xs
return $ if r then (x:as, bs) else (as, x:bs)
(files, nonFiles) <- partitionM D.doesFileExist... | 1,926 | uploadCmd (args, mpvpBounds, ignoreCheck, don'tSign, sigServerUrl) go = do
let partitionM _ [] = return ([], [])
partitionM f (x:xs) = do
r <- f x
(as, bs) <- partitionM f xs
return $ if r then (x:as, bs) else (as, x:bs)
(files, nonFiles) <- partitionM D.doesFileExist... | 1,926 | false | false | 0 | 20 | 829 | 495 | 236 | 259 | null | null |
mettekou/ghc | compiler/nativeGen/SPARC/Ppr.hs | bsd-3-clause | pprInstr (FSQRT format reg1 reg2)
= pprFormatRegReg (sLit "fsqrt") format reg1 reg2 | 91 | pprInstr (FSQRT format reg1 reg2)
= pprFormatRegReg (sLit "fsqrt") format reg1 reg2 | 91 | pprInstr (FSQRT format reg1 reg2)
= pprFormatRegReg (sLit "fsqrt") format reg1 reg2 | 91 | false | false | 0 | 7 | 19 | 36 | 16 | 20 | null | null |
music-suite/music-pitch | src/Music/Pitch/Scale.hs | bsd-3-clause | eventhMode :: Mode Pitch
seventhMode = modeFromSteps [m2,m2,m2,_M2,m2,m2,m2,m2,_M2] _P8
| 88 | seventhMode :: Mode Pitch
seventhMode = modeFromSteps [m2,m2,m2,_M2,m2,m2,m2,m2,_M2] _P8 | 88 | seventhMode = modeFromSteps [m2,m2,m2,_M2,m2,m2,m2,m2,_M2] _P8 | 62 | false | true | 0 | 6 | 9 | 46 | 27 | 19 | null | null |
np/tdoc | Text/TDoc/QQ.hs | bsd-3-clause | quasiQuoter :: String -> QuasiQuoter
quasiQuoter qqName =
QuasiQuoter (err "expressions") (err "patterns")
-- if GHC7
(err "types") (err "declarations")
-- endif
where err kind _ = error $ qqName ++ ": not available in " ++ kind | 246 | quasiQuoter :: String -> QuasiQuoter
quasiQuoter qqName =
QuasiQuoter (err "expressions") (err "patterns")
-- if GHC7
(err "types") (err "declarations")
-- endif
where err kind _ = error $ qqName ++ ": not available in " ++ kind | 246 | quasiQuoter qqName =
QuasiQuoter (err "expressions") (err "patterns")
-- if GHC7
(err "types") (err "declarations")
-- endif
where err kind _ = error $ qqName ++ ": not available in " ++ kind | 209 | false | true | 0 | 7 | 55 | 89 | 40 | 49 | null | null |
josuf107/Adverb | Adverb/Common.hs | gpl-3.0 | clammily = id | 13 | clammily = id | 13 | clammily = id | 13 | false | false | 0 | 4 | 2 | 6 | 3 | 3 | null | null |
vito/atomo | src/Atomo/Kernel/List.hs | bsd-3-clause | foldrMV :: (Value -> Value -> VM Value) -> Value -> V.Vector Value -> VM Value
foldrMV _ acc vs | V.null vs = return acc | 120 | foldrMV :: (Value -> Value -> VM Value) -> Value -> V.Vector Value -> VM Value
foldrMV _ acc vs | V.null vs = return acc | 120 | foldrMV _ acc vs | V.null vs = return acc | 41 | false | true | 0 | 9 | 25 | 66 | 30 | 36 | null | null |
jwiegley/github | src/GitHub/Data.hs | bsd-3-clause | mkRepoName :: Text -> Name Repo
mkRepoName = N | 46 | mkRepoName :: Text -> Name Repo
mkRepoName = N | 46 | mkRepoName = N | 14 | false | true | 0 | 7 | 8 | 24 | 10 | 14 | null | null |
ocharles/ant-plus | src/ANTPlus/Network.hs | bsd-3-clause | sendAwaitingResponse :: ANT
-> ANTPlus.AntMessage
-> (ANTPlus.AntMessage -> Maybe a)
-> IO a
sendAwaitingResponse ant@ANT{..} msg f =
withReader
ant
f
(\responses ->
do send ant msg
atomically (readTBQueue responses)) | 311 | sendAwaitingResponse :: ANT
-> ANTPlus.AntMessage
-> (ANTPlus.AntMessage -> Maybe a)
-> IO a
sendAwaitingResponse ant@ANT{..} msg f =
withReader
ant
f
(\responses ->
do send ant msg
atomically (readTBQueue responses)) | 311 | sendAwaitingResponse ant@ANT{..} msg f =
withReader
ant
f
(\responses ->
do send ant msg
atomically (readTBQueue responses)) | 155 | false | true | 0 | 11 | 123 | 93 | 44 | 49 | null | null |
mydaum/cabal | Cabal/Distribution/Simple/Haddock.hs | bsd-3-clause | fromForeignLib :: Verbosity
-> FilePath
-> LocalBuildInfo
-> ComponentLocalBuildInfo
-> Maybe PathTemplate -- ^ template for HTML location
-> Version
-> ForeignLib
-> IO HaddockArgs
fromForeignLib verbosity tmp lbi ... | 738 | fromForeignLib :: Verbosity
-> FilePath
-> LocalBuildInfo
-> ComponentLocalBuildInfo
-> Maybe PathTemplate -- ^ template for HTML location
-> Version
-> ForeignLib
-> IO HaddockArgs
fromForeignLib verbosity tmp lbi ... | 738 | fromForeignLib verbosity tmp lbi clbi htmlTemplate haddockVersion flib = do
inFiles <- map snd `fmap` getFLibSourceFiles verbosity lbi flib clbi
args <- mkHaddockArgs verbosity tmp lbi clbi htmlTemplate
haddockVersion inFiles (foreignLibBuildInfo flib)
return args {
argOutputDir =... | 451 | false | true | 0 | 13 | 236 | 163 | 78 | 85 | null | null |
guoy34/ampersand | src/Database/Design/Ampersand/Prototype/Installer.hs | gpl-3.0 | --installerTriggers :: FSpec -> String
--installerTriggers _ = unlines $
-- [ "<?php"
-- , ""
-- , ""
-- , "// Array for trigger queries that need to be installed"
-- , "$queries = array();"
-- , ""
-- , ""
-- ] ++ [] -- something like: map unlines [ trigger tablename query |... | 1,652 | installerDefPop :: FSpec -> String
installerDefPop fSpec = unlines $
["<?php"
, "// Connect to the database"
, "include \"dbSettings.php\";"
, ""
, "$DB_link = mysqli_connect($DB_host,$DB_user,$DB_pass,$DB_name);"
, "// Check connection"
, "if (mysqli_connect_errno()) {"
... | 513 | installerDefPop fSpec = unlines $
["<?php"
, "// Connect to the database"
, "include \"dbSettings.php\";"
, ""
, "$DB_link = mysqli_connect($DB_host,$DB_user,$DB_pass,$DB_name);"
, "// Check connection"
, "if (mysqli_connect_errno()) {"
, " die(\"Failed to connect to the... | 478 | true | true | 4 | 7 | 530 | 113 | 76 | 37 | null | null |
TrustNoOne/Euler | haskell/src/Euler007.hs | mit | euler7 :: Int
euler7 = primes !! 10000 | 38 | euler7 :: Int
euler7 = primes !! 10000 | 38 | euler7 = primes !! 10000 | 24 | false | true | 0 | 5 | 7 | 15 | 8 | 7 | null | null |
neunenak/moketevenresli | sca.hs | bsd-3-clause | applyRulesToWord :: [SoundLaw] -> [Variable] -> String -> String
applyRulesToWord [] vars word = word | 101 | applyRulesToWord :: [SoundLaw] -> [Variable] -> String -> String
applyRulesToWord [] vars word = word | 101 | applyRulesToWord [] vars word = word | 36 | false | true | 0 | 7 | 14 | 38 | 20 | 18 | null | null |
kojiromike/Idris-dev | src/Idris/REPL/Parser.hs | bsd-3-clause | optArg :: (Opt -> Command) -> String -> IP.IdrisParser (Either String Command)
optArg cmd name = do
let emptyArgs = do
P.eof
return $ Left ("Usage is :" ++ name ++ " <option>")
let oneArg = do
o <- pOption
IP.whiteSpace
P.eof
return (Right (cmd o)... | 571 | optArg :: (Opt -> Command) -> String -> IP.IdrisParser (Either String Command)
optArg cmd name = do
let emptyArgs = do
P.eof
return $ Left ("Usage is :" ++ name ++ " <option>")
let oneArg = do
o <- pOption
IP.whiteSpace
P.eof
return (Right (cmd o)... | 571 | optArg cmd name = do
let emptyArgs = do
P.eof
return $ Left ("Usage is :" ++ name ++ " <option>")
let oneArg = do
o <- pOption
IP.whiteSpace
P.eof
return (Right (cmd o))
let failure = return $ Left "Unrecognized setting"
P.try emptyArgs ... | 492 | false | true | 1 | 16 | 185 | 232 | 107 | 125 | null | null |
k0001/gtk2hs | gtk/demo/unicode/Arabic.hs | gpl-3.0 | yell :: IO ()
yell = do
dia <- dialogNew
dialogAddButton dia stockOk ResponseOk
contain <- castToBox <$> dialogGetContentArea dia
msg <- labelNew (Just "This is not an option.")
boxPackStart contain msg PackNatural 0
widgetShow msg
dialogRun dia
return () | 271 | yell :: IO ()
yell = do
dia <- dialogNew
dialogAddButton dia stockOk ResponseOk
contain <- castToBox <$> dialogGetContentArea dia
msg <- labelNew (Just "This is not an option.")
boxPackStart contain msg PackNatural 0
widgetShow msg
dialogRun dia
return () | 271 | yell = do
dia <- dialogNew
dialogAddButton dia stockOk ResponseOk
contain <- castToBox <$> dialogGetContentArea dia
msg <- labelNew (Just "This is not an option.")
boxPackStart contain msg PackNatural 0
widgetShow msg
dialogRun dia
return () | 257 | false | true | 0 | 11 | 55 | 101 | 41 | 60 | null | null |
codemac/yi-editor | src/Yi/Editor.hs | gpl-2.0 | -- | Return the windows that are currently open on the buffer whose key is given
windowsOnBufferE :: BufferRef -> EditorM [Window]
windowsOnBufferE k = do
ts <- getA tabsA
return $ concatMap (concatMap (\win -> if (bufkey win == k) then [win] else [])) ts
-- | bring the editor focus the window with the given key.
... | 373 | windowsOnBufferE :: BufferRef -> EditorM [Window]
windowsOnBufferE k = do
ts <- getA tabsA
return $ concatMap (concatMap (\win -> if (bufkey win == k) then [win] else [])) ts
-- | bring the editor focus the window with the given key.
--
-- Fails if no window with the given key is found. | 292 | windowsOnBufferE k = do
ts <- getA tabsA
return $ concatMap (concatMap (\win -> if (bufkey win == k) then [win] else [])) ts
-- | bring the editor focus the window with the given key.
--
-- Fails if no window with the given key is found. | 242 | true | true | 0 | 16 | 74 | 87 | 46 | 41 | null | null |
AlexanderPankiv/ghc | compiler/nativeGen/Dwarf/Types.hs | bsd-3-clause | escapeChar c
| isAscii c && isPrint c && c /= '?' -- prevents trigraph warnings
= char c
| otherwise
= char '\\' <> char (intToDigit (ch `div` 64)) <>
char (intToDigit ((ch `div` 8) `mod` 8)) <>
char (intToDigit (ch `mod` 8))
where ch = ord c
-- | Generate an offset into ano... | 690 | escapeChar c
| isAscii c && isPrint c && c /= '?' -- prevents trigraph warnings
= char c
| otherwise
= char '\\' <> char (intToDigit (ch `div` 64)) <>
char (intToDigit ((ch `div` 8) `mod` 8)) <>
char (intToDigit (ch `mod` 8))
where ch = ord c
-- | Generate an offset into ano... | 690 | escapeChar c
| isAscii c && isPrint c && c /= '?' -- prevents trigraph warnings
= char c
| otherwise
= char '\\' <> char (intToDigit (ch `div` 64)) <>
char (intToDigit ((ch `div` 8) `mod` 8)) <>
char (intToDigit (ch `mod` 8))
where ch = ord c
-- | Generate an offset into ano... | 690 | false | false | 0 | 14 | 162 | 143 | 75 | 68 | null | null |
netom/hamloghs | src/HlLog.hs | mit | toLog :: ByteString -> [Tag] -> [Record] -> Log
toLog = Log | 59 | toLog :: ByteString -> [Tag] -> [Record] -> Log
toLog = Log | 59 | toLog = Log | 11 | false | true | 0 | 8 | 11 | 29 | 16 | 13 | null | null |
rueshyna/gogol | gogol-books/gen/Network/Google/Books/Types/Product.hs | mpl-2.0 | -- | Resource type.
usKind :: Lens' UserSettings Text
usKind = lens _usKind (\ s a -> s{_usKind = a}) | 101 | usKind :: Lens' UserSettings Text
usKind = lens _usKind (\ s a -> s{_usKind = a}) | 81 | usKind = lens _usKind (\ s a -> s{_usKind = a}) | 47 | true | true | 1 | 9 | 19 | 45 | 22 | 23 | null | null |
cliffano/swaggy-jenkins | clients/haskell-http-client/generated/lib/SwaggyJenkins/Core.hs | mit | _addMultiFormPart :: SwaggyJenkinsRequest req contentType res accept -> NH.Part -> SwaggyJenkinsRequest req contentType res accept
_addMultiFormPart req newpart =
let parts = case paramsBody (rParams req) of
ParamBodyMultipartFormData _parts -> _parts
_ -> []
in req & L.set (rParamsL . p... | 378 | _addMultiFormPart :: SwaggyJenkinsRequest req contentType res accept -> NH.Part -> SwaggyJenkinsRequest req contentType res accept
_addMultiFormPart req newpart =
let parts = case paramsBody (rParams req) of
ParamBodyMultipartFormData _parts -> _parts
_ -> []
in req & L.set (rParamsL . p... | 378 | _addMultiFormPart req newpart =
let parts = case paramsBody (rParams req) of
ParamBodyMultipartFormData _parts -> _parts
_ -> []
in req & L.set (rParamsL . paramsBodyL) (ParamBodyMultipartFormData (newpart : parts)) | 247 | false | true | 0 | 12 | 76 | 116 | 56 | 60 | null | null |
bjornars/HaskellGame | src/Utils.hs | bsd-3-clause | (|*|) = liftVec (*) | 19 | (|*|) = liftVec (*) | 19 | (|*|) = liftVec (*) | 19 | false | false | 0 | 5 | 3 | 13 | 8 | 5 | null | null |
AlexanderPankiv/ghc | compiler/prelude/PrelNames.hs | bsd-3-clause | pTyConKey = mkPreludeTyConUnique 145 | 36 | pTyConKey = mkPreludeTyConUnique 145 | 36 | pTyConKey = mkPreludeTyConUnique 145 | 36 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
d12frosted/optparse-applicative-kb | Options/Applicative/Builder.hs | bsd-3-clause | command' cmd as pinfo = foldl (\c a -> commandAlias a pinfo `mappend` c) (command cmd pinfo') as
where pinfo' = pinfo { infoProgDesc = desc }
desc = vcatChunks [infoProgDesc pinfo, paragraph $ "Aliases: " ++ intercalate ", " as ++ "."]
-- | Add a commandAlias to a subparser option. | 293 | command' cmd as pinfo = foldl (\c a -> commandAlias a pinfo `mappend` c) (command cmd pinfo') as
where pinfo' = pinfo { infoProgDesc = desc }
desc = vcatChunks [infoProgDesc pinfo, paragraph $ "Aliases: " ++ intercalate ", " as ++ "."]
-- | Add a commandAlias to a subparser option. | 293 | command' cmd as pinfo = foldl (\c a -> commandAlias a pinfo `mappend` c) (command cmd pinfo') as
where pinfo' = pinfo { infoProgDesc = desc }
desc = vcatChunks [infoProgDesc pinfo, paragraph $ "Aliases: " ++ intercalate ", " as ++ "."]
-- | Add a commandAlias to a subparser option. | 293 | false | false | 0 | 9 | 62 | 100 | 52 | 48 | null | null |
rueshyna/gogol | gogol-youtube/gen/Network/Google/YouTube/Types/Product.hs | mpl-2.0 | -- | The broadcast\'s recording status.
lbsRecordingStatus :: Lens' LiveBroadcastStatus (Maybe LiveBroadcastStatusRecordingStatus)
lbsRecordingStatus
= lens _lbsRecordingStatus
(\ s a -> s{_lbsRecordingStatus = a}) | 222 | lbsRecordingStatus :: Lens' LiveBroadcastStatus (Maybe LiveBroadcastStatusRecordingStatus)
lbsRecordingStatus
= lens _lbsRecordingStatus
(\ s a -> s{_lbsRecordingStatus = a}) | 182 | lbsRecordingStatus
= lens _lbsRecordingStatus
(\ s a -> s{_lbsRecordingStatus = a}) | 91 | true | true | 0 | 9 | 30 | 48 | 25 | 23 | null | null |
rahulmutt/ghcvm | compiler/Eta/Prelude/PrelNames.hs | bsd-3-clause | inheritsFamTyConName = tcQual gHC_CLASSES (fsLit "Inherits") inheritsFamTyConKey | 83 | inheritsFamTyConName = tcQual gHC_CLASSES (fsLit "Inherits") inheritsFamTyConKey | 83 | inheritsFamTyConName = tcQual gHC_CLASSES (fsLit "Inherits") inheritsFamTyConKey | 83 | false | false | 0 | 7 | 9 | 19 | 9 | 10 | null | null |
glutamate/probably-baysig | src/Math/Probably/PDF.hs | bsd-3-clause | logNormal :: Double -> Double-> PDF Double
logNormal = logNormal | 64 | logNormal :: Double -> Double-> PDF Double
logNormal = logNormal | 64 | logNormal = logNormal | 21 | false | true | 0 | 8 | 9 | 28 | 12 | 16 | null | null |
dysinger/amazonka | amazonka-swf/gen/Network/AWS/SWF/ListClosedWorkflowExecutions.hs | mpl-2.0 | -- | If specified, only executions of the type specified in the filter are
-- returned.
--
-- 'closeStatusFilter', 'executionFilter', 'typeFilter' and 'tagFilter' are mutually
-- exclusive. You can specify at most one of these in a request.
lcweTypeFilter :: Lens' ListClosedWorkflowExecutions (Maybe WorkflowTypeFilter)... | 394 | lcweTypeFilter :: Lens' ListClosedWorkflowExecutions (Maybe WorkflowTypeFilter)
lcweTypeFilter = lens _lcweTypeFilter (\s a -> s { _lcweTypeFilter = a }) | 153 | lcweTypeFilter = lens _lcweTypeFilter (\s a -> s { _lcweTypeFilter = a }) | 73 | true | true | 1 | 9 | 56 | 53 | 29 | 24 | null | null |
Kyarigwo/ki-component-store | src/Kyarigwo/ComponentStore/Difference.hs | gpl-3.0 | changeValue entityId (Success v) table =
Map.insert entityId v table | 70 | changeValue entityId (Success v) table =
Map.insert entityId v table | 70 | changeValue entityId (Success v) table =
Map.insert entityId v table | 70 | false | false | 0 | 7 | 11 | 28 | 13 | 15 | null | null |
carlosavieira/self-study | programming/Haskell/99 problems/solutions/08.hs | gpl-3.0 | compress (x:ys@(y:_))
| x == y = compress ys
| otherwise = x : compress ys | 85 | compress (x:ys@(y:_))
| x == y = compress ys
| otherwise = x : compress ys | 85 | compress (x:ys@(y:_))
| x == y = compress ys
| otherwise = x : compress ys | 85 | false | false | 0 | 9 | 26 | 58 | 27 | 31 | null | null |
haskell-opengl/OpenGLRaw | src/Graphics/GL/ExtensionPredicates.hs | bsd-3-clause | -- | Is the <https://www.opengl.org/registry/specs/SUN/triangle_list.txt SUN_triangle_list> extension supported?
-- Note that in the presence of multiple contexts with different capabilities,
-- this might be wrong. Use 'glGetSUNTriangleList' in those cases instead.
gl_SUN_triangle_list :: Bool
gl_SUN_triangle_list = m... | 359 | gl_SUN_triangle_list :: Bool
gl_SUN_triangle_list = member "GL_SUN_triangle_list" extensions | 92 | gl_SUN_triangle_list = member "GL_SUN_triangle_list" extensions | 63 | true | true | 0 | 5 | 38 | 19 | 11 | 8 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 2003 = 2002 | 11 | 2003 = 2002 | 11 | 2003 = 2002 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
DavidAlphaFox/darcs | src/Darcs/UI/SelectChanges.hs | gpl-2.0 | -- | The actual interactive selection process.
textSelect :: forall p wX wY . (Patchy p, ShowPatch p, PatchInspect p, ApplyState p ~ Tree)
=> FL (LabelledPatch p) wX wY -> PatchChoices p wX wY
-> PatchSelectionM p IO (PatchChoices p wX wY)
textSelect lps' pcs = do
userSelection <- execStateT (... | 764 | textSelect :: forall p wX wY . (Patchy p, ShowPatch p, PatchInspect p, ApplyState p ~ Tree)
=> FL (LabelledPatch p) wX wY -> PatchChoices p wX wY
-> PatchSelectionM p IO (PatchChoices p wX wY)
textSelect lps' pcs = do
userSelection <- execStateT (skipMundane >>
... | 717 | textSelect lps' pcs = do
userSelection <- execStateT (skipMundane >>
showCur >>
textSelectIfAny)
ISC { total = lengthFL lps'
, current = 0
, lps = FZipper NilRL lps'
... | 502 | true | true | 0 | 12 | 327 | 201 | 101 | 100 | null | null |
arnabgho/HLearn | src/HLearn/Data/SpaceTree/CoverTree.hs | bsd-3-clause | addChild_ancestor :: forall exprat childC leafC dp k.
( ValidCT exprat childC leafC dp
) => AddChildMethod exprat childC leafC dp
addChild_ancestor dp ct = {-# SCC addChild_ancestor #-}
toList $ children $ foldr' (insertCT addChild_ancestor) ct' (concat $ map stToList dps)
where
( acc', dps ) = ... | 548 | addChild_ancestor :: forall exprat childC leafC dp k.
( ValidCT exprat childC leafC dp
) => AddChildMethod exprat childC leafC dp
addChild_ancestor dp ct = {-# SCC addChild_ancestor #-}
toList $ children $ foldr' (insertCT addChild_ancestor) ct' (concat $ map stToList dps)
where
( acc', dps ) = ... | 548 | addChild_ancestor dp ct = {-# SCC addChild_ancestor #-}
toList $ children $ foldr' (insertCT addChild_ancestor) ct' (concat $ map stToList dps)
where
( acc', dps ) = rmCloseChildren addChild_ancestor dp $ toList $ children ct
ct' :: CoverTree_ exprat childC leafC dp
ct' = ct
... | 410 | false | true | 0 | 15 | 149 | 172 | 91 | 81 | null | null |
laurencer/confluence-sync | vendor/haxr/PrettyNoMin.hs | bsd-3-clause | cdsect c = "<![CDATA[" <> chardata c <> "]]>" | 67 | cdsect c = "<![CDATA[" <> chardata c <> "]]>" | 67 | cdsect c = "<![CDATA[" <> chardata c <> "]]>" | 67 | false | false | 0 | 7 | 30 | 20 | 9 | 11 | null | null |
sighingnow/Functional-99-Problems | Haskell/09.hs | mit | pack (x:xs) = (x : takeWhile (== x) xs) : pack (dropWhile (==x) xs) | 67 | pack (x:xs) = (x : takeWhile (== x) xs) : pack (dropWhile (==x) xs) | 67 | pack (x:xs) = (x : takeWhile (== x) xs) : pack (dropWhile (==x) xs) | 67 | false | false | 0 | 9 | 13 | 52 | 27 | 25 | null | null |
karamellpelle/grid | source/OpenGL/Helpers.hs | gpl-3.0 | bindNewRBO :: IO GLuint
bindNewRBO =
alloca $ \ptr -> do
glGenRenderbuffers 1 ptr
rbo <- peek ptr
glBindRenderbuffer gl_RENDERBUFFER rbo
return rbo | 184 | bindNewRBO :: IO GLuint
bindNewRBO =
alloca $ \ptr -> do
glGenRenderbuffers 1 ptr
rbo <- peek ptr
glBindRenderbuffer gl_RENDERBUFFER rbo
return rbo | 184 | bindNewRBO =
alloca $ \ptr -> do
glGenRenderbuffers 1 ptr
rbo <- peek ptr
glBindRenderbuffer gl_RENDERBUFFER rbo
return rbo | 160 | false | true | 0 | 10 | 59 | 55 | 24 | 31 | null | null |
kosmikus/cabal | cabal-install/Distribution/Client/IndexUtils.hs | bsd-3-clause | -- | Like 'getSourcePackages', but reads the package index strictly. Useful if
-- you want to write to the package index after having read it.
getSourcePackagesStrict :: Verbosity -> [Repo] -> IO SourcePackageDb
getSourcePackagesStrict verbosity repos = getSourcePackages' verbosity repos
... | 353 | getSourcePackagesStrict :: Verbosity -> [Repo] -> IO SourcePackageDb
getSourcePackagesStrict verbosity repos = getSourcePackages' verbosity repos
ReadPackageIndexStrict | 210 | getSourcePackagesStrict verbosity repos = getSourcePackages' verbosity repos
ReadPackageIndexStrict | 141 | true | true | 0 | 7 | 82 | 39 | 20 | 19 | null | null |
chrisdone/fastirc | Network/FastIRC/Session.hs | bsd-3-clause | -- | Core bot management thread.
botManager :: Params -> Config -> IO ()
botManager params cfg = do
-- Initialize bot.
let eventChan = botEventChan $ cfg
cmdChan = botCmdChan . botSession $ cfg
h = botHandle $ cfg
writeChan eventChan ConnectedEvent
dispatchThread <- forkIO $
getChanContents e... | 2,517 | botManager :: Params -> Config -> IO ()
botManager params cfg = do
-- Initialize bot.
let eventChan = botEventChan $ cfg
cmdChan = botCmdChan . botSession $ cfg
h = botHandle $ cfg
writeChan eventChan ConnectedEvent
dispatchThread <- forkIO $
getChanContents eventChan >>= writeList2Chan cmdCha... | 2,483 | botManager params cfg = do
-- Initialize bot.
let eventChan = botEventChan $ cfg
cmdChan = botCmdChan . botSession $ cfg
h = botHandle $ cfg
writeChan eventChan ConnectedEvent
dispatchThread <- forkIO $
getChanContents eventChan >>= writeList2Chan cmdChan . map BotDispatch
netThread <- fork... | 2,443 | true | true | 0 | 24 | 823 | 753 | 346 | 407 | null | null |
suhailshergill/liboleg | Control/CCRef.hs | bsd-3-clause | test0 = runCC (return 1 >>= (return . (+ 4))) >>= expect 5 | 58 | test0 = runCC (return 1 >>= (return . (+ 4))) >>= expect 5 | 58 | test0 = runCC (return 1 >>= (return . (+ 4))) >>= expect 5 | 58 | false | false | 3 | 9 | 12 | 43 | 20 | 23 | null | null |
bitemyapp/hlint | data/Default.hs | bsd-3-clause | error = fst (span p x) ==> takeWhile p x | 40 | error = fst (span p x) ==> takeWhile p x | 40 | error = fst (span p x) ==> takeWhile p x | 40 | false | false | 1 | 7 | 9 | 29 | 12 | 17 | null | null |
larsrh/queue | Queue.hs | mit | singleChar :: GenParser Char st Char
singleChar = quoted <|> unquoted
where unquoted = satisfy (\c -> not (isSpace c) && c /= '\'' && c /= ',')
quoted = do char '\''
c <- satisfy (/= '\'')
char '\''
return c | 277 | singleChar :: GenParser Char st Char
singleChar = quoted <|> unquoted
where unquoted = satisfy (\c -> not (isSpace c) && c /= '\'' && c /= ',')
quoted = do char '\''
c <- satisfy (/= '\'')
char '\''
return c | 277 | singleChar = quoted <|> unquoted
where unquoted = satisfy (\c -> not (isSpace c) && c /= '\'' && c /= ',')
quoted = do char '\''
c <- satisfy (/= '\'')
char '\''
return c | 240 | false | true | 1 | 14 | 111 | 104 | 49 | 55 | null | null |
davidpdrsn/alisp | src/Interpret.hs | bsd-3-clause | boolValNot :: Value -> Value
boolValNot (BoolVal a) = BoolVal $ not a | 69 | boolValNot :: Value -> Value
boolValNot (BoolVal a) = BoolVal $ not a | 69 | boolValNot (BoolVal a) = BoolVal $ not a | 40 | false | true | 2 | 9 | 12 | 38 | 16 | 22 | null | null |
google/codeworld | codeworld-api/src/CodeWorld/Parameter.hs | apache-2.0 | framedHandle :: Event -> FrameState -> FrameState
framedHandle (PointerPress (px, py)) (param, (x, y), open, anchor)
| onOpenButton = (param, (x, y), not open, anchor)
| onTitleBar = (param, (x, y), open, Just (px, py))
where
Parameter _ _ _ (left, top, w, h) _ = param
onTitleBar =
abs (px - x - (le... | 585 | framedHandle :: Event -> FrameState -> FrameState
framedHandle (PointerPress (px, py)) (param, (x, y), open, anchor)
| onOpenButton = (param, (x, y), not open, anchor)
| onTitleBar = (param, (x, y), open, Just (px, py))
where
Parameter _ _ _ (left, top, w, h) _ = param
onTitleBar =
abs (px - x - (le... | 585 | framedHandle (PointerPress (px, py)) (param, (x, y), open, anchor)
| onOpenButton = (param, (x, y), not open, anchor)
| onTitleBar = (param, (x, y), open, Just (px, py))
where
Parameter _ _ _ (left, top, w, h) _ = param
onTitleBar =
abs (px - x - (left + w / 2)) < w / 2
&& abs (py - y - top ... | 535 | false | true | 6 | 20 | 178 | 312 | 168 | 144 | null | null |
bordaigorl/jamesbound | src/Language/PiCalc/Analysis/PetriNet.hs | gpl-2.0 | remTokens :: Ord pl => [(pl, TokenNum)] -> Marking pl -> Marking pl
remTokens pre m = foldr remTokensFrom m pre | 112 | remTokens :: Ord pl => [(pl, TokenNum)] -> Marking pl -> Marking pl
remTokens pre m = foldr remTokensFrom m pre | 111 | remTokens pre m = foldr remTokensFrom m pre | 43 | false | true | 0 | 8 | 21 | 53 | 26 | 27 | null | null |
olorin/amazonka | amazonka-s3/test/Test/AWS/Gen/S3.hs | mpl-2.0 | testListObjects :: ListObjects -> TestTree
testListObjects = req
"ListObjects"
"fixture/ListObjects.yaml" | 113 | testListObjects :: ListObjects -> TestTree
testListObjects = req
"ListObjects"
"fixture/ListObjects.yaml" | 113 | testListObjects = req
"ListObjects"
"fixture/ListObjects.yaml" | 70 | false | true | 0 | 5 | 17 | 21 | 10 | 11 | null | null |
sol/hexpat | Text/XML/Expat/SAX.hs | bsd-3-clause | textFromCString cstr = do
len <- c_strlen cstr
gxFromCStringLen (cstr, fromIntegral len)
-- | A helper for configuring the hexpat parser to use the specified entity
-- decoder. | 185 | textFromCString cstr = do
len <- c_strlen cstr
gxFromCStringLen (cstr, fromIntegral len)
-- | A helper for configuring the hexpat parser to use the specified entity
-- decoder. | 185 | textFromCString cstr = do
len <- c_strlen cstr
gxFromCStringLen (cstr, fromIntegral len)
-- | A helper for configuring the hexpat parser to use the specified entity
-- decoder. | 185 | false | false | 1 | 10 | 36 | 40 | 17 | 23 | null | null |
vikraman/ghc | compiler/hsSyn/HsDecls.hs | bsd-3-clause | ppr_con_names :: (OutputableBndr name) => [Located name] -> SDoc
ppr_con_names = pprWithCommas (pprPrefixOcc . unLoc) | 117 | ppr_con_names :: (OutputableBndr name) => [Located name] -> SDoc
ppr_con_names = pprWithCommas (pprPrefixOcc . unLoc) | 117 | ppr_con_names = pprWithCommas (pprPrefixOcc . unLoc) | 52 | false | true | 0 | 8 | 14 | 40 | 21 | 19 | null | null |
TOSPIO/yi | src/library/Yi/Keymap/Vim/ExMap.hs | gpl-2.0 | failBindingE :: VimBinding
failBindingE = VimBindingE f
where f evs s | vsMode s == Ex && evs == "<CR>"
= WholeMatch $ do
exitEx False
state <- getEditorDyn
printMsg . _unEv $ "Not an editor command: " <> vsOngoingInsertEvents state
return ... | 350 | failBindingE :: VimBinding
failBindingE = VimBindingE f
where f evs s | vsMode s == Ex && evs == "<CR>"
= WholeMatch $ do
exitEx False
state <- getEditorDyn
printMsg . _unEv $ "Not an editor command: " <> vsOngoingInsertEvents state
return ... | 350 | failBindingE = VimBindingE f
where f evs s | vsMode s == Ex && evs == "<CR>"
= WholeMatch $ do
exitEx False
state <- getEditorDyn
printMsg . _unEv $ "Not an editor command: " <> vsOngoingInsertEvents state
return Drop
f _ _ = NoMa... | 323 | false | true | 3 | 11 | 137 | 111 | 46 | 65 | null | null |
colin-adams/dragonfly-website | Dragonfly/ImageGallery/ImageGallery.hs | gpl-3.0 | -- | Save image files to disk
saveFiles :: String -> (String, String, String) -> String -> IO ()
saveFiles dir fnames@(thumbnailName, previewName, fname) imageType =
case imageType of
"jpeg" -> do -- TODO png and gif
image <- liftIO $ loadJpegFile (dir ++ fname)
(w, h) <- liftIO $ imageSize image
... | 743 | saveFiles :: String -> (String, String, String) -> String -> IO ()
saveFiles dir fnames@(thumbnailName, previewName, fname) imageType =
case imageType of
"jpeg" -> do -- TODO png and gif
image <- liftIO $ loadJpegFile (dir ++ fname)
(w, h) <- liftIO $ imageSize image
let ratio = fromIntegral h %... | 713 | saveFiles dir fnames@(thumbnailName, previewName, fname) imageType =
case imageType of
"jpeg" -> do -- TODO png and gif
image <- liftIO $ loadJpegFile (dir ++ fname)
(w, h) <- liftIO $ imageSize image
let ratio = fromIntegral h % fromIntegral w
previewImage <- liftIO $ resizeImage (fromInt... | 646 | true | true | 1 | 15 | 144 | 239 | 117 | 122 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.