shakespeare-2.0.13: A toolkit for making compile-time interpolated templates

Safe Haskell | None
Language | Haskell98

Text.Shakespeare.Text

Synopsis

- type TextUrl url = RenderUrl url -> Builder
- class ToText a where
- renderTextUrl :: RenderUrl url -> TextUrl url -> Text
- stext :: QuasiQuoter
- text :: QuasiQuoter
- textFile :: FilePath -> Q Exp
- textFileDebug :: FilePath -> Q Exp
- textFileReload :: FilePath -> Q Exp
- st :: QuasiQuoter
- lt :: QuasiQuoter
- sbt :: QuasiQuoter
- lbt :: QuasiQuoter
- codegen :: QuasiQuoter
- codegenSt :: QuasiQuoter
- codegenFile :: FilePath -> Q Exp
- codegenFileReload :: FilePath -> Q Exp

# Documentation

type TextUrl url = RenderUrl url -> Builder #

class ToText a where #

Minimal complete definition

toText

Methods

toText :: a -> Builder #

Instances

ToText Int # |
Methods toText :: Int -> Builder #
ToText Int32 # |
Methods toText :: Int32 -> Builder #
ToText Int64 # |
Methods toText :: Int64 -> Builder #
ToText Builder # |
Methods toText :: Builder -> Builder #
ToText Text # |
Methods toText :: Text -> Builder #
ToText Text # |
Methods toText :: Text -> Builder #
ToText [Char] # |
Methods toText :: [Char] -> Builder #

renderTextUrl :: RenderUrl url -> TextUrl url -> Text #

stext :: QuasiQuoter #

text :: QuasiQuoter #

textFile :: FilePath -> Q Exp #

textFileDebug :: FilePath -> Q Exp #

Deprecated: Please use textFileReload instead

textFileReload :: FilePath -> Q Exp #

st :: QuasiQuoter #

strict text

lt :: QuasiQuoter #

lazy text, same as stext :)

sbt :: QuasiQuoter #

strict text whose left edge is aligned with bar ('|')

lbt :: QuasiQuoter #

lazy text, whose left edge is aligned with bar ('|') * Yesod code generation

codegen :: QuasiQuoter #

codegen is designed for generating Yesod code, including templates So it uses different interpolation characters that won't clash with templates. You can use the normal text quasiquoters to generate code

codegenSt :: QuasiQuoter #

Generates strict Text codegen is designed for generating Yesod code, including templates So it uses different interpolation characters that won't clash with templates.

codegenFile :: FilePath -> Q Exp #

codegenFileReload :: FilePath -> Q Exp #