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

Constrained.Spec.Tree

Documentation

data BinTree a Source #

Constructors

BinTip 
BinNode (BinTree a) a (BinTree a) 

Instances

Instances details
HasSpec fn a ⇒ HasGenHint fn (BinTree a) Source # 
Instance details

Defined in Constrained.Spec.Tree

Associated Types

type Hint (BinTree a) Source #

Methods

giveHintHint (BinTree a) → Specification fn (BinTree a) Source #

HasSpec fn a ⇒ HasSpec fn (BinTree a) Source # 
Instance details

Defined in Constrained.Spec.Tree

Associated Types

type TypeSpec fn (BinTree a) Source #

type Prerequisites fn (BinTree a) Source #

Generic (BinTree a) Source # 
Instance details

Defined in Constrained.Spec.Tree

Associated Types

type Rep (BinTree a) ∷ TypeType Source #

Methods

fromBinTree a → Rep (BinTree a) x Source #

toRep (BinTree a) x → BinTree a Source #

Show a ⇒ Show (BinTree a) Source # 
Instance details

Defined in Constrained.Spec.Tree

Methods

showsPrecIntBinTree a → ShowS Source #

showBinTree a → String Source #

showList ∷ [BinTree a] → ShowS Source #

Eq a ⇒ Eq (BinTree a) Source # 
Instance details

Defined in Constrained.Spec.Tree

Methods

(==)BinTree a → BinTree a → Bool Source #

(/=)BinTree a → BinTree a → Bool Source #

Ord a ⇒ Ord (BinTree a) Source # 
Instance details

Defined in Constrained.Spec.Tree

Methods

compareBinTree a → BinTree a → Ordering Source #

(<)BinTree a → BinTree a → Bool Source #

(<=)BinTree a → BinTree a → Bool Source #

(>)BinTree a → BinTree a → Bool Source #

(>=)BinTree a → BinTree a → Bool Source #

maxBinTree a → BinTree a → BinTree a Source #

minBinTree a → BinTree a → BinTree a Source #

Forallable (BinTree a) (BinTree a, a, BinTree a) Source # 
Instance details

Defined in Constrained.Spec.Tree

Methods

fromForAllSpec ∷ ∀ (fn ∷ [Type] → TypeType). (HasSpec fn (BinTree a), HasSpec fn (BinTree a, a, BinTree a), BaseUniverse fn) ⇒ Specification fn (BinTree a, a, BinTree a) → Specification fn (BinTree a) Source #

forAllToListBinTree a → [(BinTree a, a, BinTree a)] Source #

type Prerequisites fn (BinTree a) Source # 
Instance details

Defined in Constrained.Spec.Tree

type Prerequisites fn (BinTree a) = ()
type TypeSpec fn (BinTree a) Source # 
Instance details

Defined in Constrained.Spec.Tree

type TypeSpec fn (BinTree a)
type Rep (BinTree a) Source # 
Instance details

Defined in Constrained.Spec.Tree

type Rep (BinTree a) = D1 ('MetaData "BinTree" "Constrained.Spec.Tree" "constrained-generators-0.2.0.0-inplace" 'False) (C1 ('MetaCons "BinTip" 'PrefixI 'False) (U1TypeType) :+: C1 ('MetaCons "BinNode" 'PrefixI 'False) (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BinTree a)) :*: (S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('NothingMaybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (BinTree a)))))
type Hint (BinTree a) Source # 
Instance details

Defined in Constrained.Spec.Tree

type Hint (BinTree a) = Integer

data TreeFn (fn ∷ [Type] → TypeType) args res Source #

Instances

Instances details
FunctionLike (TreeFn fn) Source # 
Instance details

Defined in Constrained.Spec.Tree

Methods

sem ∷ ∀ (as ∷ [Type]) b. TreeFn fn as b → FunTy as b Source #

(Member (TreeFn fn) fn, BaseUniverse fn) ⇒ Functions (TreeFn fn) fn Source # 
Instance details

Defined in Constrained.Spec.Tree

Methods

propagateSpecFun ∷ ∀ (as ∷ [Type]) a b. (TypeList as, Typeable as, HasSpec fn a, HasSpec fn b, All (HasSpec fn) as) ⇒ TreeFn fn as b → ListCtx Value as (HOLE a) → Specification fn b → Specification fn a Source #

rewriteRules ∷ ∀ (as ∷ [Type]) b. (TypeList as, Typeable as, HasSpec fn b, All (HasSpec fn) as) ⇒ TreeFn fn as b → List (Term fn) as → Maybe (Term fn b) Source #

mapTypeSpec ∷ (HasSpec fn a, HasSpec fn b) ⇒ TreeFn fn '[a] b → TypeSpec fn a → Specification fn b Source #

Show (TreeFn fn args res) Source # 
Instance details

Defined in Constrained.Spec.Tree

Methods

showsPrecIntTreeFn fn args res → ShowS Source #

showTreeFn fn args res → String Source #

showList ∷ [TreeFn fn args res] → ShowS Source #

Eq (TreeFn fn args res) Source # 
Instance details

Defined in Constrained.Spec.Tree

Methods

(==)TreeFn fn args res → TreeFn fn args res → Bool Source #

(/=)TreeFn fn args res → TreeFn fn args res → Bool Source #

rootLabel_ ∷ ∀ fn a. (Member (TreeFn fn) fn, HasSpec fn a) ⇒ Term fn (Tree a) → Term fn a Source #

data TreeSpec fn a Source #

Instances

Instances details
(HasSpec fn a, Member (TreeFn fn) fn) ⇒ Show (TreeSpec fn a) Source # 
Instance details

Defined in Constrained.Spec.Tree

Methods

showsPrecIntTreeSpec fn a → ShowS Source #

showTreeSpec fn a → String Source #

showList ∷ [TreeSpec fn a] → ShowS Source #

Orphan instances

(Member (TreeFn fn) fn, HasSpec fn a) ⇒ HasGenHint fn (Tree a) Source # 
Instance details

Associated Types

type Hint (Tree a) Source #

Methods

giveHintHint (Tree a) → Specification fn (Tree a) Source #

(HasSpec fn a, Member (TreeFn fn) fn) ⇒ HasSpec fn (Tree a) Source # 
Instance details

Associated Types

type TypeSpec fn (Tree a) Source #

type Prerequisites fn (Tree a) Source #

Forallable (Tree a) (a, [Tree a]) Source # 
Instance details

Methods

fromForAllSpec ∷ ∀ (fn ∷ [Type] → TypeType). (HasSpec fn (Tree a), HasSpec fn (a, [Tree a]), BaseUniverse fn) ⇒ Specification fn (a, [Tree a]) → Specification fn (Tree a) Source #

forAllToListTree a → [(a, [Tree a])] Source #