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.Pairs

Documentation

cartesian ∷ (HasSpec fn a, HasSpec fn b) ⇒ Specification fn a → Specification fn b → Specification fn (Prod a b) Source #

data PairSpec fn a b Source #

Constructors

Cartesian (Specification fn a) (Specification fn b) 

Instances

Instances details
(Arbitrary (Specification fn a), Arbitrary (Specification fn b)) ⇒ Arbitrary (PairSpec fn a b) Source # 
Instance details

Defined in Constrained.Spec.Pairs

Methods

arbitraryGen (PairSpec fn a b) Source #

shrinkPairSpec fn a b → [PairSpec fn a b] Source #

(HasSpec fn a, HasSpec fn b) ⇒ Show (PairSpec fn a b) Source # 
Instance details

Defined in Constrained.Spec.Pairs

Methods

showsPrecIntPairSpec fn a b → ShowS Source #

showPairSpec fn a b → String Source #

showList ∷ [PairSpec fn a b] → ShowS Source #

pairView ∷ ∀ fn a b. Member (PairFn fn) fn ⇒ Term fn (Prod a b) → Maybe (Term fn a, Term fn b) Source #

Orphan instances

(HasSpec fn a, HasSpec fn b) ⇒ HasSpec fn (Prod a b) Source # 
Instance details

Associated Types

type TypeSpec fn (Prod a b) Source #

type Prerequisites fn (Prod a b) Source #

Methods

emptySpecTypeSpec fn (Prod a b) Source #

combineSpecTypeSpec fn (Prod a b) → TypeSpec fn (Prod a b) → Specification fn (Prod a b) Source #

genFromTypeSpec ∷ ∀ (m ∷ TypeType). (HasCallStack, MonadGenError m) ⇒ TypeSpec fn (Prod a b) → GenT m (Prod a b) Source #

conformsToProd a b → TypeSpec fn (Prod a b) → Bool Source #

shrinkWithTypeSpecTypeSpec fn (Prod a b) → Prod a b → [Prod a b] Source #

toPredsTerm fn (Prod a b) → TypeSpec fn (Prod a b) → Pred fn Source #

cardinalTypeSpecTypeSpec fn (Prod a b) → Specification fn Integer Source #

cardinalTrueSpecSpecification fn Integer Source #

typeSpecHasErrorTypeSpec fn (Prod a b) → Maybe (NonEmpty String) Source #

alternateShowTypeSpec fn (Prod a b) → BinaryShow Source #

monadConformsToProd a b → TypeSpec fn (Prod a b) → Writer [String] Bool Source #

typeSpecOptTypeSpec fn (Prod a b) → [Prod a b] → Specification fn (Prod a b) Source #

prerequisitesEvidence (Prerequisites fn (Prod a b)) Source #

BaseUniverse fn ⇒ Functions (PairFn fn) fn Source # 
Instance details

Methods

propagateSpecFun ∷ ∀ (as ∷ [Type]) a b. (TypeList as, Typeable as, HasSpec fn a, HasSpec fn b, All (HasSpec fn) as) ⇒ PairFn 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) ⇒ PairFn fn as b → List (Term fn) as → Maybe (Term fn b) Source #

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