| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Text.EDE.Filters
Contents
Description
The means to construct your own filters.
- data Term
- class Quote a where
- class Unquote a where
- (@:) :: Quote a => Id -> a -> (Id, Term)
- qapply :: Delta -> Term -> Term -> Result Term
- qpoly2 :: Quote a => Id -> (Value -> Value -> a) -> (Id, Term)
- qnum1 :: Id -> (Scientific -> Scientific) -> (Id, Term)
- qnum2 :: Quote a => Id -> (Scientific -> Scientific -> a) -> (Id, Term)
- qcol1 :: (Quote a, Quote b, Quote c) => Id -> (Text -> a) -> (Object -> b) -> (Array -> c) -> (Id, Term)
- typeErr :: Id -> Int -> Doc -> Doc -> Result a
- argumentErr :: Pretty a => Id -> Int -> a -> Result b
Prelude
The default filters available to a template are documented by the subsequent categories.
These filters cannot be overriden and attempting to supply your own filters to
renderWith will cause the similarly named filters to disappear when
they are merged with the prelude during evaluation. (See: union)
Boolean
Equality
Relational
Numeric
Fractional
Textual
takeWord:: Text -> TextdropWord:: Text -> TextlowerHead:: Text -> TextupperHead:: Text -> TexttoTitle:: Text -> TexttoCamel:: Text -> TexttoPascal:: Text -> TexttoSnake:: Text -> TexttoSpinal:: Text -> TexttoTrain:: Text -> TexttoLower:: Text -> TexttoUpper:: Text -> TexttoOrdinal:: Scientific -> Text
Collection
Polymorphic
show:: a -> Text
Constructing filters
A HOAS representation of (possibly partially applied) values in the environment.
Classes
Instances
| Quote Bool Source # | |
| Quote Double Source # | |
| Quote Int Source # | |
| Quote Integer Source # | |
| Quote Builder Source # | |
| Quote Scientific Source # | |
| Quote Text Source # | |
| Quote Object Source # | |
| Quote Array Source # | |
| Quote Value Source # | |
| Quote Text Source # | |
| Quote Term Source # | |
| Quote [Text] Source # | |
| Quote [Value] Source # | |
| (Unquote a, Quote b) => Quote (a -> b) Source # | |
Restricted quoters
qpoly2 :: Quote a => Id -> (Value -> Value -> a) -> (Id, Term) Source #
Quote a binary function which takes the most general binding value.
qnum1 :: Id -> (Scientific -> Scientific) -> (Id, Term) Source #
Quote an unary numeric function.
qnum2 :: Quote a => Id -> (Scientific -> Scientific -> a) -> (Id, Term) Source #
Quote a binary numeric function.
qcol1 :: (Quote a, Quote b, Quote c) => Id -> (Text -> a) -> (Object -> b) -> (Array -> c) -> (Id, Term) Source #
Quote a comprehensive set of unary functions to create a binding that supports all collection types.