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

Constrained.Examples.Basic

Synopsis

Documentation

sizeAddOrSub4Specification BaseFn Integer Source #

We expect a negative Integer, so ltSpec tests for that.

data Foo Source #

Constructors

Foo Int 
Bar Int Int 

Instances

Instances details
Generic Foo Source # 
Instance details

Defined in Constrained.Examples.Basic

Associated Types

type Rep Foo ∷ Type → Type

Methods

fromFoo → Rep Foo x

to ∷ Rep Foo x → Foo

Show Foo Source # 
Instance details

Defined in Constrained.Examples.Basic

Methods

showsPrec ∷ Int → Foo → ShowS

showFoo → String

showList ∷ [Foo] → ShowS

HasSimpleRep Foo Source # 
Instance details

Defined in Constrained.Examples.Basic

Associated Types

type SimpleRep Foo Source #

type TheSop Foo ∷ [Type] Source #

Eq Foo Source # 
Instance details

Defined in Constrained.Examples.Basic

Methods

(==)FooFoo → Bool

(/=)FooFoo → Bool

Ord Foo Source # 
Instance details

Defined in Constrained.Examples.Basic

Methods

compareFooFoo → Ordering

(<)FooFoo → Bool

(<=)FooFoo → Bool

(>)FooFoo → Bool

(>=)FooFoo → Bool

maxFooFooFoo

minFooFooFoo

BaseUniverse fn ⇒ HasSpec fn Foo Source # 
Instance details

Defined in Constrained.Examples.Basic

Associated Types

type TypeSpec fn Foo Source #

type Prerequisites fn Foo Source #

Methods

emptySpecTypeSpec fn Foo Source #

combineSpecTypeSpec fn FooTypeSpec fn FooSpecification fn Foo Source #

genFromTypeSpec ∷ ∀ (m ∷ Type → Type). (HasCallStack, MonadGenError m) ⇒ TypeSpec fn FooGenT m Foo Source #

conformsToFooTypeSpec fn Foo → Bool Source #

shrinkWithTypeSpecTypeSpec fn FooFoo → [Foo] Source #

toPredsTerm fn FooTypeSpec fn FooPred fn Source #

cardinalTypeSpecTypeSpec fn FooSpecification fn Integer Source #

cardinalTrueSpecSpecification fn Integer Source #

typeSpecHasErrorTypeSpec fn Foo → Maybe (NonEmpty String) Source #

alternateShowTypeSpec fn FooBinaryShow Source #

monadConformsToFooTypeSpec fn Foo → Writer [String] Bool Source #

typeSpecOptTypeSpec fn Foo → [Foo] → Specification fn Foo Source #

guardTypeSpec ∷ [String] → TypeSpec fn FooSpecification fn Foo Source #

prerequisitesEvidence (Prerequisites fn Foo) Source #

type Rep Foo Source # 
Instance details

Defined in Constrained.Examples.Basic

type Rep Foo = D1 ('MetaData "Foo" "Constrained.Examples.Basic" "constrained-generators-0.2.0.0-inplace" 'False) (C1 ('MetaCons "Foo" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "Bar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing ∷ Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))
type SimpleRep Foo Source # 
Instance details

Defined in Constrained.Examples.Basic

type TheSop Foo Source # 
Instance details

Defined in Constrained.Examples.Basic

type TheSop Foo = SOPOf (Rep Foo)
type Prerequisites fn Foo Source # 
Instance details

Defined in Constrained.Examples.Basic

type Prerequisites fn Foo = ()
type TypeSpec fn Foo Source # 
Instance details

Defined in Constrained.Examples.Basic

testRewriteSpecSpecification BaseFn ((Int, Int), (Int, Int)) Source #

reifyYuckySpecification BaseFn (Int, Int, Int) Source #

canFollowLikeSpecification BaseFn ((Int, Int), (Int, Int)) Source #

data Three Source #

Constructors

One 
Two 
Three 

Instances

Instances details
Generic Three Source # 
Instance details

Defined in Constrained.Examples.Basic

Associated Types

type Rep Three ∷ Type → Type

Methods

fromThree → Rep Three x

to ∷ Rep Three x → Three

Show Three Source # 
Instance details

Defined in Constrained.Examples.Basic

Methods

showsPrec ∷ Int → Three → ShowS

showThree → String

showList ∷ [Three] → ShowS

HasSimpleRep Three Source # 
Instance details

Defined in Constrained.Examples.Basic

Associated Types

type SimpleRep Three Source #

type TheSop Three ∷ [Type] Source #

Eq Three Source # 
Instance details

Defined in Constrained.Examples.Basic

Methods

(==)ThreeThree → Bool

(/=)ThreeThree → Bool

Ord Three Source # 
Instance details

Defined in Constrained.Examples.Basic

Methods

compareThreeThree → Ordering

(<)ThreeThree → Bool

(<=)ThreeThree → Bool

(>)ThreeThree → Bool

(>=)ThreeThree → Bool

maxThreeThreeThree

minThreeThreeThree

BaseUniverse fn ⇒ HasSpec fn Three Source # 
Instance details

Defined in Constrained.Examples.Basic

Associated Types

type TypeSpec fn Three Source #

type Prerequisites fn Three Source #

type Rep Three Source # 
Instance details

Defined in Constrained.Examples.Basic

type Rep Three = D1 ('MetaData "Three" "Constrained.Examples.Basic" "constrained-generators-0.2.0.0-inplace" 'False) (C1 ('MetaCons "One" 'PrefixI 'False) (U1 ∷ Type → Type) :+: (C1 ('MetaCons "Two" 'PrefixI 'False) (U1 ∷ Type → Type) :+: C1 ('MetaCons "Three" 'PrefixI 'False) (U1 ∷ Type → Type)))
type SimpleRep Three Source # 
Instance details

Defined in Constrained.Examples.Basic

type TheSop Three Source # 
Instance details

Defined in Constrained.Examples.Basic

type TheSop Three = SOPOf (Rep Three)
type Prerequisites fn Three Source # 
Instance details

Defined in Constrained.Examples.Basic

type Prerequisites fn Three = ()
type TypeSpec fn Three Source # 
Instance details

Defined in Constrained.Examples.Basic

ifElseManySpecification BaseFn (Bool, Int, Int) Source #

chooseBackwards'Specification BaseFn ([(Int, [Int])], (Int, [Int])) Source #

wtfSpecSpecification BaseFn ([Int], Maybe ((), [Int])) Source #