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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
olsner/ghc | compiler/vectorise/Vectorise/Builtins/Base.hs | bsd-3-clause | packByTagPD_PrimVar :: TyCon -> Builtins -> Var
packByTagPD_PrimVar tc bi
= lookupEnvBuiltin "packByTagPD_PrimVar" (packByTagPD_PrimVars bi) (tyConName tc) | 157 | packByTagPD_PrimVar :: TyCon -> Builtins -> Var
packByTagPD_PrimVar tc bi
= lookupEnvBuiltin "packByTagPD_PrimVar" (packByTagPD_PrimVars bi) (tyConName tc) | 157 | packByTagPD_PrimVar tc bi
= lookupEnvBuiltin "packByTagPD_PrimVar" (packByTagPD_PrimVars bi) (tyConName tc) | 109 | false | true | 0 | 7 | 18 | 43 | 21 | 22 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/RDSDBInstance.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-rds-database-instance.html#cfn-rds-dbinstance-dbparametergroupname
rdsdbiDBParameterGroupName :: Lens' RDSDBInstance (Maybe (Val Text))
rdsdbiDBParameterGroupName = lens _rDSDBInstanceDBParameterGroupName (\s a -> s { _rDSDBInstanceDBPara... | 341 | rdsdbiDBParameterGroupName :: Lens' RDSDBInstance (Maybe (Val Text))
rdsdbiDBParameterGroupName = lens _rDSDBInstanceDBParameterGroupName (\s a -> s { _rDSDBInstanceDBParameterGroupName = a }) | 192 | rdsdbiDBParameterGroupName = lens _rDSDBInstanceDBParameterGroupName (\s a -> s { _rDSDBInstanceDBParameterGroupName = a }) | 123 | true | true | 0 | 9 | 22 | 52 | 28 | 24 | null | null |
ndmitchell/tagsoup | src/Text/HTML/TagSoup/Type.hs | bsd-3-clause | -- | Extract all text content from tags (similar to Verbatim found in HaXml)
innerText :: StringLike str => [Tag str] -> str
innerText = strConcat . mapMaybe maybeTagText | 170 | innerText :: StringLike str => [Tag str] -> str
innerText = strConcat . mapMaybe maybeTagText | 93 | innerText = strConcat . mapMaybe maybeTagText | 45 | true | true | 0 | 8 | 28 | 36 | 18 | 18 | null | null |
oden-lang/oden | src/Oden/Pretty.hs | mit | isFunctionType :: Poly.Type -> Bool
isFunctionType = \case
Poly.TFn{} -> True
Poly.TNoArgFn{} -> True
Poly.TForeignFn{} -> True
_ -> False | 171 | isFunctionType :: Poly.Type -> Bool
isFunctionType = \case
Poly.TFn{} -> True
Poly.TNoArgFn{} -> True
Poly.TForeignFn{} -> True
_ -> False | 171 | isFunctionType = \case
Poly.TFn{} -> True
Poly.TNoArgFn{} -> True
Poly.TForeignFn{} -> True
_ -> False | 135 | false | true | 2 | 6 | 52 | 40 | 26 | 14 | null | null |
larioj/nemo | src/Config.hs | mit | configDir :: String
configDir = "NemoLib" | 41 | configDir :: String
configDir = "NemoLib" | 41 | configDir = "NemoLib" | 21 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
patrikja/SyntheticPopulations | src/Example1.hs | bsd-3-clause | smallPopProblem1 = take 3 (drop 9 fullPop) | 42 | smallPopProblem1 = take 3 (drop 9 fullPop) | 42 | smallPopProblem1 = take 3 (drop 9 fullPop) | 42 | false | false | 1 | 7 | 6 | 24 | 9 | 15 | null | null |
JacquesCarette/literate-scientific-software | code/drasil-data/Data/Drasil/Concepts/Physics.hs | bsd-2-clause | pressure = dccWDS "pressure" (cn' "pressure")
(S "a" +:+ phrase force +:+ S "exerted over an area") | 101 | pressure = dccWDS "pressure" (cn' "pressure")
(S "a" +:+ phrase force +:+ S "exerted over an area") | 101 | pressure = dccWDS "pressure" (cn' "pressure")
(S "a" +:+ phrase force +:+ S "exerted over an area") | 101 | false | false | 1 | 9 | 18 | 45 | 18 | 27 | null | null |
green-haskell/ghc | libraries/base/Data/OldList.hs | bsd-3-clause | inits :: [a] -> [[a]]
inits = map toListSB . scanl' snocSB emptySB | 102 | inits :: [a] -> [[a]]
inits = map toListSB . scanl' snocSB emptySB | 102 | inits = map toListSB . scanl' snocSB emptySB | 62 | false | true | 0 | 7 | 48 | 36 | 19 | 17 | null | null |
tjakway/ghcjvm | compiler/main/DynFlags.hs | bsd-3-clause | add_dep_message (OptIntSuffix f) message =
OptIntSuffix $ \oi -> f oi >> deprecate message | 121 | add_dep_message (OptIntSuffix f) message =
OptIntSuffix $ \oi -> f oi >> deprecate message | 121 | add_dep_message (OptIntSuffix f) message =
OptIntSuffix $ \oi -> f oi >> deprecate message | 121 | false | false | 1 | 8 | 44 | 40 | 17 | 23 | null | null |
romanb/amazonka | amazonka-kinesis/gen/Network/AWS/Kinesis/Types.hs | mpl-2.0 | -- | 'HashKeyRange' constructor.
--
-- The fields accessible through corresponding lenses are:
--
-- * 'hkrEndingHashKey' @::@ 'Text'
--
-- * 'hkrStartingHashKey' @::@ 'Text'
--
hashKeyRange :: Text -- ^ 'hkrStartingHashKey'
-> Text -- ^ 'hkrEndingHashKey'
-> HashKeyRange
hashKeyRange p1 p2 = ... | 400 | hashKeyRange :: Text -- ^ 'hkrStartingHashKey'
-> Text -- ^ 'hkrEndingHashKey'
-> HashKeyRange
hashKeyRange p1 p2 = HashKeyRange
{ _hkrStartingHashKey = p1
, _hkrEndingHashKey = p2
} | 222 | hashKeyRange p1 p2 = HashKeyRange
{ _hkrStartingHashKey = p1
, _hkrEndingHashKey = p2
} | 101 | true | true | 0 | 7 | 92 | 52 | 32 | 20 | null | null |
nominolo/haddock2 | src/Haddock/Convert.hs | bsd-2-clause | synifyIdSig :: SynifyTypeState -> Id -> Sig Name
synifyIdSig s i = TypeSig (synifyName i) (synifyType s (varType i)) | 116 | synifyIdSig :: SynifyTypeState -> Id -> Sig Name
synifyIdSig s i = TypeSig (synifyName i) (synifyType s (varType i)) | 116 | synifyIdSig s i = TypeSig (synifyName i) (synifyType s (varType i)) | 67 | false | true | 0 | 9 | 18 | 52 | 25 | 27 | null | null |
markflorisson/packages | Pkgs/Parser.hs | bsd-3-clause | parseExpr :: Parser Expr
parseExpr
= do expr1 <- parseLam <|> parseVarOrProj <|>
parseIntVal <|> parseUnit <|> parens parseExpr
appExpr <- optionMaybe parseExpr
addExpr <- optionMaybe (charWS '+' *> parseExpr)
return $ case (appExpr, addExpr) of
(Just expr2,... | 447 | parseExpr :: Parser Expr
parseExpr
= do expr1 <- parseLam <|> parseVarOrProj <|>
parseIntVal <|> parseUnit <|> parens parseExpr
appExpr <- optionMaybe parseExpr
addExpr <- optionMaybe (charWS '+' *> parseExpr)
return $ case (appExpr, addExpr) of
(Just expr2,... | 447 | parseExpr
= do expr1 <- parseLam <|> parseVarOrProj <|>
parseIntVal <|> parseUnit <|> parens parseExpr
appExpr <- optionMaybe parseExpr
addExpr <- optionMaybe (charWS '+' *> parseExpr)
return $ case (appExpr, addExpr) of
(Just expr2, Nothing) -> App expr1 ex... | 422 | false | true | 0 | 13 | 144 | 146 | 69 | 77 | null | null |
Mokosha/Lambency | lib/Lambency/Transform.hs | mit | scale (Translate _ xf) = scale xf | 33 | scale (Translate _ xf) = scale xf | 33 | scale (Translate _ xf) = scale xf | 33 | false | false | 0 | 7 | 6 | 20 | 9 | 11 | null | null |
brendanhay/czar | czar/Czar/Socket.hs | mpl-2.0 | logPeerTX :: MonadIO m => String -> Context m ()
logPeerTX msg = do
peer <- peerName
name <- sockName
logTX name peer msg | 133 | logPeerTX :: MonadIO m => String -> Context m ()
logPeerTX msg = do
peer <- peerName
name <- sockName
logTX name peer msg | 133 | logPeerTX msg = do
peer <- peerName
name <- sockName
logTX name peer msg | 84 | false | true | 0 | 8 | 35 | 56 | 25 | 31 | null | null |
ComputationWithBoundedResources/ara-inference | doc/tpdb_trs/Haskell/basic_haskell/rangeSize_3.hs | mit | primCmpNat Zero (Succ y) = LT | 29 | primCmpNat Zero (Succ y) = LT | 29 | primCmpNat Zero (Succ y) = LT | 29 | false | false | 0 | 7 | 5 | 17 | 8 | 9 | null | null |
fpco/rest-client | Setup.hs | bsd-3-clause | copyDirectory :: FilePath -> FilePath -> IO ()
copyDirectory src dst = do
content <- getDirectoryContents src
forM_ (filter (`notElem` [".", ".."]) content) $ \name -> do
let srcPath = src ++ "/" ++ name
dstPath = dst ++ "/" ++ name
isDirectory <- doesDirectoryExist srcPath
if isDirectory
... | 533 | copyDirectory :: FilePath -> FilePath -> IO ()
copyDirectory src dst = do
content <- getDirectoryContents src
forM_ (filter (`notElem` [".", ".."]) content) $ \name -> do
let srcPath = src ++ "/" ++ name
dstPath = dst ++ "/" ++ name
isDirectory <- doesDirectoryExist srcPath
if isDirectory
... | 533 | copyDirectory src dst = do
content <- getDirectoryContents src
forM_ (filter (`notElem` [".", ".."]) content) $ \name -> do
let srcPath = src ++ "/" ++ name
dstPath = dst ++ "/" ++ name
isDirectory <- doesDirectoryExist srcPath
if isDirectory
then do targetExists <- doesDirectoryExist dstP... | 485 | false | true | 0 | 15 | 135 | 162 | 78 | 84 | null | null |
isomorphism/hackage2 | Distribution/Server/Features/PackageList.hs | bsd-3-clause | updateDownload :: Int -> PackageItem -> PackageItem
updateDownload count item =
item {
itemDownloads = count
} | 126 | updateDownload :: Int -> PackageItem -> PackageItem
updateDownload count item =
item {
itemDownloads = count
} | 126 | updateDownload count item =
item {
itemDownloads = count
} | 74 | false | true | 0 | 6 | 32 | 32 | 17 | 15 | null | null |
jutaro/rdf4h | testsuite/tests/Data/RDF/GraphTestUtils.hs | bsd-3-clause | p_select_match_po :: RDF rdf => (rdf -> Triples) -> rdf -> Property
p_select_match_po =
p_select_match_fn same mkPattern
where
same t1 t2 = predicateOf t1 == predicateOf t2 && objectOf t1 == objectOf t2
mkPattern t = (Nothing, Just (\n -> n == predicateOf t), Just (\n -> n == objectOf t)) | 301 | p_select_match_po :: RDF rdf => (rdf -> Triples) -> rdf -> Property
p_select_match_po =
p_select_match_fn same mkPattern
where
same t1 t2 = predicateOf t1 == predicateOf t2 && objectOf t1 == objectOf t2
mkPattern t = (Nothing, Just (\n -> n == predicateOf t), Just (\n -> n == objectOf t)) | 301 | p_select_match_po =
p_select_match_fn same mkPattern
where
same t1 t2 = predicateOf t1 == predicateOf t2 && objectOf t1 == objectOf t2
mkPattern t = (Nothing, Just (\n -> n == predicateOf t), Just (\n -> n == objectOf t)) | 233 | false | true | 2 | 11 | 62 | 143 | 64 | 79 | null | null |
LambdaMx/haskelldojo | session_1/StringCalculator.hs | unlicense | mkAdd3 delimiter = foldl1 (+) . map toInt . (split delimiter) | 61 | mkAdd3 delimiter = foldl1 (+) . map toInt . (split delimiter) | 61 | mkAdd3 delimiter = foldl1 (+) . map toInt . (split delimiter) | 61 | false | false | 0 | 7 | 10 | 31 | 15 | 16 | null | null |
ancientlanguage/haskell-analysis | prepare/src/Prepare/Decompose.hs | mit | decomposeChar '\xF9E3' = "\x6CE5" | 33 | decomposeChar '\xF9E3' = "\x6CE5" | 33 | decomposeChar '\xF9E3' = "\x6CE5" | 33 | false | false | 1 | 5 | 3 | 13 | 4 | 9 | null | null |
CompSciCabal/SMRTYPRTY | paip/pete/ch6/Search.hs | unlicense | binaryTree :: Integer -> [Integer]
binaryTree n = [2*n, 2*n+1] | 62 | binaryTree :: Integer -> [Integer]
binaryTree n = [2*n, 2*n+1] | 62 | binaryTree n = [2*n, 2*n+1] | 27 | false | true | 0 | 8 | 9 | 45 | 22 | 23 | null | null |
brendanhay/gogol | gogol-shopping-content/gen/Network/Google/Resource/Content/ReturnpolicyOnline/Get.hs | mpl-2.0 | -- | Creates a value of 'ReturnpolicyOnlineGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'rogXgafv'
--
-- * 'rogReturnPolicyId'
--
-- * 'rogMerchantId'
--
-- * 'rogUploadProtocol'
--
-- * 'rogAccessToken'
--
-- * 'rogUploadType'... | 804 | returnpolicyOnlineGet
:: Text -- ^ 'rogReturnPolicyId'
-> Int64 -- ^ 'rogMerchantId'
-> ReturnpolicyOnlineGet
returnpolicyOnlineGet pRogReturnPolicyId_ pRogMerchantId_ =
ReturnpolicyOnlineGet'
{ _rogXgafv = Nothing
, _rogReturnPolicyId = pRogReturnPolicyId_
, _rogMerchantId = _Coerce # pRogMer... | 461 | returnpolicyOnlineGet pRogReturnPolicyId_ pRogMerchantId_ =
ReturnpolicyOnlineGet'
{ _rogXgafv = Nothing
, _rogReturnPolicyId = pRogReturnPolicyId_
, _rogMerchantId = _Coerce # pRogMerchantId_
, _rogUploadProtocol = Nothing
, _rogAccessToken = Nothing
, _rogUploadType = Nothing
, _rogCallb... | 339 | true | true | 0 | 8 | 152 | 100 | 64 | 36 | null | null |
flipstone/orville | orville-postgresql-libpq/test/Test/SelectOptions.hs | mit | prop_fieldGreaterThanOperator :: Property.NamedProperty
prop_fieldGreaterThanOperator =
Property.singletonNamedProperty ".> generates expected sql" $
assertWhereClauseEquals
(Just "WHERE \"foo\" > $1")
(SO.where_ $ fooField .> 0) | 247 | prop_fieldGreaterThanOperator :: Property.NamedProperty
prop_fieldGreaterThanOperator =
Property.singletonNamedProperty ".> generates expected sql" $
assertWhereClauseEquals
(Just "WHERE \"foo\" > $1")
(SO.where_ $ fooField .> 0) | 247 | prop_fieldGreaterThanOperator =
Property.singletonNamedProperty ".> generates expected sql" $
assertWhereClauseEquals
(Just "WHERE \"foo\" > $1")
(SO.where_ $ fooField .> 0) | 191 | false | true | 0 | 10 | 39 | 46 | 23 | 23 | null | null |
ml9951/ghc | compiler/rename/RnBinds.hs | bsd-3-clause | mkSigTvFn :: [LSig Name] -> (Name -> [Name])
-- Return a lookup function that maps an Id Name to the names
-- of the type variables that should scope over its body..
mkSigTvFn sigs
= \n -> lookupNameEnv env n `orElse` []
where
extractScopedTyVars :: LHsType Name -> [Name]
extractScopedTyVars (L _ (HsForAllT... | 1,589 | mkSigTvFn :: [LSig Name] -> (Name -> [Name])
mkSigTvFn sigs
= \n -> lookupNameEnv env n `orElse` []
where
extractScopedTyVars :: LHsType Name -> [Name]
extractScopedTyVars (L _ (HsForAllTy Explicit _ ltvs _ _)) = hsLKiTyVarNames ltvs
extractScopedTyVars _ = []
env :: NameEnv [Name]
env = mkName... | 1,468 | mkSigTvFn sigs
= \n -> lookupNameEnv env n `orElse` []
where
extractScopedTyVars :: LHsType Name -> [Name]
extractScopedTyVars (L _ (HsForAllTy Explicit _ ltvs _ _)) = hsLKiTyVarNames ltvs
extractScopedTyVars _ = []
env :: NameEnv [Name]
env = mkNameEnv [ (name, nwcs ++ extractScopedTyVars ty) ... | 1,423 | true | true | 0 | 11 | 392 | 197 | 107 | 90 | null | null |
haskell-streaming/streaming | benchmarks/old/Stream/ByteString.hs | bsd-3-clause | splitAt :: (Monad m)
=> Int
-> Stream (Of ByteString) m r
-> Stream (Of ByteString) m (Stream (Of ByteString) m r)
splitAt n =
buildStream
. fmap buildStream
. FB.splitAt n
. foldStream | 223 | splitAt :: (Monad m)
=> Int
-> Stream (Of ByteString) m r
-> Stream (Of ByteString) m (Stream (Of ByteString) m r)
splitAt n =
buildStream
. fmap buildStream
. FB.splitAt n
. foldStream | 223 | splitAt n =
buildStream
. fmap buildStream
. FB.splitAt n
. foldStream | 78 | false | true | 3 | 12 | 71 | 97 | 45 | 52 | null | null |
iand675/hs-kafka | src/Network/Kafka/Internal/Connection.hs | bsd-3-clause | createKafkaConnection' :: HostName -> ServiceName -> Transport -> IO KafkaConnection
createKafkaConnection' h p t = do
leftoverRef <- newIORef BS.empty
cidRef <- newIORef 0
pendingRef <- newIORef I.empty
ms <- newMVar t
return $ KafkaConnection (h, p) ms leftoverRef pendingRef cidRef | 294 | createKafkaConnection' :: HostName -> ServiceName -> Transport -> IO KafkaConnection
createKafkaConnection' h p t = do
leftoverRef <- newIORef BS.empty
cidRef <- newIORef 0
pendingRef <- newIORef I.empty
ms <- newMVar t
return $ KafkaConnection (h, p) ms leftoverRef pendingRef cidRef | 294 | createKafkaConnection' h p t = do
leftoverRef <- newIORef BS.empty
cidRef <- newIORef 0
pendingRef <- newIORef I.empty
ms <- newMVar t
return $ KafkaConnection (h, p) ms leftoverRef pendingRef cidRef | 209 | false | true | 0 | 9 | 50 | 101 | 46 | 55 | null | null |
mstksg/neural | src/Data/Neural/HMatrix/FeedForward/Dropout.hs | mit | trainStep
:: forall i hs o. (KnownNat i, KnownNat o)
=> NeuralActs (Forward Double)
-> Double -- ^ learning rate
-> R i -- ^ input vector
-> R o -- ^ target vector
-> Network i hs o -- ^ network to train
-> Network i hs o
trainStep (NA f g) rate x0 targe... | 1,299 | trainStep
:: forall i hs o. (KnownNat i, KnownNat o)
=> NeuralActs (Forward Double)
-> Double -- ^ learning rate
-> R i -- ^ input vector
-> R o -- ^ target vector
-> Network i hs o -- ^ network to train
-> Network i hs o
trainStep (NA f g) rate x0 targe... | 1,299 | trainStep (NA f g) rate x0 target = fst . go x0
where
NA f_ g_ = NA (fst . diff' f) (fst . diff' g)
go :: forall j js. KnownNat j
=> R j -- ^ input vector
-> Network j js o -- ^ network to train
-> (Network j js o, R j)
go !x = \case
NetOL w@(FLayer _ wN) ->
... | 1,011 | false | true | 0 | 15 | 612 | 506 | 255 | 251 | null | null |
devtype-blogspot-com/Haskell-Examples | DelAllUpper/Demo.hs | gpl-3.0 | delAllUpper :: String -> String
delAllUpper [] = [] | 51 | delAllUpper :: String -> String
delAllUpper [] = [] | 51 | delAllUpper [] = [] | 19 | false | true | 0 | 8 | 8 | 28 | 12 | 16 | null | null |
cgag/cis-194-solutions | src/HW7/Editor.hs | bsd-3-clause | doCommand Prev = modCurLine (subtract 1) >> doCommand View | 58 | doCommand Prev = modCurLine (subtract 1) >> doCommand View | 58 | doCommand Prev = modCurLine (subtract 1) >> doCommand View | 58 | false | false | 0 | 8 | 8 | 25 | 11 | 14 | null | null |
fpco/store | src/Data/Store/Version.hs | mit | tcFun :: TyCon
tcFun = tyConOf (Proxy :: Proxy (Int -> Int)) | 60 | tcFun :: TyCon
tcFun = tyConOf (Proxy :: Proxy (Int -> Int)) | 60 | tcFun = tyConOf (Proxy :: Proxy (Int -> Int)) | 45 | false | true | 0 | 8 | 11 | 36 | 17 | 19 | null | null |
keera-studios/pang-a-lambda | src/Game/Levels.hs | gpl-3.0 | objBlocks _ = [ staticBlock "block1" (200, 200) (100, 57) ] | 64 | objBlocks _ = [ staticBlock "block1" (200, 200) (100, 57) ] | 64 | objBlocks _ = [ staticBlock "block1" (200, 200) (100, 57) ] | 64 | false | false | 0 | 7 | 15 | 32 | 17 | 15 | null | null |
mudphone/HaskellBook | src/Sixteen.hs | mit | c = (*2) . (\x -> x - 2) | 24 | c = (*2) . (\x -> x - 2) | 24 | c = (*2) . (\x -> x - 2) | 24 | false | false | 1 | 9 | 8 | 30 | 15 | 15 | null | null |
binesiyu/ifl | examples/ch08/GlobRegexEither.hs | mit | charClass acc [] = Left "unterminated character class" | 54 | charClass acc [] = Left "unterminated character class" | 54 | charClass acc [] = Left "unterminated character class" | 54 | false | false | 0 | 6 | 7 | 16 | 7 | 9 | null | null |
beni55/cryptol | src/Cryptol/TypeCheck/Solver/Numeric/Interval.hs | bsd-3-clause | iMax :: Interval -> Interval -> Interval
iMax i j = Interval { iLower = nMax (iLower i) (iLower j)
, iUpper = case (iUpper i, iUpper j) of
(Nothing, Nothing) -> Nothing
(Just x, Just y) -> Just (nMax x y)
... | 580 | iMax :: Interval -> Interval -> Interval
iMax i j = Interval { iLower = nMax (iLower i) (iLower j)
, iUpper = case (iUpper i, iUpper j) of
(Nothing, Nothing) -> Nothing
(Just x, Just y) -> Just (nMax x y)
... | 580 | iMax i j = Interval { iLower = nMax (iLower i) (iLower j)
, iUpper = case (iUpper i, iUpper j) of
(Nothing, Nothing) -> Nothing
(Just x, Just y) -> Just (nMax x y)
(Nothing, Just Inf) -> Just In... | 539 | false | true | 0 | 13 | 316 | 184 | 93 | 91 | null | null |
ford-prefect/haskell-gi | lib/Data/GI/CodeGen/Struct.hs | lgpl-2.1 | genZeroStruct :: Name -> Struct -> CodeGen ()
genZeroStruct n s =
when (allocCalloc (structAllocationInfo s) /= AllocationOp "none" &&
structSize s /= 0) $
genZeroSU n (structSize s) (structIsBoxed s) | 218 | genZeroStruct :: Name -> Struct -> CodeGen ()
genZeroStruct n s =
when (allocCalloc (structAllocationInfo s) /= AllocationOp "none" &&
structSize s /= 0) $
genZeroSU n (structSize s) (structIsBoxed s) | 218 | genZeroStruct n s =
when (allocCalloc (structAllocationInfo s) /= AllocationOp "none" &&
structSize s /= 0) $
genZeroSU n (structSize s) (structIsBoxed s) | 172 | false | true | 0 | 13 | 48 | 85 | 40 | 45 | null | null |
mightymoose/liquidhaskell | tests/pos/GhcSort2.hs | bsd-3-clause | merge :: (Ord a) => [a] -> [a] -> Int -> [a]
merge [] ys _ = ys | 63 | merge :: (Ord a) => [a] -> [a] -> Int -> [a]
merge [] ys _ = ys | 63 | merge [] ys _ = ys | 18 | false | true | 0 | 11 | 17 | 56 | 28 | 28 | null | null |
mydaum/cabal | cabal-install/Distribution/Solver/Modular/Tree.hs | bsd-3-clause | zeroOrOneChoices (SChoice _ _ _ _ ts) = W.isZeroOrOne (W.filter active ts) | 81 | zeroOrOneChoices (SChoice _ _ _ _ ts) = W.isZeroOrOne (W.filter active ts) | 81 | zeroOrOneChoices (SChoice _ _ _ _ ts) = W.isZeroOrOne (W.filter active ts) | 81 | false | false | 0 | 8 | 18 | 38 | 18 | 20 | null | null |
aztek/voogie | src/Voogie/Parse/Boogie.hs | gpl-3.0 | main :: Parser Main
main = do
sequence_ [reserved kwdProcedure, reserved kwdMain, parens $ return ()]
rs <- optionMaybe returns
ms <- optionMaybe modifies
pre <- many (try precondition)
post <- many (try postcondition)
(ds, ss) <- braces $ do
ds <- many (try declaration)
ss <- many topLevel
ret... | 387 | main :: Parser Main
main = do
sequence_ [reserved kwdProcedure, reserved kwdMain, parens $ return ()]
rs <- optionMaybe returns
ms <- optionMaybe modifies
pre <- many (try precondition)
post <- many (try postcondition)
(ds, ss) <- braces $ do
ds <- many (try declaration)
ss <- many topLevel
ret... | 387 | main = do
sequence_ [reserved kwdProcedure, reserved kwdMain, parens $ return ()]
rs <- optionMaybe returns
ms <- optionMaybe modifies
pre <- many (try precondition)
post <- many (try postcondition)
(ds, ss) <- braces $ do
ds <- many (try declaration)
ss <- many topLevel
return (ds, ss)
retur... | 367 | false | true | 0 | 14 | 89 | 185 | 85 | 100 | null | null |
mcschroeder/ghc | libraries/template-haskell/Language/Haskell/TH/Syntax.hs | bsd-3-clause | rightName = mkNameG DataName "base" "Data.Either" "Right" | 57 | rightName = mkNameG DataName "base" "Data.Either" "Right" | 57 | rightName = mkNameG DataName "base" "Data.Either" "Right" | 57 | false | false | 0 | 5 | 6 | 15 | 7 | 8 | null | null |
haslab/SecreC | src/Language/SecreC/Transformation/Dafny.hs | gpl-3.0 | expressionToDafny isLVal isQExpr annK (QualExpr l e _) = do
expressionToDafny isLVal isQExpr annK e | 103 | expressionToDafny isLVal isQExpr annK (QualExpr l e _) = do
expressionToDafny isLVal isQExpr annK e | 103 | expressionToDafny isLVal isQExpr annK (QualExpr l e _) = do
expressionToDafny isLVal isQExpr annK e | 103 | false | false | 0 | 7 | 18 | 37 | 17 | 20 | null | null |
Mic92/eidolon | Handler/Signup.hs | agpl-3.0 | validateLen :: Text -> Bool
validateLen a =
(T.length a) > 2 | 62 | validateLen :: Text -> Bool
validateLen a =
(T.length a) > 2 | 62 | validateLen a =
(T.length a) > 2 | 34 | false | true | 0 | 8 | 13 | 30 | 15 | 15 | null | null |
xmonad/xmonad-contrib | XMonad/Hooks/StatusBar/PP.hs | bsd-3-clause | -- | Predicate for the current workspace. Caution: assumes default
-- precedence is respected.
isCurrent' :: WS -> Bool
isCurrent' WS{..} = S.tag wsWS == S.currentTag wsWindowSet | 178 | isCurrent' :: WS -> Bool
isCurrent' WS{..} = S.tag wsWS == S.currentTag wsWindowSet | 83 | isCurrent' WS{..} = S.tag wsWS == S.currentTag wsWindowSet | 58 | true | true | 0 | 7 | 26 | 40 | 20 | 20 | null | null |
forsyde/forsyde-atom | src/ForSyDe/Atom/MoC/DE/Lib.hs | bsd-3-clause | stated14 ns i = MoC.stated14 ns (unit4 i) | 41 | stated14 ns i = MoC.stated14 ns (unit4 i) | 41 | stated14 ns i = MoC.stated14 ns (unit4 i) | 41 | false | false | 1 | 7 | 7 | 28 | 11 | 17 | null | null |
jfischoff/oxymoron | src/Oxymoron/Regions/Program.hs | bsd-3-clause | glAttachShader :: (AncestorRegion pr cr, MonadIO cr,
ProgramResource programResource,
ShaderResource shaderResource)
=> programResource pr -> shaderResource pr -> cr ()
glAttachShader progHandle shaderHandle = liftIO $
GL.glAttachShader (_resourceId . unprogramR... | 413 | glAttachShader :: (AncestorRegion pr cr, MonadIO cr,
ProgramResource programResource,
ShaderResource shaderResource)
=> programResource pr -> shaderResource pr -> cr ()
glAttachShader progHandle shaderHandle = liftIO $
GL.glAttachShader (_resourceId . unprogramR... | 413 | glAttachShader progHandle shaderHandle = liftIO $
GL.glAttachShader (_resourceId . unprogramResource $ progHandle)
(_resourceId . unshaderResource $ shaderHandle) | 191 | false | true | 0 | 9 | 118 | 97 | 48 | 49 | null | null |
thielema/wxhaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcTypes.hs | lgpl-2.1 | withRefFont :: (Ptr (TFont a) -> IO ()) -> IO (Font a)
withRefFont f
= withManagedFontResult $ assignRefPtr wxFont_Create f | 126 | withRefFont :: (Ptr (TFont a) -> IO ()) -> IO (Font a)
withRefFont f
= withManagedFontResult $ assignRefPtr wxFont_Create f | 126 | withRefFont f
= withManagedFontResult $ assignRefPtr wxFont_Create f | 71 | false | true | 0 | 10 | 22 | 57 | 27 | 30 | null | null |
t4sk/upenn-cis194 | hw-10/AParser.hs | mit | maybeMap :: Maybe ((a -> b), c) -> (c -> Maybe (a, c)) -> Maybe (b, c)
maybeMap Nothing _ = Nothing | 99 | maybeMap :: Maybe ((a -> b), c) -> (c -> Maybe (a, c)) -> Maybe (b, c)
maybeMap Nothing _ = Nothing | 99 | maybeMap Nothing _ = Nothing | 28 | false | true | 0 | 10 | 21 | 65 | 35 | 30 | null | null |
cservenka/ROOPLPPC | src/MacroExpander.hs | mit | meMacro FreeListsSize = asks freeListsSize | 42 | meMacro FreeListsSize = asks freeListsSize | 42 | meMacro FreeListsSize = asks freeListsSize | 42 | false | false | 0 | 5 | 4 | 12 | 5 | 7 | null | null |
tonymorris/java-character | src/Language/Java/Character/IsUpperCase.hs | bsd-3-clause | isUpperCaseSet ::
(Num a, Enum a, Ord a) =>
Diet a
isUpperCaseSet =
let r = [
[65..90]
, [192..214]
, [216..222]
, [256]
, [258]
, [260]
, [262]
, [264]
, [266]
, [268]
, [270]
, [272]
... | 8,504 | isUpperCaseSet ::
(Num a, Enum a, Ord a) =>
Diet a
isUpperCaseSet =
let r = [
[65..90]
, [192..214]
, [216..222]
, [256]
, [258]
, [260]
, [262]
, [264]
, [266]
, [268]
, [270]
, [272]
... | 8,504 | isUpperCaseSet =
let r = [
[65..90]
, [192..214]
, [216..222]
, [256]
, [258]
, [260]
, [262]
, [264]
, [266]
, [268]
, [270]
, [272]
, [274]
, [276]
, [278]
... | 8,449 | false | true | 0 | 10 | 5,094 | 2,728 | 1,785 | 943 | null | null |
brendanhay/gogol | gogol-healthcare/gen/Network/Google/Resource/Healthcare/Projects/Locations/DataSets/ConsentStores/ConsentArtifacts/Create.hs | mpl-2.0 | -- | Upload protocol for media (e.g. \"raw\", \"multipart\").
pldscscacUploadProtocol :: Lens' ProjectsLocationsDataSetsConsentStoresConsentArtifactsCreate (Maybe Text)
pldscscacUploadProtocol
= lens _pldscscacUploadProtocol
(\ s a -> s{_pldscscacUploadProtocol = a}) | 275 | pldscscacUploadProtocol :: Lens' ProjectsLocationsDataSetsConsentStoresConsentArtifactsCreate (Maybe Text)
pldscscacUploadProtocol
= lens _pldscscacUploadProtocol
(\ s a -> s{_pldscscacUploadProtocol = a}) | 213 | pldscscacUploadProtocol
= lens _pldscscacUploadProtocol
(\ s a -> s{_pldscscacUploadProtocol = a}) | 106 | true | true | 0 | 9 | 33 | 48 | 25 | 23 | null | null |
robstewart57/stack | src/Stack/FileWatch.hs | bsd-3-clause | -- | Run an action, watching for file changes
--
-- The action provided takes a callback that is used to set the files to be
-- watched. When any of those files are changed, we rerun the action again.
fileWatchConf :: WatchConfig
-> IO (Path Abs Dir)
-> ((Set (Path Abs File) -> IO ()) -> IO ... | 3,989 | fileWatchConf :: WatchConfig
-> IO (Path Abs Dir)
-> ((Set (Path Abs File) -> IO ()) -> IO ())
-> IO ()
fileWatchConf cfg getProjectRoot inner = withManagerConf cfg $ \manager -> do
allFiles <- newTVarIO Set.empty
dirtyVar <- newTVarIO True
watchVar <- newTVarIO Map... | 3,788 | fileWatchConf cfg getProjectRoot inner = withManagerConf cfg $ \manager -> do
allFiles <- newTVarIO Set.empty
dirtyVar <- newTVarIO True
watchVar <- newTVarIO Map.empty
projRoot <- getProjectRoot
mChecker <- findIgnoreFiles [VCSGit, VCSMercurial, VCSDarcs] projRoot >>= buildChecker
(FileIgnoredC... | 3,642 | true | true | 0 | 25 | 1,620 | 903 | 418 | 485 | null | null |
shockone/coreutils | src/cat/decorators.hs | mit | decorate content ShowEnds = replace "\n" "$\n" content | 61 | decorate content ShowEnds = replace "\n" "$\n" content | 61 | decorate content ShowEnds = replace "\n" "$\n" content | 61 | false | false | 0 | 5 | 14 | 18 | 8 | 10 | null | null |
chpatrick/hmidi | examples/SMF.hs | bsd-3-clause | rack = do
mtrk
len <- liftM fromIntegral int32
dat <- replicateM len anyChar
withInput dat eventlist
| 109 | track = do
mtrk
len <- liftM fromIntegral int32
dat <- replicateM len anyChar
withInput dat eventlist | 109 | track = do
mtrk
len <- liftM fromIntegral int32
dat <- replicateM len anyChar
withInput dat eventlist | 109 | false | false | 1 | 8 | 25 | 44 | 17 | 27 | null | null |
brendanhay/gogol | gogol-androidmanagement/gen/Network/Google/AndroidManagement/Types/Product.hs | mpl-2.0 | -- | The Android Device Policy app version as displayed to the user.
siAndroidDevicePolicyVersionName :: Lens' SoftwareInfo (Maybe Text)
siAndroidDevicePolicyVersionName
= lens _siAndroidDevicePolicyVersionName
(\ s a -> s{_siAndroidDevicePolicyVersionName = a}) | 270 | siAndroidDevicePolicyVersionName :: Lens' SoftwareInfo (Maybe Text)
siAndroidDevicePolicyVersionName
= lens _siAndroidDevicePolicyVersionName
(\ s a -> s{_siAndroidDevicePolicyVersionName = a}) | 201 | siAndroidDevicePolicyVersionName
= lens _siAndroidDevicePolicyVersionName
(\ s a -> s{_siAndroidDevicePolicyVersionName = a}) | 133 | true | true | 0 | 8 | 37 | 49 | 25 | 24 | null | null |
owainlewis/seven | src/Language/Ava/Internal/Stack.hs | bsd-3-clause | modify :: ([a] -> [a]) -> Stack a -> Stack a
modify f (Stack s p v) = Stack (f s) p v | 85 | modify :: ([a] -> [a]) -> Stack a -> Stack a
modify f (Stack s p v) = Stack (f s) p v | 85 | modify f (Stack s p v) = Stack (f s) p v | 40 | false | true | 0 | 10 | 22 | 73 | 34 | 39 | null | null |
sseefried/shady-graphics | src/Shady/CompileEffect.hs | agpl-3.0 | shadyGeometry :: ShadyGeometry Color
shadyGeometry = ShadyGeometry {
shadyImage = const $ clear,
shadySurface = xyPlane } | 139 | shadyGeometry :: ShadyGeometry Color
shadyGeometry = ShadyGeometry {
shadyImage = const $ clear,
shadySurface = xyPlane } | 139 | shadyGeometry = ShadyGeometry {
shadyImage = const $ clear,
shadySurface = xyPlane } | 102 | false | true | 1 | 8 | 34 | 36 | 18 | 18 | null | null |
brendanhay/gogol | gogol-tagmanager/gen/Network/Google/TagManager/Types/Product.hs | mpl-2.0 | -- | The last update time-stamp for the authorization code.
eAuthorizationTimestamp :: Lens' Environment (Maybe UTCTime)
eAuthorizationTimestamp
= lens _eAuthorizationTimestamp
(\ s a -> s{_eAuthorizationTimestamp = a})
. mapping _DateTime | 253 | eAuthorizationTimestamp :: Lens' Environment (Maybe UTCTime)
eAuthorizationTimestamp
= lens _eAuthorizationTimestamp
(\ s a -> s{_eAuthorizationTimestamp = a})
. mapping _DateTime | 193 | eAuthorizationTimestamp
= lens _eAuthorizationTimestamp
(\ s a -> s{_eAuthorizationTimestamp = a})
. mapping _DateTime | 132 | true | true | 1 | 8 | 43 | 57 | 28 | 29 | null | null |
ekmett/generic-deriving | examples/Examples.hs | bsd-3-clause | --------------------------------------------------------------------------------
-- Main tests
--------------------------------------------------------------------------------
main :: IO ()
main = do
let p = putStrLn . ((++) "- ") . show
putStrLn "[] and Maybe tests:"
mapM_ p testsStand... | 786 | main :: IO ()
main = do
let p = putStrLn . ((++) "- ") . show
putStrLn "[] and Maybe tests:"
mapM_ p testsStandard
putStrLn "Tests for Tree:"
mapM_ p testsTree
putStrLn "\nTests for List:"
mapM_ p testsList
putStrLn "\nTests for Rose:"
map... | 604 | main = do
let p = putStrLn . ((++) "- ") . show
putStrLn "[] and Maybe tests:"
mapM_ p testsStandard
putStrLn "Tests for Tree:"
mapM_ p testsTree
putStrLn "\nTests for List:"
mapM_ p testsList
putStrLn "\nTests for Rose:"
mapM_ p testsRose... | 590 | true | true | 1 | 14 | 237 | 160 | 64 | 96 | null | null |
lkitching/PScheme | test/EvalTests.hs | bsd-3-clause | evalTests :: TestTree
evalTests = testGroup "Eval tests" [unitTests] | 69 | evalTests :: TestTree
evalTests = testGroup "Eval tests" [unitTests] | 68 | evalTests = testGroup "Eval tests" [unitTests] | 46 | false | true | 0 | 6 | 9 | 19 | 10 | 9 | null | null |
hvr/lens | src/Control/Lens/Lens.hs | bsd-3-clause | -- | A version of ('Control.Lens.Setter.<.~') that works on 'ALens'.
--
-- >>> ("hello","there") & _2 <#~ "world"
-- ("world",("hello","world"))
(<#~) :: ALens s t a b -> b -> s -> (b, t)
l <#~ b = \s -> (b, storing l b s) | 222 | (<#~) :: ALens s t a b -> b -> s -> (b, t)
l <#~ b = \s -> (b, storing l b s) | 77 | l <#~ b = \s -> (b, storing l b s) | 34 | true | true | 0 | 11 | 44 | 73 | 39 | 34 | null | null |
mettekou/ghc | compiler/main/HscTypes.hs | bsd-3-clause | emptyModBreaks :: ModBreaks
emptyModBreaks = ModBreaksUndefined | 63 | emptyModBreaks :: ModBreaks
emptyModBreaks = ModBreaksUndefined | 63 | emptyModBreaks = ModBreaksUndefined | 35 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
portnov/yaledger | YaLedger/Exceptions.hs | bsd-3-clause | throwP e = do
pos <- gets lsPosition
throw (e pos) | 54 | throwP e = do
pos <- gets lsPosition
throw (e pos) | 54 | throwP e = do
pos <- gets lsPosition
throw (e pos) | 54 | false | false | 0 | 9 | 14 | 31 | 13 | 18 | null | null |
scslab/iterIO | Examples/HttpServer.hs | bsd-3-clause | myListen :: Net.PortNumber -> IO Net.Socket
myListen pn = do
sock <- Net.socket Net.AF_INET Net.Stream Net.defaultProtocol
Net.setSocketOption sock Net.ReuseAddr 1
Net.bindSocket sock (Net.SockAddrInet pn Net.iNADDR_ANY)
Net.listen sock Net.maxListenQueue
return sock | 277 | myListen :: Net.PortNumber -> IO Net.Socket
myListen pn = do
sock <- Net.socket Net.AF_INET Net.Stream Net.defaultProtocol
Net.setSocketOption sock Net.ReuseAddr 1
Net.bindSocket sock (Net.SockAddrInet pn Net.iNADDR_ANY)
Net.listen sock Net.maxListenQueue
return sock | 277 | myListen pn = do
sock <- Net.socket Net.AF_INET Net.Stream Net.defaultProtocol
Net.setSocketOption sock Net.ReuseAddr 1
Net.bindSocket sock (Net.SockAddrInet pn Net.iNADDR_ANY)
Net.listen sock Net.maxListenQueue
return sock | 233 | false | true | 0 | 10 | 39 | 101 | 45 | 56 | null | null |
deontologician/orbRPG | Game/OrbRPG/Combinations.hs | gpl-3.0 | P Green @>> E Erbium = P Green | 30 | P Green @>> E Erbium = P Green | 30 | P Green @>> E Erbium = P Green | 30 | false | false | 0 | 6 | 7 | 21 | 8 | 13 | null | null |
mbakke/ganeti | src/Ganeti/Hs2Py/OpDoc.hs | bsd-2-clause | opExtStorageDiagnose :: String
opExtStorageDiagnose =
"Compute the list of external storage providers." | 105 | opExtStorageDiagnose :: String
opExtStorageDiagnose =
"Compute the list of external storage providers." | 105 | opExtStorageDiagnose =
"Compute the list of external storage providers." | 74 | false | true | 0 | 4 | 13 | 11 | 6 | 5 | null | null |
urbanslug/ghc | testsuite/tests/partial-sigs/should_compile/ExtraConstraints3.hs | bsd-3-clause | (<=) :: _ => _
(<=) = (P.<=) | 28 | (<=) :: _ => _
(<=) = (P.<=) | 28 | (<=) = (P.<=) | 13 | false | true | 0 | 7 | 7 | 31 | 16 | 15 | null | null |
conal/hermit | src/HERMIT/Dictionary/Undefined.hs | bsd-2-clause | findUndefinedIdT :: (BoundVars c, MonadCatch m, HasHermitMEnv m, LiftCoreM m, MonadIO m, MonadThings m) => Transform c m a Id
findUndefinedIdT = findIdT undefinedLocation | 170 | findUndefinedIdT :: (BoundVars c, MonadCatch m, HasHermitMEnv m, LiftCoreM m, MonadIO m, MonadThings m) => Transform c m a Id
findUndefinedIdT = findIdT undefinedLocation | 170 | findUndefinedIdT = findIdT undefinedLocation | 44 | false | true | 0 | 6 | 23 | 62 | 31 | 31 | null | null |
jeremyjh/free-agent | core/src/FreeAgent/Core/Protocol/Peer.hs | bsd-3-clause | -- | Advertise a Server on the peer
registerServer :: (MonadAgent agent)
=> AgentServer -> ProcessId -> agent (Either CallFail ())
registerServer (AgentServer sname _) pid =
castServ $ RegisterServer sname pid | 228 | registerServer :: (MonadAgent agent)
=> AgentServer -> ProcessId -> agent (Either CallFail ())
registerServer (AgentServer sname _) pid =
castServ $ RegisterServer sname pid | 192 | registerServer (AgentServer sname _) pid =
castServ $ RegisterServer sname pid | 82 | true | true | 2 | 12 | 50 | 69 | 33 | 36 | null | null |
Numberartificial/workflow | haskell-first-principles/src/RW/CH10/PGM.hs | mit | w2c :: Word8 -> Char
w2c = chr . fromIntegral | 45 | w2c :: Word8 -> Char
w2c = chr . fromIntegral | 45 | w2c = chr . fromIntegral | 24 | false | true | 0 | 5 | 9 | 19 | 10 | 9 | null | null |
ghc-android/ghc | testsuite/tests/ghci/should_run/ghcirun004.hs | bsd-3-clause | 4000 = 3999 | 11 | 4000 = 3999 | 11 | 4000 = 3999 | 11 | false | false | 1 | 5 | 2 | 10 | 3 | 7 | null | null |
creichert/wai | wai-extra/test/Network/Wai/ParseSpec.hs | mit | toRequest'' :: S8.ByteString -> S8.ByteString -> IO SRequest
toRequest'' ctype content = mkRB content >>= \b -> return $ SRequest defaultRequest
{ requestHeaders = [("Content-Type", ctype)], requestBody = b
} (L.fromChunks $ map S.singleton $ S.unpack content) | 268 | toRequest'' :: S8.ByteString -> S8.ByteString -> IO SRequest
toRequest'' ctype content = mkRB content >>= \b -> return $ SRequest defaultRequest
{ requestHeaders = [("Content-Type", ctype)], requestBody = b
} (L.fromChunks $ map S.singleton $ S.unpack content) | 268 | toRequest'' ctype content = mkRB content >>= \b -> return $ SRequest defaultRequest
{ requestHeaders = [("Content-Type", ctype)], requestBody = b
} (L.fromChunks $ map S.singleton $ S.unpack content) | 207 | false | true | 0 | 10 | 44 | 102 | 52 | 50 | null | null |
fryguybob/LaTeXGrapher | src/LaTeXGrapher/Parser.hs | bsd-3-clause | conditional :: Parser (Maybe Expr)
conditional = do char '|'
many spaceOrTab
option Nothing (liftM Just exprEol) | 146 | conditional :: Parser (Maybe Expr)
conditional = do char '|'
many spaceOrTab
option Nothing (liftM Just exprEol) | 146 | conditional = do char '|'
many spaceOrTab
option Nothing (liftM Just exprEol) | 111 | false | true | 2 | 10 | 50 | 55 | 21 | 34 | null | null |
bos/wreq | Network/Wreq/Lens.hs | bsd-3-clause | -- | A lens onto all matching named headers in an HTTP response.
--
-- To access exactly one header (the result will be the empty string if
-- there is no match), use the ('Control.Lens.^.') operator.
--
-- @
--r <- 'Network.Wreq.get' \"http:\/\/httpbin.org\/get\"
--print (r 'Control.Lens.^.' 'responseHeader' \"Content... | 997 | responseHeader :: HeaderName
-- ^ Header name to match.
-> Traversal' (Response body) ByteString
responseHeader = TH.responseHeader | 161 | responseHeader = TH.responseHeader | 34 | true | true | 0 | 8 | 163 | 54 | 40 | 14 | null | null |
kowey/hakyll-convert | test/spec/Spec/Wordpress.hs | bsd-3-clause | extractsPostTitle :: TestTree
extractsPostTitle =
testGroup
"extracts post's title"
[ testCase (T.unpack title) (dpTitle (distill False (RSS.nullItem title)) @?= Just title)
| title <-
[ "First post",
"You won't believe what happened to me today",
"Trying out <i>things<... | 350 | extractsPostTitle :: TestTree
extractsPostTitle =
testGroup
"extracts post's title"
[ testCase (T.unpack title) (dpTitle (distill False (RSS.nullItem title)) @?= Just title)
| title <-
[ "First post",
"You won't believe what happened to me today",
"Trying out <i>things<... | 350 | extractsPostTitle =
testGroup
"extracts post's title"
[ testCase (T.unpack title) (dpTitle (distill False (RSS.nullItem title)) @?= Just title)
| title <-
[ "First post",
"You won't believe what happened to me today",
"Trying out <i>things</i>…"
]
] | 320 | false | true | 0 | 14 | 103 | 79 | 40 | 39 | null | null |
uwap/Idris-dev | src/Idris/Reflection.hs | bsd-3-clause | reifyTTBinderApp reif f [t, k]
| f == reflm "Pi" = liftM2 (Pi Nothing) (reif t) (reif k) | 110 | reifyTTBinderApp reif f [t, k]
| f == reflm "Pi" = liftM2 (Pi Nothing) (reif t) (reif k) | 110 | reifyTTBinderApp reif f [t, k]
| f == reflm "Pi" = liftM2 (Pi Nothing) (reif t) (reif k) | 110 | false | false | 0 | 9 | 39 | 57 | 27 | 30 | null | null |
gwright83/Wheeler | src/Math/Symbolic/Wheeler/Replacer.hs | bsd-3-clause | deleteMatches :: [ MatchInfo ] -> Expr -> Expr
deleteMatches minfos ex = foldr (\m e -> deleteExprs (matchPaths m) e) ex minfos | 127 | deleteMatches :: [ MatchInfo ] -> Expr -> Expr
deleteMatches minfos ex = foldr (\m e -> deleteExprs (matchPaths m) e) ex minfos | 127 | deleteMatches minfos ex = foldr (\m e -> deleteExprs (matchPaths m) e) ex minfos | 80 | false | true | 0 | 10 | 22 | 55 | 28 | 27 | null | null |
yuga/ghc-mod | Language/Haskell/GhcMod/GHCApi.hs | bsd-3-clause | -- | Initialize the 'DynFlags' relating to the compilation of a single
-- file or GHC session according to the 'Cradle' and 'Options'
-- provided.
initializeFlagsWithCradle :: GhcMonad m => Options -> Cradle -> [GHCOption] -> Bool -> m (LogReader, Maybe PackageDescription)
initializeFlagsWithCradle opt cradle ghcopts ... | 1,224 | initializeFlagsWithCradle :: GhcMonad m => Options -> Cradle -> [GHCOption] -> Bool -> m (LogReader, Maybe PackageDescription)
initializeFlagsWithCradle opt cradle ghcopts logging
| cabal = withCabal |||> withSandbox
| otherwise = withSandbox
where
mCradleFile = cradleCabalFile cradle
cabal = isJust ... | 1,077 | initializeFlagsWithCradle opt cradle ghcopts logging
| cabal = withCabal |||> withSandbox
| otherwise = withSandbox
where
mCradleFile = cradleCabalFile cradle
cabal = isJust mCradleFile
withCabal = do
pkgDesc <- liftIO $ parseCabalFile $ fromJust mCradleFile
compOpts <- liftIO $ ge... | 949 | true | true | 4 | 12 | 280 | 289 | 140 | 149 | null | null |
wavewave/madgraph-auto-dataset | src/HEP/Automation/MadGraph/Dataset/Set20110704set1.hs | gpl-3.0 | sets :: [Int]
sets = [1..10] | 28 | sets :: [Int]
sets = [1..10] | 28 | sets = [1..10] | 14 | false | true | 0 | 7 | 5 | 26 | 12 | 14 | null | null |
strager/b | test/Spec/B/Build.hs | bsd-3-clause | needAQuestion_ :: AQuestion m -> B.BuildRule m ()
needAQuestion_ (AQuestion q) = need_ q | 88 | needAQuestion_ :: AQuestion m -> B.BuildRule m ()
needAQuestion_ (AQuestion q) = need_ q | 88 | needAQuestion_ (AQuestion q) = need_ q | 38 | false | true | 0 | 7 | 13 | 39 | 18 | 21 | null | null |
beni55/haste-compiler | libraries/ghc-7.10/base/GHC/Arr.hs | bsd-3-clause | unsafeReadSTArray :: Ix i => STArray s i e -> Int -> ST s e
unsafeReadSTArray (STArray _ _ _ marr#) (I# i#)
= ST $ \s1# -> readArray# marr# i# s1# | 150 | unsafeReadSTArray :: Ix i => STArray s i e -> Int -> ST s e
unsafeReadSTArray (STArray _ _ _ marr#) (I# i#)
= ST $ \s1# -> readArray# marr# i# s1# | 150 | unsafeReadSTArray (STArray _ _ _ marr#) (I# i#)
= ST $ \s1# -> readArray# marr# i# s1# | 90 | false | true | 2 | 11 | 35 | 83 | 38 | 45 | null | null |
benkolera/phb | hs/Site/Customer.hs | mit | createCustomerSplices :: PhbSplice
createCustomerSplices = customerFormSplices (pure Nothing) | 93 | createCustomerSplices :: PhbSplice
createCustomerSplices = customerFormSplices (pure Nothing) | 93 | createCustomerSplices = customerFormSplices (pure Nothing) | 58 | false | true | 0 | 7 | 7 | 20 | 10 | 10 | null | null |
pgj/bead | src/Bead/View/Content/Home/Page.hs | bsd-3-clause | navigation :: [Pages.Page a b c d e] -> IHtml
navigation links = do
msg <- getI18N
return $ H.div ! A.id "menu" $ H.ul $ mapM_ (i18n msg . linkToPage) links | 160 | navigation :: [Pages.Page a b c d e] -> IHtml
navigation links = do
msg <- getI18N
return $ H.div ! A.id "menu" $ H.ul $ mapM_ (i18n msg . linkToPage) links | 160 | navigation links = do
msg <- getI18N
return $ H.div ! A.id "menu" $ H.ul $ mapM_ (i18n msg . linkToPage) links | 114 | false | true | 0 | 11 | 35 | 84 | 40 | 44 | null | null |
rueshyna/gogol | gogol-shopping-content/gen/Network/Google/ShoppingContent/Types/Product.hs | mpl-2.0 | -- | An entry ID, unique within the batch request.
ocbreBatchId :: Lens' OrdersCustomBatchRequestEntry (Maybe Word32)
ocbreBatchId
= lens _ocbreBatchId (\ s a -> s{_ocbreBatchId = a})
. mapping _Coerce | 209 | ocbreBatchId :: Lens' OrdersCustomBatchRequestEntry (Maybe Word32)
ocbreBatchId
= lens _ocbreBatchId (\ s a -> s{_ocbreBatchId = a})
. mapping _Coerce | 158 | ocbreBatchId
= lens _ocbreBatchId (\ s a -> s{_ocbreBatchId = a})
. mapping _Coerce | 91 | true | true | 1 | 9 | 37 | 56 | 28 | 28 | null | null |
seereason/ghcjs | src/Gen2/Prim.hs | mit | genPrim _ _ IndexByteArrayOp_Word32 [r] [a,i] = PrimInline [j| `r` = `a`.i3[`i`]; |] | 84 | genPrim _ _ IndexByteArrayOp_Word32 [r] [a,i] = PrimInline [j| `r` = `a`.i3[`i`]; |] | 84 | genPrim _ _ IndexByteArrayOp_Word32 [r] [a,i] = PrimInline [j| `r` = `a`.i3[`i`]; |] | 84 | false | false | 0 | 6 | 12 | 33 | 19 | 14 | null | null |
parsonsmatt/wyas | app/Main.hs | bsd-3-clause | main :: IO ()
main = do
args <- getArgs
unless (null args) $ do
loaded <- readFile (head args)
print loaded
print $ parseAndEval loaded
putStrLn "~~~"
putStrLn "Write Yourself a Scheme!"
putStrLn "~~~"
putStrLn "I guess this is a REPL, huh?"
forever repl | 280 | main :: IO ()
main = do
args <- getArgs
unless (null args) $ do
loaded <- readFile (head args)
print loaded
print $ parseAndEval loaded
putStrLn "~~~"
putStrLn "Write Yourself a Scheme!"
putStrLn "~~~"
putStrLn "I guess this is a REPL, huh?"
forever repl | 280 | main = do
args <- getArgs
unless (null args) $ do
loaded <- readFile (head args)
print loaded
print $ parseAndEval loaded
putStrLn "~~~"
putStrLn "Write Yourself a Scheme!"
putStrLn "~~~"
putStrLn "I guess this is a REPL, huh?"
forever repl | 266 | false | true | 0 | 14 | 70 | 107 | 42 | 65 | null | null |
danoctavian/c10k-bench | bencher/src/Lib.hs | mit | readLen = BS.length msg | 23 | readLen = BS.length msg | 23 | readLen = BS.length msg | 23 | false | false | 0 | 6 | 3 | 11 | 5 | 6 | null | null |
Gabriel439/Haskell-Dhall-Library | dhall/src/Dhall/Parser/Token.hs | bsd-3-clause | quotedPathCharacter :: Char -> Bool
quotedPathCharacter c =
('\x20' <= c && c <= '\x21')
|| ('\x23' <= c && c <= '\x2E')
|| ('\x30' <= c && c <= '\x10FFFF') | 174 | quotedPathCharacter :: Char -> Bool
quotedPathCharacter c =
('\x20' <= c && c <= '\x21')
|| ('\x23' <= c && c <= '\x2E')
|| ('\x30' <= c && c <= '\x10FFFF') | 174 | quotedPathCharacter c =
('\x20' <= c && c <= '\x21')
|| ('\x23' <= c && c <= '\x2E')
|| ('\x30' <= c && c <= '\x10FFFF') | 138 | false | true | 3 | 11 | 48 | 83 | 40 | 43 | null | null |
eligottlieb/Calumbda | src/UntypedLambda.hs | mit | imLog :: Integer->Integer->Integer
imLog b x =
if x < b then
0
else
let
l = 2 * imLog (b*b) x
doDiv x l = if x < b then l else doDiv (x`div`b) (l+1)
in
doDiv (x`div`(b^l)) l | 207 | imLog :: Integer->Integer->Integer
imLog b x =
if x < b then
0
else
let
l = 2 * imLog (b*b) x
doDiv x l = if x < b then l else doDiv (x`div`b) (l+1)
in
doDiv (x`div`(b^l)) l | 207 | imLog b x =
if x < b then
0
else
let
l = 2 * imLog (b*b) x
doDiv x l = if x < b then l else doDiv (x`div`b) (l+1)
in
doDiv (x`div`(b^l)) l | 172 | false | true | 0 | 13 | 73 | 127 | 68 | 59 | null | null |
Proclivis/wxHaskell | wxcore/src/haskell/Graphics/UI/WXCore/WxcDefs.hs | lgpl-2.1 | wxLANGUAGE_BASQUE :: Int
wxLANGUAGE_BASQUE = 32 | 47 | wxLANGUAGE_BASQUE :: Int
wxLANGUAGE_BASQUE = 32 | 47 | wxLANGUAGE_BASQUE = 32 | 22 | false | true | 0 | 4 | 5 | 11 | 6 | 5 | null | null |
alldne/scheme | src/Language/Scheme/Reader.hs | bsd-3-clause | symbol' :: String -> Parser String
symbol' = L.symbol' sc | 57 | symbol' :: String -> Parser String
symbol' = L.symbol' sc | 57 | symbol' = L.symbol' sc | 22 | false | true | 0 | 7 | 9 | 28 | 12 | 16 | null | null |
themoritz/cabal | Cabal/Distribution/Simple/LocalBuildInfo.hs | bsd-3-clause | componentBuildDir :: LocalBuildInfo -> ComponentLocalBuildInfo -> FilePath
-- For now, we assume that libraries/executables/test-suites/benchmarks
-- are only ever built once. With Backpack, we need a special case for
-- libraries so that we can handle building them multiple times.
componentBuildDir lbi clbi
= bui... | 1,008 | componentBuildDir :: LocalBuildInfo -> ComponentLocalBuildInfo -> FilePath
componentBuildDir lbi clbi
= buildDir lbi </>
case componentLocalName clbi of
CLibName ->
if display (componentUnitId clbi) == display (componentComponentId clbi)
then ""
... | 799 | componentBuildDir lbi clbi
= buildDir lbi </>
case componentLocalName clbi of
CLibName ->
if display (componentUnitId clbi) == display (componentComponentId clbi)
then ""
else display (componentUnitId clbi)
CSubLibName s ->... | 724 | true | true | 2 | 12 | 311 | 191 | 88 | 103 | null | null |
rethab/tagger | src/Tagger/TagWriter.hs | bsd-3-clause | writeTags :: [Artist] -> IO ()
writeTags = mapM_ (mapM_ writeAlb . artAlbs) | 75 | writeTags :: [Artist] -> IO ()
writeTags = mapM_ (mapM_ writeAlb . artAlbs) | 75 | writeTags = mapM_ (mapM_ writeAlb . artAlbs) | 44 | false | true | 0 | 8 | 12 | 36 | 18 | 18 | null | null |
frontrowed/stratosphere | library-gen/Stratosphere/Resources/SageMakerNotebookInstance.hs | mit | -- | http://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-resource-sagemaker-notebookinstance.html#cfn-sagemaker-notebookinstance-volumesizeingb
smniVolumeSizeInGB :: Lens' SageMakerNotebookInstance (Maybe (Val Integer))
smniVolumeSizeInGB = lens _sageMakerNotebookInstanceVolumeSizeInGB (\s a -> s { _sageM... | 361 | smniVolumeSizeInGB :: Lens' SageMakerNotebookInstance (Maybe (Val Integer))
smniVolumeSizeInGB = lens _sageMakerNotebookInstanceVolumeSizeInGB (\s a -> s { _sageMakerNotebookInstanceVolumeSizeInGB = a }) | 203 | smniVolumeSizeInGB = lens _sageMakerNotebookInstanceVolumeSizeInGB (\s a -> s { _sageMakerNotebookInstanceVolumeSizeInGB = a }) | 127 | true | true | 0 | 9 | 22 | 52 | 28 | 24 | null | null |
fpco/fay | src/Fay.hs | bsd-3-clause | -- | Compile the given file and write the output to the given path, or
-- if nothing given, stdout.
compileFromTo :: Config -> FilePath -> Maybe FilePath -> IO ()
compileFromTo cfg filein fileout =
if configTypecheckOnly cfg
then do
cfg' <- resolvePackages cfg
res <- typecheck cfg' filein
either (error ... | 747 | compileFromTo :: Config -> FilePath -> Maybe FilePath -> IO ()
compileFromTo cfg filein fileout =
if configTypecheckOnly cfg
then do
cfg' <- resolvePackages cfg
res <- typecheck cfg' filein
either (error . showCompileError) (ioWarn cfg') res
else do
result <- maybe (compileFile cfg filein)
... | 647 | compileFromTo cfg filein fileout =
if configTypecheckOnly cfg
then do
cfg' <- resolvePackages cfg
res <- typecheck cfg' filein
either (error . showCompileError) (ioWarn cfg') res
else do
result <- maybe (compileFile cfg filein)
(compileFromToAndGenerateHtml cfg filein)
... | 584 | true | true | 0 | 14 | 189 | 184 | 87 | 97 | null | null |
wmhilton/lambda-calculator | LambdaParser.hs | mit | -------------------------------------------------------------------------
-- E X A M P L E S
-------------------------------------------------------------------------
lid = Abstraction "x" (Var "x") | 202 | lid = Abstraction "x" (Var "x") | 34 | lid = Abstraction "x" (Var "x") | 34 | true | false | 0 | 7 | 20 | 20 | 11 | 9 | null | null |
runjak/projectEuler | src/Problem2.hs | mit | fibonacci 1 = 1 | 15 | fibonacci 1 = 1 | 15 | fibonacci 1 = 1 | 15 | false | false | 0 | 5 | 3 | 9 | 4 | 5 | null | null |
jean-edouard/manager | xenmgr/Vm/Queries.hs | gpl-2.0 | getVmByDomid :: DomainID -> Rpc (Maybe Uuid)
getVmByDomid domid =
do vms <- getVms
domids <- mapM getDomainID vms
case filter matches (zip vms domids) of
((uuid,_) : _) -> return $ Just uuid
_ -> return Nothing
where
matches (uuid,Just domid') = domid == domid'... | 344 | getVmByDomid :: DomainID -> Rpc (Maybe Uuid)
getVmByDomid domid =
do vms <- getVms
domids <- mapM getDomainID vms
case filter matches (zip vms domids) of
((uuid,_) : _) -> return $ Just uuid
_ -> return Nothing
where
matches (uuid,Just domid') = domid == domid'... | 344 | getVmByDomid domid =
do vms <- getVms
domids <- mapM getDomainID vms
case filter matches (zip vms domids) of
((uuid,_) : _) -> return $ Just uuid
_ -> return Nothing
where
matches (uuid,Just domid') = domid == domid'
matches _ = False | 299 | false | true | 0 | 12 | 114 | 133 | 64 | 69 | null | null |
ur-crypto/sec-lib | library/Ops.hs | mit | bXor :: SecureGate
bXor = xorGate | 33 | bXor :: SecureGate
bXor = xorGate | 33 | bXor = xorGate | 14 | false | true | 0 | 6 | 5 | 18 | 7 | 11 | null | null |
frantisekfarka/ghc-dsi | libraries/base/Data/Typeable/Internal.hs | bsd-3-clause | -- Keeping backwards-compatibility
typeOf :: forall a. Typeable a => a -> TypeRep
typeOf _ = typeRep (Proxy :: Proxy a) | 119 | typeOf :: forall a. Typeable a => a -> TypeRep
typeOf _ = typeRep (Proxy :: Proxy a) | 84 | typeOf _ = typeRep (Proxy :: Proxy a) | 37 | true | true | 0 | 7 | 20 | 43 | 22 | 21 | null | null |
ideas-edu/ideas | src/Ideas/Common/Rewriting/RewriteRule.hs | apache-2.0 | metaInRewriteRule :: RewriteRule a -> [Int]
metaInRewriteRule r = metaVars a ++ metaVars b
where a :~> b = ruleSpecTerm r | 124 | metaInRewriteRule :: RewriteRule a -> [Int]
metaInRewriteRule r = metaVars a ++ metaVars b
where a :~> b = ruleSpecTerm r | 123 | metaInRewriteRule r = metaVars a ++ metaVars b
where a :~> b = ruleSpecTerm r | 79 | false | true | 0 | 6 | 23 | 50 | 23 | 27 | null | null |
fpco/schoolofhaskell | soh-scheduler/src/SchoolOfHaskell/Scheduler/AWS.hs | mit | discoverEnv :: forall (m :: * -> *).
(Applicative m,Functor m,MonadIO m)
=> Text -> m Env
discoverEnv region' =
do parsedRegion <- hoistFromText region'
Env <$>
liftIO (getEnv parsedRegion Discover) | 239 | discoverEnv :: forall (m :: * -> *).
(Applicative m,Functor m,MonadIO m)
=> Text -> m Env
discoverEnv region' =
do parsedRegion <- hoistFromText region'
Env <$>
liftIO (getEnv parsedRegion Discover) | 239 | discoverEnv region' =
do parsedRegion <- hoistFromText region'
Env <$>
liftIO (getEnv parsedRegion Discover) | 122 | false | true | 0 | 11 | 71 | 89 | 43 | 46 | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.