quickspec-0.9.6: 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 :: Valuation -> a
 

Instances

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

data Atom a Source

Constructors

Atom 

Fields

sym :: Symbol
 
value :: a
 

Instances

data PGen a Source

Constructors

PGen 

Fields

totalGen :: Gen a
 
partialGen :: Gen a
 

Instances

pgen :: Gen a -> PGen aSource

type Strategy = forall a. Symbol -> PGen a -> Gen aSource

newtype Variable a Source

Constructors

Variable 

Fields

unVariable :: Atom (PGen a)
 

Instances

newtype Constant a Source

Constructors

Constant 

Fields

unConstant :: Atom a
 

Instances

newtype Valuation Source

Constructors

Valuation 

Fields

unValuation :: forall a. Variable a -> a
 

promoteVal :: (forall a. Variable a -> Gen a) -> Gen ValuationSource

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