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.
persistManyFileWith :: PersistSettings -> [FilePath] -> Q Exppersistent 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.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-
xml-conduit Text.XML.Stream.Parse Keep parsing elements as long as the parser returns Just.
-
xml-conduit Text.XML.Stream.Parse Like many, but any tags and content the consumer doesn't match on are silently ignored.
-
xml-conduit Text.XML.Stream.Parse Keep parsing elements as long as the parser returns Just or the ignore parser returns Just.
-
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
-
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
-
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
-
xml-conduit Text.XML.Stream.Parse Like many but discards the results without building an intermediate list. Since 1.5.0
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