boilerplate-0.0.3: Generate Haskell boilerplate.
Safe HaskellSafe-Inferred
LanguageHaskell2010

Boilerplate.Types

Documentation

data Marker Source #

Constructors

Marker Text Int (Maybe Int)

^ config (start position) (end position)

Instances

Instances details
Show Marker Source # 
Instance details

Defined in Boilerplate.Types

Eq Marker Source # 
Instance details

Defined in Boilerplate.Types

Methods

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

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

data Config Source #

Constructors

Config Text [Text] [(Text, Custom)]

^ type [rule] [custom key, value]

ConfigStart 
ConfigEnd 

Instances

Instances details
Show Config Source # 
Instance details

Defined in Boilerplate.Types

Eq Config Source # 
Instance details

Defined in Boilerplate.Types

Methods

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

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

data Custom Source #

Constructors

Global Text

^ available anywhere

Indexed [Text]

^ applies to ordered product fields

Named (Map Text Text)

^ applies to record fields and data constructors

NamedIndexed (Map Text [Text])

^ applies to ordered fields inside a sum type

Instances

Instances details
Show Custom Source # 
Instance details

Defined in Boilerplate.Types

Eq Custom Source # 
Instance details

Defined in Boilerplate.Types

Methods

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

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

type Tree = [Atom] Source #

newtype Rule Source #

Constructors

Rule Tree 

Instances

Instances details
Show Rule Source # 
Instance details

Defined in Boilerplate.Types

Methods

showsPrec :: Int -> Rule -> ShowS #

show :: Rule -> String #

showList :: [Rule] -> ShowS #

Eq Rule Source # 
Instance details

Defined in Boilerplate.Types

Methods

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

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

data Atom Source #

Constructors

Raw Text 
Type 
TParams Tree Tree Tree Text Text

^ empty prefix elem sep suffix

TParam 
Product Tree

^ elem

Sum Text Tree Text Text

^ prefix elem sep suffix

Uncons Int

^ id

Cons 
Field Tree Tree Tree Text Text

^ empty prefix elem sep suffix

TyCase Tree Tree Tree

^ (type param) (higher kinded) (neither)

Param Int

^ id

FieldName 
FieldType 
Custom Text (Maybe Tree)

^ name fallback

Sugar Sugar 

Instances

Instances details
Show Atom Source # 
Instance details

Defined in Boilerplate.Types

Methods

showsPrec :: Int -> Atom -> ShowS #

show :: Atom -> String #

showList :: [Atom] -> ShowS #

Eq Atom Source # 
Instance details

Defined in Boilerplate.Types

Methods

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

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

data Sugar Source #

Constructors

Instance Text 
Data Tree 

Instances

Instances details
Show Sugar Source # 
Instance details

Defined in Boilerplate.Types

Methods

showsPrec :: Int -> Sugar -> ShowS #

show :: Sugar -> String #

showList :: [Sugar] -> ShowS #

Eq Sugar Source # 
Instance details

Defined in Boilerplate.Types

Methods

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

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