yesod-dsl-0.1.1.20: DSL for generating Yesod subsite to manage an RDBMS;

Safe HaskellNone

YesodDsl.AST

Description

Abstract Syntax Tree of yesod-dsl definition.

Synopsis

Documentation

data Module Source

definitions in single file form a Module

Constructors

Module 

Fields

modName :: Maybe String

top-level module must have a name

modEntities :: [Entity]

database entity definitions

modClasses :: [Class]

entity classes

modEnums :: [EnumType]

enumerated field types

modRoutes :: [Route]

HTTP routes

modDefines :: [Define]

common expressions

Instances

Data Module 
Show Module 
Typeable Module 

moduleName :: Module -> StringSource

safe function to extract Module name

type ClassName = StringSource

type ParamName = StringSource

name of a parameter (for various things)

type EntityName = StringSource

type EnumName = StringSource

data Location Source

file name, row number, and column

Constructors

Loc FilePath Int Int 

Instances

Eq Location 
Data Location 
Show Location 
Typeable Location 

data Define Source

macro definition, currently used only to define parametrized sub-select-queries

Instances

Eq Define 
Data Define 
Show Define 
Typeable Define 

data DefineContent Source

macro-like definition, currently only for commonly used parametrized sub-queries

Instances

type FieldName = StringSource

name of a Field

data Unique Source

Constructors

Unique 

Fields

uniqueName :: String
 
uniqueFields :: [FieldName]
 

Instances

Eq Unique 
Data Unique 
Show Unique 
Typeable Unique 

type VariableName = StringSource

data BinOp Source

Constructors

Eq 
Ne 
Lt 
Gt 
Le 
Ge 
Like 
Ilike 
Is 
In 
NotIn 

Instances

Eq BinOp 
Data BinOp 
Show BinOp 
Typeable BinOp 

data ValBinOp Source

Constructors

Add 
Sub 
Div 
Mul 
Concat 

Instances

Eq ValBinOp 
Data ValBinOp 
Show ValBinOp 
Typeable ValBinOp 

type UseParamFlag = BoolSource

data SelectQuery Source

Constructors

SelectQuery 

Instances

Eq SelectQuery 
Data SelectQuery 
Show SelectQuery 
Typeable SelectQuery 

type MaybeFlag = BoolSource

data Join Source

Instances

Eq Join 
Data Join 
Show Join 
Typeable Join 

data SortDir Source

Constructors

SortAsc 
SortDesc 

Instances

Eq SortDir 
Data SortDir 
Show SortDir 
Typeable SortDir 

data Handler Source

Instances

Eq Handler 
Data Handler 
Show Handler 
Typeable Handler 

data Route Source

Constructors

Route 

Instances

Eq Route 
Data Route 
Show Route 
Typeable Route 

routeName :: [PathPiece] -> StringSource

data PathPiece Source

Constructors

PathText String 
PathId Location EntityName 

Instances

Eq PathPiece 
Data PathPiece 
Show PathPiece 
Typeable PathPiece 

data EnumType Source

Constructors

EnumType 

Fields

enumLoc :: Location
 
enumName :: String
 
enumValues :: [String]
 

Instances

Eq EnumType 
Data EnumType 
Show EnumType 
Typeable EnumType 

data Class Source

Constructors

Class 

Fields

classLoc :: Location
 
className :: String
 
classFields :: [Field]
 
classUniques :: [Unique]
 

Instances

Eq Class 
Data Class 
Show Class 
Typeable Class 

type DefaultValue = StringSource

type IsListFlag = BoolSource

data Field Source

Instances

Eq Field 
Data Field 
Show Field 
Typeable Field 

type FunctionName = StringSource

data FieldValue Source

Constructors

StringValue String 
IntValue Int 
FloatValue Double 
BoolValue Bool 
NothingValue 

Instances

Eq FieldValue 
Data FieldValue 
Ord FieldValue 
Show FieldValue 
Typeable FieldValue 

lowerFirst :: String -> StringSource

upperFirst :: String -> StringSource