wave-0.1.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Wave.Ast

Documentation

type Var = Text Source #

data Lit Source #

Constructors

LInt Int 
LFloat Float 
LString Text 

Instances

Instances details
Eq Lit Source # 
Instance details

Defined in Wave.Ast

Methods

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

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

Show Lit Source # 
Instance details

Defined in Wave.Ast

Methods

showsPrec :: Int -> Lit -> ShowS #

show :: Lit -> String #

showList :: [Lit] -> ShowS #

data Expr a Source #

Constructors

EAnnotated a (Expr a) 
ELit Lit 
EVar Var 
EFun [Var] (Sub a) 
EFunCall (Expr a) [Expr a] 
ERecord (Record (Expr a)) 
EFfi Text [Expr a] 
EVariant (Variant (Expr a)) 
ECase (Expr a) [(Pattern, Expr a)] 
ERecordAccess (Expr a) Label 

Instances

Instances details
Eq a => Eq (Expr a) Source # 
Instance details

Defined in Wave.Ast

Methods

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

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

Show a => Show (Expr a) Source # 
Instance details

Defined in Wave.Ast

Methods

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

show :: Expr a -> String #

showList :: [Expr a] -> ShowS #

data DataType Source #

Constructors

DataType Constr [TypeVar] [Variant Type] 

Instances

Instances details
Eq DataType Source # 
Instance details

Defined in Wave.Ast

Show DataType Source # 
Instance details

Defined in Wave.Ast

data Definition a Source #

Constructors

TypeDef DataType 
TermDef (TermDef a) 

Instances

Instances details
Eq a => Eq (Definition a) Source # 
Instance details

Defined in Wave.Ast

Methods

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

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

Show a => Show (Definition a) Source # 
Instance details

Defined in Wave.Ast

data TermDef a Source #

Constructors

Variable Var (Expr a) 
Function Var [Var] (Sub a) 

Instances

Instances details
Eq a => Eq (TermDef a) Source # 
Instance details

Defined in Wave.Ast

Methods

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

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

Show a => Show (TermDef a) Source # 
Instance details

Defined in Wave.Ast

Methods

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

show :: TermDef a -> String #

showList :: [TermDef a] -> ShowS #

data Statement a Source #

Constructors

SExpr (Expr a) 
SDef (TermDef a) 

Instances

Instances details
Eq a => Eq (Statement a) Source # 
Instance details

Defined in Wave.Ast

Methods

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

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

Show a => Show (Statement a) Source # 
Instance details

Defined in Wave.Ast

type Sub a = [Statement a] Source #

data Pattern Source #

Instances

Instances details
Eq Pattern Source # 
Instance details

Defined in Wave.Ast

Methods

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

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

Show Pattern Source # 
Instance details

Defined in Wave.Ast

newtype File a Source #

Constructors

File [Definition a] 

Instances

Instances details
Eq a => Eq (File a) Source # 
Instance details

Defined in Wave.Ast

Methods

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

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

Show a => Show (File a) Source # 
Instance details

Defined in Wave.Ast

Methods

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

show :: File a -> String #

showList :: [File a] -> ShowS #