Copyright | (c) Adam Conner-Sax 2019 |
---|---|
License | BSD-3-Clause |
Maintainer | adam_conner_sax@yahoo.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Synopsis
- type Lucid = Writer (Html ())
- type LucidDocs = Docs (Html ())
- lucid :: Member Lucid effs => Html () -> Sem effs ()
- lucidToNamedText :: Sem (LucidDocs ': effs) () -> Sem effs [NamedDoc Text]
- lucidHtml :: Sem (Lucid ': effs) () -> Sem effs (Html ())
- lucidToText :: Sem (Lucid ': effs) () -> Sem effs Text
- newLucidDoc :: Member LucidDocs effs => Text -> Sem (Lucid ': effs) () -> Sem effs ()
- type Blaze = Writer Html
- type BlazeDocs = Docs Html
- blaze :: Member Blaze effs => Html -> Sem effs ()
- blazeToNamedText :: Sem (BlazeDocs ': effs) () -> Sem effs [NamedDoc Text]
- blazeHtml :: Sem (Blaze ': effs) () -> Sem effs Html
- blazeToText :: Sem (Blaze ': effs) () -> Sem effs Text
- newBlazeDoc :: Member BlazeDocs effs => Text -> Sem (Blaze ': effs) () -> Sem effs ()
- data NamedDoc a = NamedDoc {}
Lucid
Effects
type LucidDocs = Docs (Html ()) Source #
Type-Alias for the Docs
effect (multi-document Writer), specialized to Lucid docs.
To be used in an app that produces multiple html outputs, built up from Lucid bits.
Actions
lucid :: Member Lucid effs => Html () -> Sem effs () Source #
Add a Lucid html fragment to the current Lucid doc.
Intepretations
lucidToNamedText :: Sem (LucidDocs ': effs) () -> Sem effs [NamedDoc Text] Source #
Interpret the LucidDocs effect (via Writer), producing a list of named Lucid docs, suitable for writing to disk.
lucidHtml :: Sem (Lucid ': effs) () -> Sem effs (Html ()) Source #
Interprest the Lucid effect (via Writer), producing a Lucid Html ()
from the currently written doc
lucidToText :: Sem (Lucid ': effs) () -> Sem effs Text Source #
Interpret the Lucid effect (via Writer), producing Text
from the currently written doc
newLucidDoc :: Member LucidDocs effs => Text -> Sem (Lucid ': effs) () -> Sem effs () Source #
Take the current Lucid HTML in the writer and add it to the set of named docs with the given name.
NB: Only use this function for making sets of documents built exclusively from Lucid. Otherwise use the more general Pandoc infrastructure in
Pandoc
.
Blaze
Effects
type BlazeDocs = Docs Html Source #
Type-Alias for the Docs
effect (multi-document Writer) specialized to Blaze docs.
To be used in an app that produces multiple html outputs, built up from Blaze bits.
Actions
blaze :: Member Blaze effs => Html -> Sem effs () Source #
Add a Blaze html fragment to the current Blaze doc.
Interpretations
blazeToNamedText :: Sem (BlazeDocs ': effs) () -> Sem effs [NamedDoc Text] Source #
Interpret the BlazeDocs effect (via Writer), producing a list of named Blaze docs.
blazeHtml :: Sem (Blaze ': effs) () -> Sem effs Html Source #
Interpret the Blaze effect (via Writer), producing a Blaze Html
from the currently written doc.
blazeToText :: Sem (Blaze ': effs) () -> Sem effs Text Source #
Interpret the Blaze effect (via Writer), producing Text
from the currently written doc.
newBlazeDoc :: Member BlazeDocs effs => Text -> Sem (Blaze ': effs) () -> Sem effs () Source #
take the current Blaze HTML in the writer and add it to the set of named docs with the given name
NB: Only use this function for making sets of documents built exclusively from Blaze. Otherwise use the more general Pandoc infrastructure in
Pandoc
.
Re-exports
Data type to hold one named document of type a
.
Instances
Functor NamedDoc Source # | |
Foldable NamedDoc Source # | |
Defined in Knit.Effect.Docs fold :: Monoid m => NamedDoc m -> m # foldMap :: Monoid m => (a -> m) -> NamedDoc a -> m # foldr :: (a -> b -> b) -> b -> NamedDoc a -> b # foldr' :: (a -> b -> b) -> b -> NamedDoc a -> b # foldl :: (b -> a -> b) -> b -> NamedDoc a -> b # foldl' :: (b -> a -> b) -> b -> NamedDoc a -> b # foldr1 :: (a -> a -> a) -> NamedDoc a -> a # foldl1 :: (a -> a -> a) -> NamedDoc a -> a # elem :: Eq a => a -> NamedDoc a -> Bool # maximum :: Ord a => NamedDoc a -> a # minimum :: Ord a => NamedDoc a -> a # | |
Traversable NamedDoc Source # | |