shakespeare-2.0.7: 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
  - toText :: a -> Builder
- 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 Source

class ToText a where Source

Methods

toText :: a -> Builder Source

Instances

ToText Int Source |
ToText Int32 Source |
ToText Int64 Source |
ToText Builder Source |
ToText Text Source |
ToText Text Source |
ToText [Char] Source |

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

stext :: QuasiQuoter Source

text :: QuasiQuoter Source

textFile :: FilePath -> Q Exp Source

textFileDebug :: FilePath -> Q Exp Source

Deprecated: Please use textFileReload instead

textFileReload :: FilePath -> Q Exp Source

st :: QuasiQuoter Source

strict text

lt :: QuasiQuoter Source

lazy text, same as stext :)

sbt :: QuasiQuoter Source

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

lbt :: QuasiQuoter Source

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

codegen :: QuasiQuoter Source

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 Source

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 Source

codegenFileReload :: FilePath -> Q Exp Source