quickspec-0.9: Equational laws for free

Safe HaskellNone

Test.QuickSpec.Term

Description

Terms and evaluation.

Documentation

data Symbol Source

Constructors

Symbol 

Instances

data Term Source

Constructors

Var Symbol 
Const Symbol 
App Term Term 

Instances

data Expr a Source

Constructors

Expr 

Fields

term :: Term
 
arity :: !Int
 
eval :: (forall b. Variable b -> b) -> a
 

Instances

Eq (Expr a) 
Ord (Expr a) 
Show (Expr a) 

data Atom a Source

Constructors

Atom 

Fields

sym :: Symbol
 
value :: a
 

Instances

newtype Variable a Source

Constructors

Variable 

Fields

unVariable :: Atom (Gen a)
 

Instances

newtype Constant a Source

Constructors

Constant 

Fields

unConstant :: Atom a
 

Instances

app :: Expr (a -> b) -> Expr a -> Expr bSource