yate-0.1.0.2: Yet Another Template Engine

Safe HaskellNone
LanguageHaskell2010

Text.Yate.Types

Synopsis

Documentation

data Path Source #

Path to traverse in a YateValue (e.g. author.address.city)

Constructors

AbsolutePath [Text]

e.g. thing.stuff

RelativePath [Text]

e.g. .stuff (see in and forall statements)

Instances

Eq Path Source # 

Methods

(==) :: Path -> Path -> Bool #

(/=) :: Path -> Path -> Bool #

Show Path Source # 

Methods

showsPrec :: Int -> Path -> ShowS #

show :: Path -> String #

showList :: [Path] -> ShowS #

data Template a Source #

Template which needs a given type of input data

Constructors

Content Text

Raw content, nothing special

Variable Path

= statement

If Path (Template a) (Template a)

if/else statement

For Text Path (Template a)

for x in xs statement

In Path (Template a)

in statement

Parts [Template a]

Template parts following each other

Instances

Eq (Template a) Source # 

Methods

(==) :: Template a -> Template a -> Bool #

(/=) :: Template a -> Template a -> Bool #

Show (Template a) Source # 

Methods

showsPrec :: Int -> Template a -> ShowS #

show :: Template a -> String #

showList :: [Template a] -> ShowS #

class ToYate a where Source #

Minimal complete definition

toYate

Methods

toYate :: a -> YateValue Source #