Hoogle Search

Within LTS Haskell 24.40 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. persistManyFileWith :: PersistSettings -> [FilePath] -> Q Exp

    persistent Database.Persist.TH.Internal

    Same as persistFileWith, but uses several external files instead of one. Splitting your Persistent definitions into multiple modules can potentially dramatically speed up compile times. The recommended file extension is .persistentmodels.

    Examples

    Split your Persistent definitions into multiple files (models1, models2), then create a new module for each new file and run mkPersist there:
    -- Model1.hs
    share
    [mkPersist sqlSettings]
    $(persistFileWith lowerCaseSettings "models1")
    
    -- Model2.hs
    share
    [mkPersist sqlSettings]
    $(persistFileWith lowerCaseSettings "models2")
    
    Use persistManyFileWith to create your migrations:
    -- Migrate.hs
    mkMigrate "migrateAll"
    $(persistManyFileWith lowerCaseSettings ["models1.persistentmodels","models2.persistentmodels"])
    
    Tip: To get the same import behavior as if you were declaring all your models in one file, import your new files as Name into another file, then export module Name. This approach may be used in the future to reduce memory usage during compilation, but so far we've only seen mild reductions. See persistent#778 and persistent#791 for more details.

  2. ignoreAnyTreeContent :: forall (m :: Type -> Type) o . MonadThrow m => ConduitT Event o m (Maybe ())

    xml-conduit Text.XML.Stream.Parse

    Same as takeAnyTreeContent, without yielding Events.

    >>> runConduit $ parseLBS def "<a>content</a><b></b>" .| (ignoreAnyTreeContent >> sinkList)
    [EventBeginElement (Name {nameLocalName = "b", ...}) [],EventEndElement (Name {nameLocalName = "b", ...}),EventEndDocument]
    
    >>> runConduit $ parseLBS def "text<b></b>" .| (ignoreAnyTreeContent >> sinkList)
    [EventBeginElement (Name {nameLocalName = "b", ...}) [],EventEndElement (Name {nameLocalName = "b", ...}),EventEndDocument]
    
    Since 1.5.0

  3. many :: forall (m :: Type -> Type) o a . Monad m => ConduitT Event o m (Maybe a) -> ConduitT Event o m [a]

    xml-conduit Text.XML.Stream.Parse

    Keep parsing elements as long as the parser returns Just.

  4. many' :: forall (m :: Type -> Type) o a . MonadThrow m => ConduitT Event o m (Maybe a) -> ConduitT Event o m [a]

    xml-conduit Text.XML.Stream.Parse

    Like many, but any tags and content the consumer doesn't match on are silently ignored.

  5. manyIgnore :: forall (m :: Type -> Type) o a b . Monad m => ConduitT Event o m (Maybe a) -> ConduitT Event o m (Maybe b) -> ConduitT Event o m [a]

    xml-conduit Text.XML.Stream.Parse

    Keep parsing elements as long as the parser returns Just or the ignore parser returns Just.

  6. manyIgnoreYield :: forall (m :: Type -> Type) b . MonadThrow m => ConduitT Event b m (Maybe b) -> ConduitT Event b m (Maybe ()) -> ConduitT Event b m ()

    xml-conduit Text.XML.Stream.Parse

    Like manyIgnore, but uses yield so the result list can be streamed to downstream conduits without waiting for manyIgnoreYield to finish

  7. manyYield :: forall (m :: Type -> Type) a b . Monad m => ConduitT a b m (Maybe b) -> ConduitT a b m ()

    xml-conduit Text.XML.Stream.Parse

    Like many, but uses yield so the result list can be streamed to downstream conduits without waiting for manyYield to finish

  8. manyYield' :: forall (m :: Type -> Type) b . MonadThrow m => ConduitT Event b m (Maybe b) -> ConduitT Event b m ()

    xml-conduit Text.XML.Stream.Parse

    Like many', but uses yield so the result list can be streamed to downstream conduits without waiting for manyYield' to finish

  9. many_ :: forall (m :: Type -> Type) o a . MonadThrow m => ConduitT Event o m (Maybe a) -> ConduitT Event o m ()

    xml-conduit Text.XML.Stream.Parse

    Like many but discards the results without building an intermediate list. Since 1.5.0

  10. takeAnyTreeContent :: forall (m :: Type -> Type) . MonadThrow m => ConduitT Event Event m (Maybe ())

    xml-conduit Text.XML.Stream.Parse

    Like takeTreeContent, without checking for tag name or attributes.

    >>> runConduit $ parseLBS def "text<a></a>" .| void takeAnyTreeContent .| sinkList
    [EventBeginDocument,EventContent (ContentText "text")]
    
    >>> runConduit $ parseLBS def "</a><b></b>" .| void takeAnyTreeContent .| sinkList
    [EventBeginDocument]
    
    >>> runConduit $ parseLBS def "<b><c></c></b></a>text" .| void takeAnyTreeContent .| sinkList
    [EventBeginDocument,EventBeginElement (Name {nameLocalName = "b", ...}) [],EventBeginElement (Name {nameLocalName = "c", ...}) [],EventEndElement (Name {nameLocalName = "c", ...}),EventEndElement (Name {nameLocalName = "b", ...})]
    
    Since 1.5.0

Page 121 of many | Previous | Next