-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A fast and nice HTML templating library with distinct compilation/rendering phases. -- -- A fast and nice HTML templating library with distinct -- compilation/rendering phases. @package nice-html @version 0.2.0 module Text.Html.Nice.Internal type AttrName = Text data Attr a (:=) :: !AttrName -> !Text -> Attr a [attrKey] :: Attr a -> !AttrName [attrVal] :: Attr a -> !Text (:-) :: !AttrName -> a -> Attr a [attrKey] :: Attr a -> !AttrName [attrValHole] :: Attr a -> a data IsEscaped DoEscape :: IsEscaped Don'tEscape :: IsEscaped data SomeText LazyT :: Text -> SomeText BuilderT :: Builder -> SomeText StrictT :: !Text -> SomeText -- | A very simple HTML DSL data Markup' a Doctype :: Markup' a Node :: !Text -> !(Vector (Attr a)) -> (Markup' a) -> Markup' a VoidNode :: !Text -> !(Vector (Attr a)) -> Markup' a List :: [Markup' a] -> Markup' a Stream :: (Stream a) -> Markup' a Text :: !IsEscaped -> !SomeText -> Markup' a Hole :: !IsEscaped -> a -> Markup' a Empty :: Markup' a data Stream a ListS :: [s] -> (FastMarkup (s -> a)) -> Stream a S :: [FastMarkup a] -> Stream a -- | Don't use this! It's a lie! unstream :: (FastMarkup a -> b) -> Stream a -> (b -> c -> c) -> c -> c data (:$) a b (:$) :: (FastMarkup (a -> b)) -> a -> (:$) a b data FastMarkup a Bunch :: {-# UNPACK #-} !(Vector (FastMarkup a)) -> FastMarkup a FStream :: (Stream a) -> FastMarkup a FLText :: Text -> FastMarkup a FSText :: {-# UNPACK #-} !Text -> FastMarkup a FBuilder :: !Builder -> FastMarkup a FHole :: !IsEscaped -> !a -> FastMarkup a FEmpty :: FastMarkup a data Markup'F (a_aeRO :: Type) r_ah4s DoctypeF :: Markup'F r_ah4s NodeF :: !Text -> !(Vector (Attr a_aeRO)) -> r_ah4s -> Markup'F r_ah4s VoidNodeF :: !Text -> !(Vector (Attr a_aeRO)) -> Markup'F r_ah4s ListF :: [r_ah4s] -> Markup'F r_ah4s StreamF :: (Stream a_aeRO) -> Markup'F r_ah4s TextF :: !IsEscaped -> !SomeText -> Markup'F r_ah4s HoleF :: !IsEscaped -> a_aeRO -> Markup'F r_ah4s EmptyF :: Markup'F r_ah4s -- | Unlike plate, this uses Monad. That's because -- traverse over Vector is really quite slow. plateFM :: Monad m => (FastMarkup a -> m (FastMarkup a)) -> FastMarkup a -> m (FastMarkup a) compileAttrs :: forall a. Vector (Attr a) -> (Builder, Vector (Attr a)) escapeText :: Text -> Builder escape :: SomeText -> Builder toText :: Builder -> Text fastAttr :: Attr a -> FastMarkup a fast :: Markup' a -> FastMarkup a -- | Look for an immediate string-like term and render that immediateRender :: FastMarkup a -> Maybe Builder -- | Flatten a vector of 'FastMarkup. String-like terms that are next to -- eachother should be combined munch :: Vector (FastMarkup a) -> Vector (FastMarkup a) data EqHack a EqHack :: {-# UNPACK #-} !Int -> a -> EqHack a -- | Tag everything in a Traversable with a number eqHack :: Traversable f => f a -> f (EqHack a) -- | Recursively flatten FastMarkup until doing so does nothing flatten :: FastMarkup a -> FastMarkup a -- | Run all Text builders strictify :: FastMarkup a -> FastMarkup a -- | Compile Markup'' compile_ :: Markup' a -> FastMarkup a recompile :: FastMarkup a -> FastMarkup a -- | Render FastMarkup renderM :: Monad m => (a -> m Builder) -> FastMarkup a -> m Builder -- | Render FastMarkup by recursively rendering any sub-markup. renderMs :: Monad m => (a -> m (FastMarkup Void)) -> FastMarkup a -> m Builder -- | Render FastMarkup that has no holes. render :: FastMarkup Void -> Builder class Render a m r :: Render a m => a -> m Builder -- | Defer application of an argument to rendering class ToFastMarkup a toFastMarkup :: ToFastMarkup a => a -> FastMarkup b newtype AsDecimal a AsDecimal :: a -> AsDecimal a [asDecimal] :: AsDecimal a -> a newtype AsHex a AsHex :: a -> AsHex a [asHex] :: AsHex a -> a newtype AsRealFloat a AsRealFloat :: a -> AsRealFloat a [asRealFloat] :: AsRealFloat a -> a instance Data.Bifunctor.Bifunctor Text.Html.Nice.Internal.Markup'F instance GHC.Classes.Eq (Text.Html.Nice.Internal.EqHack a) instance (Text.Html.Nice.Internal.Render b m, m' ~ Control.Monad.Trans.Reader.ReaderT a m) => Text.Html.Nice.Internal.Render (a -> b) m' instance (GHC.Base.Monad m, Text.Html.Nice.Internal.Render b m) => Text.Html.Nice.Internal.Render (a Text.Html.Nice.Internal.:$ b) m instance GHC.Base.Monad m => Text.Html.Nice.Internal.Render Data.Void.Void m instance GHC.Base.Monad m => Text.Html.Nice.Internal.Render Data.Text.Internal.Builder.Builder m instance (Text.Html.Nice.Internal.Render a m, GHC.Base.Monad m) => Text.Html.Nice.Internal.Render (Text.Html.Nice.Internal.FastMarkup a) m instance Text.Html.Nice.Internal.ToFastMarkup Data.Text.Internal.Text instance Text.Html.Nice.Internal.ToFastMarkup Data.Text.Internal.Lazy.Text instance Text.Html.Nice.Internal.ToFastMarkup Data.Text.Internal.Builder.Builder instance GHC.Real.Integral a => Text.Html.Nice.Internal.ToFastMarkup (Text.Html.Nice.Internal.AsDecimal a) instance GHC.Real.Integral a => Text.Html.Nice.Internal.ToFastMarkup (Text.Html.Nice.Internal.AsHex a) instance GHC.Float.RealFloat a => Text.Html.Nice.Internal.ToFastMarkup (Text.Html.Nice.Internal.AsRealFloat a) instance Data.Traversable.Traversable (Text.Html.Nice.Internal.Markup'F a0) instance Data.Foldable.Foldable (Text.Html.Nice.Internal.Markup'F a0) instance GHC.Base.Functor (Text.Html.Nice.Internal.Markup'F a0) instance Data.Functor.Foldable.Recursive (Text.Html.Nice.Internal.Markup' a0) instance Data.Functor.Foldable.Corecursive (Text.Html.Nice.Internal.Markup' a0) instance Data.Traversable.Traversable Text.Html.Nice.Internal.Markup' instance Data.Foldable.Foldable Text.Html.Nice.Internal.Markup' instance GHC.Base.Functor Text.Html.Nice.Internal.Markup' instance GHC.Classes.Eq a => GHC.Classes.Eq (Text.Html.Nice.Internal.Markup' a) instance GHC.Show.Show a => GHC.Show.Show (Text.Html.Nice.Internal.Markup' a) instance GHC.Base.Functor ((Text.Html.Nice.Internal.:$) a) instance GHC.Generics.Generic (Text.Html.Nice.Internal.FastMarkup a) instance Data.Traversable.Traversable Text.Html.Nice.Internal.FastMarkup instance Data.Foldable.Foldable Text.Html.Nice.Internal.FastMarkup instance GHC.Base.Functor Text.Html.Nice.Internal.FastMarkup instance GHC.Classes.Eq a => GHC.Classes.Eq (Text.Html.Nice.Internal.FastMarkup a) instance GHC.Show.Show a => GHC.Show.Show (Text.Html.Nice.Internal.FastMarkup a) instance GHC.Classes.Eq Text.Html.Nice.Internal.SomeText instance GHC.Show.Show Text.Html.Nice.Internal.SomeText instance GHC.Classes.Eq Text.Html.Nice.Internal.IsEscaped instance GHC.Show.Show Text.Html.Nice.Internal.IsEscaped instance Data.Traversable.Traversable Text.Html.Nice.Internal.Attr instance Data.Foldable.Foldable Text.Html.Nice.Internal.Attr instance GHC.Base.Functor Text.Html.Nice.Internal.Attr instance GHC.Classes.Eq a => GHC.Classes.Eq (Text.Html.Nice.Internal.Attr a) instance GHC.Show.Show a => GHC.Show.Show (Text.Html.Nice.Internal.Attr a) instance GHC.Show.Show a => GHC.Show.Show (Text.Html.Nice.Internal.Stream a) instance GHC.Classes.Eq (Text.Html.Nice.Internal.Stream a) instance GHC.Base.Functor Text.Html.Nice.Internal.Stream instance Data.Foldable.Foldable Text.Html.Nice.Internal.Stream instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Text.Html.Nice.Internal.Stream a) instance Data.Traversable.Traversable Text.Html.Nice.Internal.Stream instance GHC.Show.Show a => GHC.Show.Show (a Text.Html.Nice.Internal.:$ b) instance GHC.Base.Monoid (Text.Html.Nice.Internal.FastMarkup a) instance Control.DeepSeq.NFData a => Control.DeepSeq.NFData (Text.Html.Nice.Internal.FastMarkup a) module Text.Html.Nice.Writer -- | A Writer-like monad data Markup p a -- | Insert text and escape it text :: Text -> Markup t () -- | Insert text and escape it lazyText :: Text -> Markup n () -- | Insert text and escape it builder :: Builder -> Markup n () -- | Insert text and escape it string :: String -> Markup n () doctype_ :: Markup p () -- | Insert text and don't escape it textRaw :: Text -> Markup t () -- | Insert text and don't escape it lazyTextRaw :: Text -> Markup n () -- | Insert text and don't escape it builderRaw :: Builder -> Markup n () -- | Insert text and don't escape it stringRaw :: String -> Markup n () class AddAttr a t | a -> t (!) :: AddAttr a t => MarkupLike a -> Attr t -> MarkupLike a infixl 8 ! dynamic :: p -> Markup p () dynamicRaw :: p -> Markup p () using :: ToFastMarkup b => (a -> b) -> Markup (a -> FastMarkup r) () -- | Sub-template sub :: Markup n a -> Markup (FastMarkup n) a stream :: Foldable f => Markup (a -> n) r -> Markup (f a -> FastMarkup n) r data Note a Note :: {-# UNPACK #-} !Int -> FastMarkup a -> Note a [noteId] :: Note a -> {-# UNPACK #-} !Int [noted] :: Note a -> FastMarkup a -- | Give a node a unique id -- -- Might be handy to build server-side react-esque systems note :: (Markup t a -> Markup t b) -> Markup t a -> Markup t (Note t, b) -- | Compile a Markup. Don't run this multiple times! compile :: Markup t a -> FastMarkup t -- | Compile a Markup. Don't run this multiple times! -- -- Same as compile but lets you use the result. runMarkup :: Markup t a -> (a, FastMarkup t) makeElement :: Text -> Markup p a -> Markup p a makeVoidElement :: Text -> Markup p () instance GHC.Base.Functor Text.Html.Nice.Writer.Note instance GHC.Show.Show a => GHC.Show.Show (Text.Html.Nice.Writer.Note a) instance GHC.Classes.Eq a => GHC.Classes.Eq (Text.Html.Nice.Writer.Note a) instance Data.Traversable.Traversable (Text.Html.Nice.Writer.MarkupStep p) instance Data.Foldable.Foldable (Text.Html.Nice.Writer.MarkupStep p) instance GHC.Base.Functor (Text.Html.Nice.Writer.MarkupStep p) instance GHC.Base.Functor (Text.Html.Nice.Writer.Markup p) instance GHC.Base.Applicative (Text.Html.Nice.Writer.Markup p) instance GHC.Base.Monad (Text.Html.Nice.Writer.Markup p) instance a ~ () => Data.String.IsString (Text.Html.Nice.Writer.Markup t a) instance Text.Html.Nice.Writer.AddAttr (Text.Html.Nice.Writer.Markup t a -> Text.Html.Nice.Writer.Markup t b) t instance Text.Html.Nice.Writer.AddAttr (Text.Html.Nice.Writer.Markup t a) t module Text.Html.Nice.Writer.Html5 xmlns_ :: AttrName wrap_ :: AttrName width_ :: AttrName value_ :: AttrName usemap_ :: AttrName type_ :: AttrName title__ :: AttrName target_ :: AttrName tabindex_ :: AttrName summary__ :: AttrName subject_ :: AttrName style__ :: AttrName step_ :: AttrName start_ :: AttrName srcdoc_ :: AttrName src_ :: AttrName spellcheck_ :: AttrName span__ :: AttrName sizes_ :: AttrName size_ :: AttrName shape_ :: AttrName selected_ :: AttrName seamless_ :: AttrName scoped_ :: AttrName scope_ :: AttrName sandbox_ :: AttrName rowspan_ :: AttrName rows_ :: AttrName reversed_ :: AttrName required_ :: AttrName rel_ :: AttrName readonly_ :: AttrName radiogroup_ :: AttrName pubdate_ :: AttrName preload_ :: AttrName placeholder_ :: AttrName ping_ :: AttrName pattern_ :: AttrName optimum_ :: AttrName open_ :: AttrName onwaiting_ :: AttrName onvolumechange_ :: AttrName onunload_ :: AttrName onundo_ :: AttrName ontimeupdate_ :: AttrName onsuspend_ :: AttrName onsubmit_ :: AttrName onstorage_ :: AttrName onstalled_ :: AttrName onselect_ :: AttrName onseeking_ :: AttrName onseeked_ :: AttrName onscroll_ :: AttrName onresize_ :: AttrName onredo_ :: AttrName onreadystatechange_ :: AttrName onratechange_ :: AttrName onpropstate_ :: AttrName onprogress_ :: AttrName onplaying_ :: AttrName onplay_ :: AttrName onpause_ :: AttrName onpageshow_ :: AttrName onpagehide_ :: AttrName ononline_ :: AttrName onmousewheel_ :: AttrName onmouseup_ :: AttrName onmouseover_ :: AttrName onmouseout_ :: AttrName onmousemove_ :: AttrName onmousedown_ :: AttrName onmessage_ :: AttrName onloadstart_ :: AttrName onloadedmetadata_ :: AttrName onloadeddata_ :: AttrName onload_ :: AttrName onkeyup_ :: AttrName onkeydown_ :: AttrName oninvalid_ :: AttrName oninput_ :: AttrName onhaschange_ :: AttrName onforminput_ :: AttrName onformchange_ :: AttrName onfocus_ :: AttrName onerror_ :: AttrName onended_ :: AttrName onemptied_ :: AttrName ondurationchange_ :: AttrName ondrop_ :: AttrName ondragstart_ :: AttrName ondragover_ :: AttrName ondragleave_ :: AttrName ondragenter_ :: AttrName ondragend_ :: AttrName ondrag_ :: AttrName ondblclick_ :: AttrName onclick_ :: AttrName oncontextmenu_ :: AttrName onchange_ :: AttrName oncanplaythrough_ :: AttrName oncanplay_ :: AttrName onblur_ :: AttrName onbeforeprint_ :: AttrName onbeforeonload_ :: AttrName novalidate_ :: AttrName name_ :: AttrName multiple_ :: AttrName min_ :: AttrName method_ :: AttrName media_ :: AttrName maxlength_ :: AttrName max_ :: AttrName manifest_ :: AttrName low_ :: AttrName loop_ :: AttrName list_ :: AttrName lang_ :: AttrName label__ :: AttrName keytype_ :: AttrName itemtype_ :: AttrName itemscope_ :: AttrName itemprop_ :: AttrName item_ :: AttrName ismap_ :: AttrName id_ :: AttrName icon_ :: AttrName http_equiv_ :: AttrName hreflang_ :: AttrName href_ :: AttrName high_ :: AttrName hidden_ :: AttrName height_ :: AttrName headers_ :: AttrName formtarget_ :: AttrName formnovalidate_ :: AttrName formmethod_ :: AttrName formenctype_ :: AttrName formaction_ :: AttrName form__ :: AttrName for_ :: AttrName enctype_ :: AttrName draggable_ :: AttrName disabled_ :: AttrName dir_ :: AttrName defer_ :: AttrName datetime_ :: AttrName data_ :: AttrName coords_ :: AttrName controls_ :: AttrName contextmenu_ :: AttrName contenteditable_ :: AttrName content_ :: AttrName colspan_ :: AttrName cols_ :: AttrName class_ :: AttrName cite__ :: AttrName checked_ :: AttrName charset_ :: AttrName challenge_ :: AttrName autoplay_ :: AttrName autofocus_ :: AttrName autocomplete_ :: AttrName async_ :: AttrName alt_ :: AttrName action_ :: AttrName accesskey_ :: AttrName accept_charset_ :: AttrName accept_ :: AttrName wbr_ :: forall t_aBIv. Markup t_aBIv () track_ :: forall t_aBIt. Markup t_aBIt () source_ :: forall t_aBIr. Markup t_aBIr () param_ :: forall t_aBIp. Markup t_aBIp () meta_ :: forall t_aBIn. Markup t_aBIn () menuitem_ :: forall t_aBIl. Markup t_aBIl () link_ :: forall t_aBIj. Markup t_aBIj () keygen_ :: forall t_aBIh. Markup t_aBIh () input_ :: forall t_aBIf. Markup t_aBIf () img_ :: forall t_aBId. Markup t_aBId () hr_ :: forall t_aBIb. Markup t_aBIb () embed_ :: forall t_aBI9. Markup t_aBI9 () col_ :: forall t_aBI7. Markup t_aBI7 () br_ :: forall t_aBI5. Markup t_aBI5 () base_ :: forall t_aBI3. Markup t_aBI3 () area_ :: forall t_aBI1. Markup t_aBI1 () video_ :: forall t_aBHY a_aBHZ. Markup t_aBHY a_aBHZ -> Markup t_aBHY a_aBHZ var_ :: forall t_aBHV a_aBHW. Markup t_aBHV a_aBHW -> Markup t_aBHV a_aBHW ul_ :: forall t_aBHS a_aBHT. Markup t_aBHS a_aBHT -> Markup t_aBHS a_aBHT tr_ :: forall t_aBHP a_aBHQ. Markup t_aBHP a_aBHQ -> Markup t_aBHP a_aBHQ title_ :: forall t_aBHM a_aBHN. Markup t_aBHM a_aBHN -> Markup t_aBHM a_aBHN time_ :: forall t_aBHJ a_aBHK. Markup t_aBHJ a_aBHK -> Markup t_aBHJ a_aBHK thead_ :: forall t_aBHG a_aBHH. Markup t_aBHG a_aBHH -> Markup t_aBHG a_aBHH th_ :: forall t_aBHD a_aBHE. Markup t_aBHD a_aBHE -> Markup t_aBHD a_aBHE tfoot_ :: forall t_aBHA a_aBHB. Markup t_aBHA a_aBHB -> Markup t_aBHA a_aBHB textarea_ :: forall t_aBHx a_aBHy. Markup t_aBHx a_aBHy -> Markup t_aBHx a_aBHy td_ :: forall t_aBHu a_aBHv. Markup t_aBHu a_aBHv -> Markup t_aBHu a_aBHv tbody_ :: forall t_aBHr a_aBHs. Markup t_aBHr a_aBHs -> Markup t_aBHr a_aBHs table_ :: forall t_aBHo a_aBHp. Markup t_aBHo a_aBHp -> Markup t_aBHo a_aBHp sup_ :: forall t_aBHl a_aBHm. Markup t_aBHl a_aBHm -> Markup t_aBHl a_aBHm summary_ :: forall t_aBHi a_aBHj. Markup t_aBHi a_aBHj -> Markup t_aBHi a_aBHj sub_ :: forall t_aBHf a_aBHg. Markup t_aBHf a_aBHg -> Markup t_aBHf a_aBHg style_ :: forall t_aBHc a_aBHd. Markup t_aBHc a_aBHd -> Markup t_aBHc a_aBHd strong_ :: forall t_aBH9 a_aBHa. Markup t_aBH9 a_aBHa -> Markup t_aBH9 a_aBHa span_ :: forall t_aBH6 a_aBH7. Markup t_aBH6 a_aBH7 -> Markup t_aBH6 a_aBH7 small_ :: forall t_aBH3 a_aBH4. Markup t_aBH3 a_aBH4 -> Markup t_aBH3 a_aBH4 select_ :: forall t_aBH0 a_aBH1. Markup t_aBH0 a_aBH1 -> Markup t_aBH0 a_aBH1 section_ :: forall t_aBGX a_aBGY. Markup t_aBGX a_aBGY -> Markup t_aBGX a_aBGY script_ :: forall t_aBGU a_aBGV. Markup t_aBGU a_aBGV -> Markup t_aBGU a_aBGV samp_ :: forall t_aBGR a_aBGS. Markup t_aBGR a_aBGS -> Markup t_aBGR a_aBGS ruby_ :: forall t_aBGO a_aBGP. Markup t_aBGO a_aBGP -> Markup t_aBGO a_aBGP rt_ :: forall t_aBGL a_aBGM. Markup t_aBGL a_aBGM -> Markup t_aBGL a_aBGM rp_ :: forall t_aBGI a_aBGJ. Markup t_aBGI a_aBGJ -> Markup t_aBGI a_aBGJ q_ :: forall t_aBGF a_aBGG. Markup t_aBGF a_aBGG -> Markup t_aBGF a_aBGG progress_ :: forall t_aBGC a_aBGD. Markup t_aBGC a_aBGD -> Markup t_aBGC a_aBGD pre_ :: forall t_aBGz a_aBGA. Markup t_aBGz a_aBGA -> Markup t_aBGz a_aBGA p_ :: forall t_aBGw a_aBGx. Markup t_aBGw a_aBGx -> Markup t_aBGw a_aBGx output_ :: forall t_aBGt a_aBGu. Markup t_aBGt a_aBGu -> Markup t_aBGt a_aBGu option_ :: forall t_aBGq a_aBGr. Markup t_aBGq a_aBGr -> Markup t_aBGq a_aBGr optgroup_ :: forall t_aBGn a_aBGo. Markup t_aBGn a_aBGo -> Markup t_aBGn a_aBGo ol_ :: forall t_aBGk a_aBGl. Markup t_aBGk a_aBGl -> Markup t_aBGk a_aBGl object_ :: forall t_aBGh a_aBGi. Markup t_aBGh a_aBGi -> Markup t_aBGh a_aBGi noscript_ :: forall t_aBGe a_aBGf. Markup t_aBGe a_aBGf -> Markup t_aBGe a_aBGf nav_ :: forall t_aBGb a_aBGc. Markup t_aBGb a_aBGc -> Markup t_aBGb a_aBGc meter_ :: forall t_aBG8 a_aBG9. Markup t_aBG8 a_aBG9 -> Markup t_aBG8 a_aBG9 menu_ :: forall t_aBG5 a_aBG6. Markup t_aBG5 a_aBG6 -> Markup t_aBG5 a_aBG6 mark_ :: forall t_aBG2 a_aBG3. Markup t_aBG2 a_aBG3 -> Markup t_aBG2 a_aBG3 map_ :: forall t_aBFZ a_aBG0. Markup t_aBFZ a_aBG0 -> Markup t_aBFZ a_aBG0 main_ :: forall t_aBFW a_aBFX. Markup t_aBFW a_aBFX -> Markup t_aBFW a_aBFX li_ :: forall t_aBFT a_aBFU. Markup t_aBFT a_aBFU -> Markup t_aBFT a_aBFU legend_ :: forall t_aBFQ a_aBFR. Markup t_aBFQ a_aBFR -> Markup t_aBFQ a_aBFR label_ :: forall t_aBFN a_aBFO. Markup t_aBFN a_aBFO -> Markup t_aBFN a_aBFO kbd_ :: forall t_aBFK a_aBFL. Markup t_aBFK a_aBFL -> Markup t_aBFK a_aBFL ins_ :: forall t_aBFH a_aBFI. Markup t_aBFH a_aBFI -> Markup t_aBFH a_aBFI iframe_ :: forall t_aBFE a_aBFF. Markup t_aBFE a_aBFF -> Markup t_aBFE a_aBFF i_ :: forall t_aBFB a_aBFC. Markup t_aBFB a_aBFC -> Markup t_aBFB a_aBFC html_ :: forall t_aBFy a_aBFz. Markup t_aBFy a_aBFz -> Markup t_aBFy a_aBFz hgroup_ :: forall t_aBFv a_aBFw. Markup t_aBFv a_aBFw -> Markup t_aBFv a_aBFw header_ :: forall t_aBFs a_aBFt. Markup t_aBFs a_aBFt -> Markup t_aBFs a_aBFt head_ :: forall t_aBFp a_aBFq. Markup t_aBFp a_aBFq -> Markup t_aBFp a_aBFq h6_ :: forall t_aBFm a_aBFn. Markup t_aBFm a_aBFn -> Markup t_aBFm a_aBFn h5_ :: forall t_aBFj a_aBFk. Markup t_aBFj a_aBFk -> Markup t_aBFj a_aBFk h4_ :: forall t_aBFg a_aBFh. Markup t_aBFg a_aBFh -> Markup t_aBFg a_aBFh h3_ :: forall t_aBFd a_aBFe. Markup t_aBFd a_aBFe -> Markup t_aBFd a_aBFe h2_ :: forall t_aBFa a_aBFb. Markup t_aBFa a_aBFb -> Markup t_aBFa a_aBFb h1_ :: forall t_aBF7 a_aBF8. Markup t_aBF7 a_aBF8 -> Markup t_aBF7 a_aBF8 form_ :: forall t_aBF4 a_aBF5. Markup t_aBF4 a_aBF5 -> Markup t_aBF4 a_aBF5 footer_ :: forall t_aBF1 a_aBF2. Markup t_aBF1 a_aBF2 -> Markup t_aBF1 a_aBF2 figure_ :: forall t_aBEY a_aBEZ. Markup t_aBEY a_aBEZ -> Markup t_aBEY a_aBEZ figcaption_ :: forall t_aBEV a_aBEW. Markup t_aBEV a_aBEW -> Markup t_aBEV a_aBEW fieldset_ :: forall t_aBES a_aBET. Markup t_aBES a_aBET -> Markup t_aBES a_aBET em_ :: forall t_aBEP a_aBEQ. Markup t_aBEP a_aBEQ -> Markup t_aBEP a_aBEQ dt_ :: forall t_aBEM a_aBEN. Markup t_aBEM a_aBEN -> Markup t_aBEM a_aBEN dl_ :: forall t_aBEJ a_aBEK. Markup t_aBEJ a_aBEK -> Markup t_aBEJ a_aBEK div_ :: forall t_aBEG a_aBEH. Markup t_aBEG a_aBEH -> Markup t_aBEG a_aBEH dfn_ :: forall t_aBED a_aBEE. Markup t_aBED a_aBEE -> Markup t_aBED a_aBEE details_ :: forall t_aBEA a_aBEB. Markup t_aBEA a_aBEB -> Markup t_aBEA a_aBEB del_ :: forall t_aBEx a_aBEy. Markup t_aBEx a_aBEy -> Markup t_aBEx a_aBEy dd_ :: forall t_aBEu a_aBEv. Markup t_aBEu a_aBEv -> Markup t_aBEu a_aBEv datalist_ :: forall t_aBEr a_aBEs. Markup t_aBEr a_aBEs -> Markup t_aBEr a_aBEs command_ :: forall t_aBEo a_aBEp. Markup t_aBEo a_aBEp -> Markup t_aBEo a_aBEp colgroup_ :: forall t_aBEl a_aBEm. Markup t_aBEl a_aBEm -> Markup t_aBEl a_aBEm code_ :: forall t_aBEi a_aBEj. Markup t_aBEi a_aBEj -> Markup t_aBEi a_aBEj cite_ :: forall t_aBEf a_aBEg. Markup t_aBEf a_aBEg -> Markup t_aBEf a_aBEg caption_ :: forall t_aBEc a_aBEd. Markup t_aBEc a_aBEd -> Markup t_aBEc a_aBEd canvas_ :: forall t_aBE9 a_aBEa. Markup t_aBE9 a_aBEa -> Markup t_aBE9 a_aBEa button_ :: forall t_aBE6 a_aBE7. Markup t_aBE6 a_aBE7 -> Markup t_aBE6 a_aBE7 body_ :: forall t_aBE3 a_aBE4. Markup t_aBE3 a_aBE4 -> Markup t_aBE3 a_aBE4 blockquote_ :: forall t_aBE0 a_aBE1. Markup t_aBE0 a_aBE1 -> Markup t_aBE0 a_aBE1 bdo_ :: forall t_aBDX a_aBDY. Markup t_aBDX a_aBDY -> Markup t_aBDX a_aBDY b_ :: forall t_aBDU a_aBDV. Markup t_aBDU a_aBDV -> Markup t_aBDU a_aBDV audio_ :: forall t_aBDR a_aBDS. Markup t_aBDR a_aBDS -> Markup t_aBDR a_aBDS aside_ :: forall t_aBDO a_aBDP. Markup t_aBDO a_aBDP -> Markup t_aBDO a_aBDP article_ :: forall t_aBDL a_aBDM. Markup t_aBDL a_aBDM -> Markup t_aBDL a_aBDM address_ :: forall t_aBDI a_aBDJ. Markup t_aBDI a_aBDJ -> Markup t_aBDI a_aBDJ abbr_ :: forall t_aBDF a_aBDG. Markup t_aBDF a_aBDG -> Markup t_aBDF a_aBDG a_ :: forall t_aBDC a_aBDD. Markup t_aBDC a_aBDD -> Markup t_aBDC a_aBDD -- | A Free monad-based HTML markup monad. Unlike the writer-like -- monad in Text.Html.Nice.Writer, sequencing bits of markup -- together results in them being nested, rather than concatenated. -- -- There is no kitchen-sink of HTML5 elements provided. Use -- OverloadedLabels instead: #div :: Markup n () and #div -- :: MakeNode n () . -- -- Since the monad and applicative of Markup here nests rather -- than concatenates, the function nodes is provided to put a list -- of nodes in sequence. You can use OverloadedLists for convenient -- syntax here. -- -- Example Markup: -- --
-- #html >> -- [ title >> "Title goes here" -- , #body >> -- [ #h1 >> "heading goes here" -- , #p >> "i am a paragraph below the heading" -- , do i <- branch [0..100] -- builder (decimal i) -- ] -- ] --module Text.Html.Nice.FreeMonad -- | Markup is a free monad based on the base functor to 'Markup\'F' -- -- Beware: this is a wacky monad. >> does *not* sequence -- nodes together; instead, it nests them. To lay out nodes sequentially, -- use nodes. -- --
-- ("foo" :: Markup n a) = text "foo"
--
--
-- -- ([a,b,c] :: Markup n a) = nodes [a,b,c] ---- --
-- (#foo :: Markup n a) = node "foo" [] ---- --
-- attr #foo [a,b,c] = node "foo" [a,b,c] --data Markup n a data FastMarkup a runMarkup :: Markup n a -> Markup' n -- | Compile a Html for use with render and its friends. -- -- See also: compile_. compile :: Markup n a -> FastMarkup n -- | Render FastMarkup renderM :: Monad m => (a -> m Builder) -> FastMarkup a -> m Builder -- | Render FastMarkup by recursively rendering any sub-markup. renderMs :: Monad m => (a -> m (FastMarkup Void)) -> FastMarkup a -> m Builder -- | Render FastMarkup that has no holes. render :: FastMarkup Void -> Builder -- | Identity functor and monad. (a non-strict monad) newtype Identity a :: * -> * Identity :: a -> Identity a [runIdentity] :: Identity a -> a -- | O(n). Extract a lazy Text from a Builder with -- a default buffer size. The construction work takes place if and when -- the relevant part of the lazy Text is demanded. toLazyText :: Builder -> Text doctype :: Markup n a -- | Make a node with some attributes. node :: Text -> [Attr n] -> Markup n () data Attr a (:=) :: !AttrName -> !Text -> Attr a [attrKey] :: Attr a -> !AttrName [attrVal] :: Attr a -> !Text (:-) :: !AttrName -> a -> Attr a [attrKey] :: Attr a -> !AttrName [attrValHole] :: Attr a -> a -- | For use with OverloadedLabels. -- --
-- attr #x [a,b,c] = node "x" [a,b,c] --attr :: MakeNode n a -> [Attr n] -> Markup n a -- | Empty node. Terminates Markup to this point empty :: Markup n a -- | Insert text and escape it text :: Text -> Markup n a -- | Insert text and escape it lazyText :: Text -> Markup n a -- | Insert text and escape it builder :: Builder -> Markup n a -- | Insert text and don't escape it unescape :: Text -> Markup n a -- | Insert text and escape it string :: String -> Markup n a -- | Insert a dynamic value. dynamic :: n -> Markup n a hole :: Markup (a -> a) t -- | Insert a sub-template. embed :: (t -> FastMarkup n) -> Markup (t -> FastMarkup n) a -- | For each element of a list, generate sequential markup nodes :: [Markup n a] -> Markup n a -- | For each element of a list of branches, generate sequential markup branch :: [a] -> Markup n a stream :: Foldable f => Markup (a -> n) r' -> Markup (f a -> FastMarkup n) r -- | Insert a sub-template. sub :: Markup n a -> Markup (FastMarkup n) a decimal :: Integral a => a -> Builder -- | Show a signed RealFloat value to full precision, using standard -- decimal notation for arguments whose absolute value lies between -- 0.1 and 9,999,999, and scientific notation -- otherwise. realFloat :: RealFloat a => a -> Builder -- | O(1). A Builder taking a Text, satisfying -- --
toLazyText (fromText t) = fromChunks -- [t]
toLazyText (fromString s) = fromChunks -- [S.pack s]
toLazyText (fromLazyText t) = t