hakyll-4.7.5.1: A static website compiler library

Safe Haskell | None
Language | Haskell98

Hakyll.Web.Template.Internal

Description

Module containing the template data structure

Synopsis

- newtype Template = Template {
  - unTemplate :: [TemplateElement]
  }
- newtype TemplateKey = TemplateKey String
- data TemplateExpr
  - = Ident TemplateKey
  - | Call TemplateKey [TemplateExpr]
  - | StringLiteral String
- data TemplateElement
  - = Chunk String
  - | Expr TemplateExpr
  - | Escaped
  - | If TemplateExpr Template (Maybe Template)
  - | For TemplateExpr Template (Maybe Template)
  - | Partial TemplateExpr
- readTemplate :: String -> Template

# Documentation

newtype Template Source

Datatype used for template substitutions.

Constructors

Template |

Fields

unTemplate :: [TemplateElement]

Instances

Eq Template Source |
Show Template Source |
IsString Template Source |
Binary Template Source |
Writable Template Source |

newtype TemplateKey Source

Constructors

TemplateKey String |

Instances

Eq TemplateKey Source |
Show TemplateKey Source |
IsString TemplateKey Source |
Binary TemplateKey Source |

data TemplateExpr Source

Expression in a template

Constructors

Ident TemplateKey |
Call TemplateKey [TemplateExpr] |
StringLiteral String |

Instances

Eq TemplateExpr Source |
Show TemplateExpr Source |
Binary TemplateExpr Source |

data TemplateElement Source

Elements of a template.

Constructors

Chunk String |
Expr TemplateExpr |
Escaped |
If TemplateExpr Template (Maybe Template) |
For TemplateExpr Template (Maybe Template) |
Partial TemplateExpr |

Instances

Eq TemplateElement Source |
Show TemplateElement Source |
Binary TemplateElement Source |

readTemplate :: String -> Template Source