FerryCore-0.4.6.4: Ferry Core Components

Database.Ferry.Syntax

Description

Everything related to untyped core

Synopsis

Documentation

type Ident = StringSource

An identifier is represented by a string

type Identifier = StringSource

Identifiers are represented as strings

data Const Source

Constant values

Instances

class VarContainer a whereSource

Type class for extracting all variables that occur in a value of type a

Methods

vars :: a -> [Identifier]Source

data Op whereSource

Operator constructor

Constructors

Op :: String -> Op 

data CoreExpr whereSource

Datatype for building untyped core ASTs

Instances

data RecElem whereSource

Record elements

Constructors

RecElem :: String -> CoreExpr -> RecElem 

data Param whereSource

Function arguments In future, that is when defunctionalisation is implemented function arguments should just be expressions.

Constructors

ParExpr :: CoreExpr -> Param 
ParAbstr :: [String] -> CoreExpr -> Param 

data Column whereSource

Database table column

Constructors

Column :: String -> Type -> Column 

data Key whereSource

Database table key

Constructors

Key :: [String] -> Key 

data Type Source

Database column type

Constructors

TInt 
TFloat 
TString 
TBool 
TUnit 

Instances

class Dotify a whereSource

Class for transforming values into either an error or a string representing a dot file.

class Pretty a whereSource

Class for pretty printing a value of a.

Methods

pretty :: a -> Int -> StringSource

pretty function transforms a value of a into a string with identation i.

prettyPrint :: Pretty a => a -> StringSource

Shorthand for pretty without the identation argument

newLine :: Int -> StringSource

A newline followed by indenting n positions

mapIntersperseConcat :: (a -> [b]) -> [b] -> [a] -> [b]Source

maps its first argument over the third, then intersperses the result with the second argument, and finally concatenates everything.

intersperseComma :: Pretty a => [a] -> Int -> StringSource

Pretty print the values xs then intersperse with a comma and transform it into one string