constrained-generators-0.2.0.0: Framework for generating constrained random data using a subset of first order logic
Safe HaskellSafe-Inferred
LanguageHaskell2010

Constrained.FunctionSymbol

Synopsis
  • sameFunSym ∷ ∀ (t1 ∷ [Type] → Type → Type) d1 r1 (t2 ∷ [Type] → Type → Type) d2 r2. (Typeable t1, Typeable d1, Typeable r1, Typeable t2, Typeable d2, Typeable r2, Eq (t1 d1 r1)) ⇒ t1 d1 r1 → t2 d2 r2 → Maybe (t1 :~: t2, d1 :~: d2, r1 :~: r2)
  • getWitness ∷ ∀ t t' d r. (Typeable t, Typeable d, Typeable r, Typeable t') ⇒ t d r → Maybe (t' d r)
  • class Semantics (t ∷ [Type] → Type → Type) where

Documentation

sameFunSym ∷ ∀ (t1 ∷ [Type] → Type → Type) d1 r1 (t2 ∷ [Type] → Type → Type) d2 r2. (Typeable t1, Typeable d1, Typeable r1, Typeable t2, Typeable d2, Typeable r2, Eq (t1 d1 r1)) ⇒ t1 d1 r1 → t2 d2 r2 → Maybe (t1 :~: t2, d1 :~: d2, r1 :~: r2) Source #

getWitness ∷ ∀ t t' d r. (Typeable t, Typeable d, Typeable r, Typeable t') ⇒ t d r → Maybe (t' d r) Source #

Here we only care about the Type t, the dom, and the rng can be anything. Useful for defining patterns.

class Semantics (t ∷ [Type] → Type → Type) where Source #

Semantic operations are ones that give the function symbol, meaning as a function. I.e. how to apply the function to a list of arguments and return a value.

Methods

semantics ∷ t d r → FunTy d r Source #

Instances

Instances details
Semantics BaseW Source # 
Instance details

Defined in Constrained.Base

Methods

semantics ∷ ∀ (d ∷ [Type]) r. BaseW d r → FunTy d r Source #

Semantics IntW Source # 
Instance details

Defined in Constrained.NumSpec

Methods

semantics ∷ ∀ (d ∷ [Type]) r. IntW d r → FunTy d r Source #

Semantics NumOrdW Source # 
Instance details

Defined in Constrained.NumSpec

Methods

semantics ∷ ∀ (d ∷ [Type]) r. NumOrdW d r → FunTy d r Source #

Semantics MapW Source # 
Instance details

Defined in Constrained.Spec.Map

Methods

semantics ∷ ∀ (d ∷ [Type]) r. MapW d r → FunTy d r Source #

Semantics SetW Source # 
Instance details

Defined in Constrained.Spec.Set

Methods

semantics ∷ ∀ (d ∷ [Type]) r. SetW d r → FunTy d r Source #

Semantics TreeW Source # 
Instance details

Defined in Constrained.Spec.Tree

Methods

semantics ∷ ∀ (d ∷ [Type]) r. TreeW d r → FunTy d r Source #

Semantics BoolW Source # 
Instance details

Defined in Constrained.TheKnot

Methods

semantics ∷ ∀ (d ∷ [Type]) r. BoolW d r → FunTy d r Source #

Semantics ElemW Source # 
Instance details

Defined in Constrained.TheKnot

Methods

semantics ∷ ∀ (d ∷ [Type]) r. ElemW d r → FunTy d r Source #

Semantics EqW Source # 
Instance details

Defined in Constrained.TheKnot

Methods

semantics ∷ ∀ (d ∷ [Type]) r. EqW d r → FunTy d r Source #

Semantics FunW Source # 
Instance details

Defined in Constrained.TheKnot

Methods

semantics ∷ ∀ (d ∷ [Type]) r. FunW d r → FunTy d r Source #

Semantics ListW Source # 
Instance details

Defined in Constrained.TheKnot

Methods

semantics ∷ ∀ (d ∷ [Type]) r. ListW d r → FunTy d r Source #

Semantics ProdW Source # 
Instance details

Defined in Constrained.TheKnot

Methods

semantics ∷ ∀ (d ∷ [Type]) r. ProdW d r → FunTy d r Source #

Semantics SizeW Source # 
Instance details

Defined in Constrained.TheKnot

Methods

semantics ∷ ∀ (d ∷ [Type]) r. SizeW d r → FunTy d r Source #

Semantics SumW Source # 
Instance details

Defined in Constrained.TheKnot

Methods

semantics ∷ ∀ (d ∷ [Type]) r. SumW d r → FunTy d r Source #