Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data GenericsFn fn args res
- type IsNormalType a = (Cases a ~ '[a], Args a ~ '[a], IsProd a, CountCases a ~ 1)
- fst_ ∷ ∀ fn a b. (HasSpec fn a, HasSpec fn b) ⇒ Term fn (a, b) → Term fn a
- snd_ ∷ ∀ fn a b. (HasSpec fn a, HasSpec fn b) ⇒ Term fn (a, b) → Term fn b
- pair_ ∷ ∀ fn a b. (HasSpec fn a, HasSpec fn b) ⇒ Term fn a → Term fn b → Term fn (a, b)
- left_ ∷ (HasSpec fn a, HasSpec fn b, IsNormalType a, IsNormalType b) ⇒ Term fn a → Term fn (Either a b)
- right_ ∷ (HasSpec fn a, HasSpec fn b, IsNormalType a, IsNormalType b) ⇒ Term fn b → Term fn (Either a b)
- cJust_ ∷ (HasSpec fn a, IsNormalType a) ⇒ Term fn a → Term fn (Maybe a)
- cNothing_ ∷ (HasSpec fn a, IsNormalType a) ⇒ Term fn (Maybe a)
- caseOn ∷ ∀ fn a. (HasSpec fn a, HasSpec fn (SimpleRep a), HasSimpleRep a, TypeSpec fn a ~ TypeSpec fn (SimpleRep a), SimpleRep a ~ SumOver (Cases (SimpleRep a)), TypeList (Cases (SimpleRep a))) ⇒ Term fn a → FunTy (MapList (Weighted (Binder fn)) (Cases (SimpleRep a))) (Pred fn)
- branch ∷ ∀ fn p a. (HasSpec fn a, All (HasSpec fn) (Args a), IsPred p fn, IsProd a) ⇒ FunTy (MapList (Term fn) (Args a)) p → Weighted (Binder fn) a
- branchW ∷ ∀ fn p a. (HasSpec fn a, All (HasSpec fn) (Args a), IsPred p fn, IsProd a) ⇒ Int → FunTy (MapList (Term fn) (Args a)) p → Weighted (Binder fn) a
- forAll' ∷ ∀ fn t a p. (Forallable t a, Cases (SimpleRep a) ~ '[SimpleRep a], TypeSpec fn a ~ TypeSpec fn (SimpleRep a), HasSpec fn t, HasSpec fn (SimpleRep a), HasSimpleRep a, All (HasSpec fn) (Args (SimpleRep a)), IsPred p fn, IsProd (SimpleRep a), HasSpec fn a) ⇒ Term fn t → FunTy (MapList (Term fn) (Args (SimpleRep a))) p → Pred fn
- constrained' ∷ ∀ a fn p. (Cases (SimpleRep a) ~ '[SimpleRep a], TypeSpec fn a ~ TypeSpec fn (SimpleRep a), HasSpec fn (SimpleRep a), HasSimpleRep a, All (HasSpec fn) (Args (SimpleRep a)), IsProd (SimpleRep a), HasSpec fn a, IsPred p fn) ⇒ FunTy (MapList (Term fn) (Args (SimpleRep a))) p → Specification fn a
- reify' ∷ ∀ fn a b p. (Cases (SimpleRep b) ~ '[SimpleRep b], TypeSpec fn b ~ TypeSpec fn (SimpleRep b), HasSpec fn (SimpleRep b), HasSimpleRep b, All (HasSpec fn) (Args (SimpleRep b)), IsProd (SimpleRep b), HasSpec fn a, HasSpec fn b, IsPred p fn) ⇒ Term fn a → (a → b) → FunTy (MapList (Term fn) (Args (SimpleRep b))) p → Pred fn
- con ∷ ∀ c a r fn. (SimpleRep a ~ SOP (TheSop a), TypeSpec fn a ~ TypeSpec fn (SOP (TheSop a)), TypeList (ConstrOf c (TheSop a)), HasSpec fn a, HasSimpleRep a, r ~ FunTy (MapList (Term fn) (ConstrOf c (TheSop a))) (Term fn a), ResultType r ~ Term fn a, SOPTerm c fn (TheSop a), ConstrTerm fn (ConstrOf c (TheSop a))) ⇒ r
- onCon ∷ ∀ c a fn p. (IsConstrOf c (ProdOver (ConstrOf c (TheSop a))) (TheSop a), TypeSpec fn a ~ TypeSpec fn (SimpleRep a), HasSimpleRep a, HasSpec fn a, HasSpec fn (SimpleRep a), SumOver (Cases (SOP (TheSop a))) ~ SimpleRep a, All (HasSpec fn) (Cases (SOP (TheSop a))), HasSpec fn (ProdOver (ConstrOf c (TheSop a))), IsPred p fn, Args (ProdOver (ConstrOf c (TheSop a))) ~ ConstrOf c (TheSop a), All (HasSpec fn) (ConstrOf c (TheSop a)), IsProd (ProdOver (ConstrOf c (TheSop a)))) ⇒ Term fn a → FunTy (MapList (Term fn) (ConstrOf c (TheSop a))) p → Pred fn
- isCon ∷ ∀ c a fn. (IsConstrOf c (ProdOver (ConstrOf c (TheSop a))) (TheSop a), TypeSpec fn a ~ TypeSpec fn (SimpleRep a), HasSimpleRep a, HasSpec fn a, HasSpec fn (SimpleRep a), SumOver (Cases (SOP (TheSop a))) ~ SimpleRep a, All (HasSpec fn) (Cases (SOP (TheSop a))), HasSpec fn (ProdOver (ConstrOf c (TheSop a)))) ⇒ Term fn a → Pred fn
- sel ∷ ∀ n fn a c as. (SimpleRep a ~ ProdOver as, TheSop a ~ '[c ::: as], TypeSpec fn a ~ TypeSpec fn (ProdOver as), Select fn n as, HasSpec fn a, HasSpec fn (ProdOver as), HasSimpleRep a) ⇒ Term fn a → Term fn (At n as)
- match ∷ ∀ fn p a. (HasSpec fn a, IsProductType fn a, IsPred p fn) ⇒ Term fn a → FunTy (MapList (Term fn) (ProductAsList a)) p → Pred fn
- onJust ∷ ∀ fn a p. (BaseUniverse fn, HasSpec fn a, IsNormalType a, IsPred p fn) ⇒ Term fn (Maybe a) → (Term fn a → p) → Pred fn
- isJust ∷ ∀ fn a. (BaseUniverse fn, HasSpec fn a, IsNormalType a) ⇒ Term fn (Maybe a) → Pred fn
- ifElse ∷ (BaseUniverse fn, IsPred p fn, IsPred q fn) ⇒ Term fn Bool → p → q → Pred fn
- chooseSpec ∷ HasSpec fn a ⇒ (Int, Specification fn a) → (Int, Specification fn a) → Specification fn a
Documentation
data GenericsFn fn args res Source #
Instances
FunctionLike (GenericsFn fn) Source # | |
Defined in Constrained.Spec.Generics sem ∷ ∀ (as ∷ [Type]) b. GenericsFn fn as b → FunTy as b Source # | |
BaseUniverse fn ⇒ Functions (GenericsFn fn) fn Source # | |
Defined in Constrained.Spec.Generics propagateSpecFun ∷ ∀ (as ∷ [Type]) a b. (TypeList as, Typeable as, HasSpec fn a, HasSpec fn b, All (HasSpec fn) as) ⇒ GenericsFn 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) ⇒ GenericsFn fn as b → List (Term fn) as → Maybe (Term fn b) Source # mapTypeSpec ∷ (HasSpec fn a, HasSpec fn b) ⇒ GenericsFn fn '[a] b → TypeSpec fn a → Specification fn b Source # | |
Show (GenericsFn fn as b) Source # | |
Defined in Constrained.Base showsPrec ∷ Int → GenericsFn fn as b → ShowS show ∷ GenericsFn fn as b → String showList ∷ [GenericsFn fn as b] → ShowS | |
Eq (GenericsFn fn args res) Source # | |
Defined in Constrained.Base (==) ∷ GenericsFn fn args res → GenericsFn fn args res → Bool (/=) ∷ GenericsFn fn args res → GenericsFn fn args res → Bool |
type IsNormalType a = (Cases a ~ '[a], Args a ~ '[a], IsProd a, CountCases a ~ 1) Source #
left_ ∷ (HasSpec fn a, HasSpec fn b, IsNormalType a, IsNormalType b) ⇒ Term fn a → Term fn (Either a b) Source #
right_ ∷ (HasSpec fn a, HasSpec fn b, IsNormalType a, IsNormalType b) ⇒ Term fn b → Term fn (Either a b) Source #
caseOn ∷ ∀ fn a. (HasSpec fn a, HasSpec fn (SimpleRep a), HasSimpleRep a, TypeSpec fn a ~ TypeSpec fn (SimpleRep a), SimpleRep a ~ SumOver (Cases (SimpleRep a)), TypeList (Cases (SimpleRep a))) ⇒ Term fn a → FunTy (MapList (Weighted (Binder fn)) (Cases (SimpleRep a))) (Pred fn) Source #
branch ∷ ∀ fn p a. (HasSpec fn a, All (HasSpec fn) (Args a), IsPred p fn, IsProd a) ⇒ FunTy (MapList (Term fn) (Args a)) p → Weighted (Binder fn) a Source #
branchW ∷ ∀ fn p a. (HasSpec fn a, All (HasSpec fn) (Args a), IsPred p fn, IsProd a) ⇒ Int → FunTy (MapList (Term fn) (Args a)) p → Weighted (Binder fn) a Source #
forAll' ∷ ∀ fn t a p. (Forallable t a, Cases (SimpleRep a) ~ '[SimpleRep a], TypeSpec fn a ~ TypeSpec fn (SimpleRep a), HasSpec fn t, HasSpec fn (SimpleRep a), HasSimpleRep a, All (HasSpec fn) (Args (SimpleRep a)), IsPred p fn, IsProd (SimpleRep a), HasSpec fn a) ⇒ Term fn t → FunTy (MapList (Term fn) (Args (SimpleRep a))) p → Pred fn Source #
Like forAll
but pattern matches on the `Term fn a`
constrained' ∷ ∀ a fn p. (Cases (SimpleRep a) ~ '[SimpleRep a], TypeSpec fn a ~ TypeSpec fn (SimpleRep a), HasSpec fn (SimpleRep a), HasSimpleRep a, All (HasSpec fn) (Args (SimpleRep a)), IsProd (SimpleRep a), HasSpec fn a, IsPred p fn) ⇒ FunTy (MapList (Term fn) (Args (SimpleRep a))) p → Specification fn a Source #
Like constrained
but pattern matches on the bound `Term fn a`
reify' ∷ ∀ fn a b p. (Cases (SimpleRep b) ~ '[SimpleRep b], TypeSpec fn b ~ TypeSpec fn (SimpleRep b), HasSpec fn (SimpleRep b), HasSimpleRep b, All (HasSpec fn) (Args (SimpleRep b)), IsProd (SimpleRep b), HasSpec fn a, HasSpec fn b, IsPred p fn) ⇒ Term fn a → (a → b) → FunTy (MapList (Term fn) (Args (SimpleRep b))) p → Pred fn Source #
Like reify
but pattern matches on the bound `Term fn b`
con ∷ ∀ c a r fn. (SimpleRep a ~ SOP (TheSop a), TypeSpec fn a ~ TypeSpec fn (SOP (TheSop a)), TypeList (ConstrOf c (TheSop a)), HasSpec fn a, HasSimpleRep a, r ~ FunTy (MapList (Term fn) (ConstrOf c (TheSop a))) (Term fn a), ResultType r ~ Term fn a, SOPTerm c fn (TheSop a), ConstrTerm fn (ConstrOf c (TheSop a))) ⇒ r Source #
onCon ∷ ∀ c a fn p. (IsConstrOf c (ProdOver (ConstrOf c (TheSop a))) (TheSop a), TypeSpec fn a ~ TypeSpec fn (SimpleRep a), HasSimpleRep a, HasSpec fn a, HasSpec fn (SimpleRep a), SumOver (Cases (SOP (TheSop a))) ~ SimpleRep a, All (HasSpec fn) (Cases (SOP (TheSop a))), HasSpec fn (ProdOver (ConstrOf c (TheSop a))), IsPred p fn, Args (ProdOver (ConstrOf c (TheSop a))) ~ ConstrOf c (TheSop a), All (HasSpec fn) (ConstrOf c (TheSop a)), IsProd (ProdOver (ConstrOf c (TheSop a)))) ⇒ Term fn a → FunTy (MapList (Term fn) (ConstrOf c (TheSop a))) p → Pred fn Source #
isCon ∷ ∀ c a fn. (IsConstrOf c (ProdOver (ConstrOf c (TheSop a))) (TheSop a), TypeSpec fn a ~ TypeSpec fn (SimpleRep a), HasSimpleRep a, HasSpec fn a, HasSpec fn (SimpleRep a), SumOver (Cases (SOP (TheSop a))) ~ SimpleRep a, All (HasSpec fn) (Cases (SOP (TheSop a))), HasSpec fn (ProdOver (ConstrOf c (TheSop a)))) ⇒ Term fn a → Pred fn Source #
sel ∷ ∀ n fn a c as. (SimpleRep a ~ ProdOver as, TheSop a ~ '[c ::: as], TypeSpec fn a ~ TypeSpec fn (ProdOver as), Select fn n as, HasSpec fn a, HasSpec fn (ProdOver as), HasSimpleRep a) ⇒ Term fn a → Term fn (At n as) Source #
match ∷ ∀ fn p a. (HasSpec fn a, IsProductType fn a, IsPred p fn) ⇒ Term fn a → FunTy (MapList (Term fn) (ProductAsList a)) p → Pred fn Source #
onJust ∷ ∀ fn a p. (BaseUniverse fn, HasSpec fn a, IsNormalType a, IsPred p fn) ⇒ Term fn (Maybe a) → (Term fn a → p) → Pred fn Source #
isJust ∷ ∀ fn a. (BaseUniverse fn, HasSpec fn a, IsNormalType a) ⇒ Term fn (Maybe a) → Pred fn Source #
chooseSpec ∷ HasSpec fn a ⇒ (Int, Specification fn a) → (Int, Specification fn a) → Specification fn a Source #
Orphan instances
(IsNormalType a, HasSpec fn a) ⇒ HasSpec fn (Maybe a) Source # | |
emptySpec ∷ TypeSpec fn (Maybe a) Source # combineSpec ∷ TypeSpec fn (Maybe a) → TypeSpec fn (Maybe a) → Specification fn (Maybe a) Source # genFromTypeSpec ∷ ∀ (m ∷ Type → Type). (HasCallStack, MonadGenError m) ⇒ TypeSpec fn (Maybe a) → GenT m (Maybe a) Source # conformsTo ∷ Maybe a → TypeSpec fn (Maybe a) → Bool Source # shrinkWithTypeSpec ∷ TypeSpec fn (Maybe a) → Maybe a → [Maybe a] Source # toPreds ∷ Term fn (Maybe a) → TypeSpec fn (Maybe a) → Pred fn Source # cardinalTypeSpec ∷ TypeSpec fn (Maybe a) → Specification fn Integer Source # cardinalTrueSpec ∷ Specification fn Integer Source # typeSpecHasError ∷ TypeSpec fn (Maybe a) → Maybe (NonEmpty String) Source # alternateShow ∷ TypeSpec fn (Maybe a) → BinaryShow Source # monadConformsTo ∷ Maybe a → TypeSpec fn (Maybe a) → Writer [String] Bool Source # typeSpecOpt ∷ TypeSpec fn (Maybe a) → [Maybe a] → Specification fn (Maybe a) Source # guardTypeSpec ∷ [String] → TypeSpec fn (Maybe a) → Specification fn (Maybe a) Source # prerequisites ∷ Evidence (Prerequisites fn (Maybe a)) Source # | |
(HasSpec fn a, IsNormalType a, HasSpec fn b, IsNormalType b) ⇒ HasSpec fn (Either a b) Source # | |
emptySpec ∷ TypeSpec fn (Either a b) Source # combineSpec ∷ TypeSpec fn (Either a b) → TypeSpec fn (Either a b) → Specification fn (Either a b) Source # genFromTypeSpec ∷ ∀ (m ∷ Type → Type). (HasCallStack, MonadGenError m) ⇒ TypeSpec fn (Either a b) → GenT m (Either a b) Source # conformsTo ∷ Either a b → TypeSpec fn (Either a b) → Bool Source # shrinkWithTypeSpec ∷ TypeSpec fn (Either a b) → Either a b → [Either a b] Source # toPreds ∷ Term fn (Either a b) → TypeSpec fn (Either a b) → Pred fn Source # cardinalTypeSpec ∷ TypeSpec fn (Either a b) → Specification fn Integer Source # cardinalTrueSpec ∷ Specification fn Integer Source # typeSpecHasError ∷ TypeSpec fn (Either a b) → Maybe (NonEmpty String) Source # alternateShow ∷ TypeSpec fn (Either a b) → BinaryShow Source # monadConformsTo ∷ Either a b → TypeSpec fn (Either a b) → Writer [String] Bool Source # typeSpecOpt ∷ TypeSpec fn (Either a b) → [Either a b] → Specification fn (Either a b) Source # guardTypeSpec ∷ [String] → TypeSpec fn (Either a b) → Specification fn (Either a b) Source # prerequisites ∷ Evidence (Prerequisites fn (Either a b)) Source # | |
(HasSpec fn a, HasSpec fn b) ⇒ HasSpec fn (a, b) Source # | |
emptySpec ∷ TypeSpec fn (a, b) Source # combineSpec ∷ TypeSpec fn (a, b) → TypeSpec fn (a, b) → Specification fn (a, b) Source # genFromTypeSpec ∷ ∀ (m ∷ Type → Type). (HasCallStack, MonadGenError m) ⇒ TypeSpec fn (a, b) → GenT m (a, b) Source # conformsTo ∷ (a, b) → TypeSpec fn (a, b) → Bool Source # shrinkWithTypeSpec ∷ TypeSpec fn (a, b) → (a, b) → [(a, b)] Source # toPreds ∷ Term fn (a, b) → TypeSpec fn (a, b) → Pred fn Source # cardinalTypeSpec ∷ TypeSpec fn (a, b) → Specification fn Integer Source # cardinalTrueSpec ∷ Specification fn Integer Source # typeSpecHasError ∷ TypeSpec fn (a, b) → Maybe (NonEmpty String) Source # alternateShow ∷ TypeSpec fn (a, b) → BinaryShow Source # monadConformsTo ∷ (a, b) → TypeSpec fn (a, b) → Writer [String] Bool Source # typeSpecOpt ∷ TypeSpec fn (a, b) → [(a, b)] → Specification fn (a, b) Source # guardTypeSpec ∷ [String] → TypeSpec fn (a, b) → Specification fn (a, b) Source # prerequisites ∷ Evidence (Prerequisites fn (a, b)) Source # | |
(HasSpec fn a, HasSpec fn b, HasSpec fn c) ⇒ HasSpec fn (a, b, c) Source # | |
emptySpec ∷ TypeSpec fn (a, b, c) Source # combineSpec ∷ TypeSpec fn (a, b, c) → TypeSpec fn (a, b, c) → Specification fn (a, b, c) Source # genFromTypeSpec ∷ ∀ (m ∷ Type → Type). (HasCallStack, MonadGenError m) ⇒ TypeSpec fn (a, b, c) → GenT m (a, b, c) Source # conformsTo ∷ (a, b, c) → TypeSpec fn (a, b, c) → Bool Source # shrinkWithTypeSpec ∷ TypeSpec fn (a, b, c) → (a, b, c) → [(a, b, c)] Source # toPreds ∷ Term fn (a, b, c) → TypeSpec fn (a, b, c) → Pred fn Source # cardinalTypeSpec ∷ TypeSpec fn (a, b, c) → Specification fn Integer Source # cardinalTrueSpec ∷ Specification fn Integer Source # typeSpecHasError ∷ TypeSpec fn (a, b, c) → Maybe (NonEmpty String) Source # alternateShow ∷ TypeSpec fn (a, b, c) → BinaryShow Source # monadConformsTo ∷ (a, b, c) → TypeSpec fn (a, b, c) → Writer [String] Bool Source # typeSpecOpt ∷ TypeSpec fn (a, b, c) → [(a, b, c)] → Specification fn (a, b, c) Source # guardTypeSpec ∷ [String] → TypeSpec fn (a, b, c) → Specification fn (a, b, c) Source # prerequisites ∷ Evidence (Prerequisites fn (a, b, c)) Source # | |
(HasSpec fn a, HasSpec fn b, HasSpec fn c, HasSpec fn d) ⇒ HasSpec fn (a, b, c, d) Source # | |
emptySpec ∷ TypeSpec fn (a, b, c, d) Source # combineSpec ∷ TypeSpec fn (a, b, c, d) → TypeSpec fn (a, b, c, d) → Specification fn (a, b, c, d) Source # genFromTypeSpec ∷ ∀ (m ∷ Type → Type). (HasCallStack, MonadGenError m) ⇒ TypeSpec fn (a, b, c, d) → GenT m (a, b, c, d) Source # conformsTo ∷ (a, b, c, d) → TypeSpec fn (a, b, c, d) → Bool Source # shrinkWithTypeSpec ∷ TypeSpec fn (a, b, c, d) → (a, b, c, d) → [(a, b, c, d)] Source # toPreds ∷ Term fn (a, b, c, d) → TypeSpec fn (a, b, c, d) → Pred fn Source # cardinalTypeSpec ∷ TypeSpec fn (a, b, c, d) → Specification fn Integer Source # cardinalTrueSpec ∷ Specification fn Integer Source # typeSpecHasError ∷ TypeSpec fn (a, b, c, d) → Maybe (NonEmpty String) Source # alternateShow ∷ TypeSpec fn (a, b, c, d) → BinaryShow Source # monadConformsTo ∷ (a, b, c, d) → TypeSpec fn (a, b, c, d) → Writer [String] Bool Source # typeSpecOpt ∷ TypeSpec fn (a, b, c, d) → [(a, b, c, d)] → Specification fn (a, b, c, d) Source # guardTypeSpec ∷ [String] → TypeSpec fn (a, b, c, d) → Specification fn (a, b, c, d) Source # prerequisites ∷ Evidence (Prerequisites fn (a, b, c, d)) Source # | |
(HasSpec fn a, HasSpec fn b, HasSpec fn c, HasSpec fn d, HasSpec fn e) ⇒ HasSpec fn (a, b, c, d, e) Source # | |
emptySpec ∷ TypeSpec fn (a, b, c, d, e) Source # combineSpec ∷ TypeSpec fn (a, b, c, d, e) → TypeSpec fn (a, b, c, d, e) → Specification fn (a, b, c, d, e) Source # genFromTypeSpec ∷ ∀ (m ∷ Type → Type). (HasCallStack, MonadGenError m) ⇒ TypeSpec fn (a, b, c, d, e) → GenT m (a, b, c, d, e) Source # conformsTo ∷ (a, b, c, d, e) → TypeSpec fn (a, b, c, d, e) → Bool Source # shrinkWithTypeSpec ∷ TypeSpec fn (a, b, c, d, e) → (a, b, c, d, e) → [(a, b, c, d, e)] Source # toPreds ∷ Term fn (a, b, c, d, e) → TypeSpec fn (a, b, c, d, e) → Pred fn Source # cardinalTypeSpec ∷ TypeSpec fn (a, b, c, d, e) → Specification fn Integer Source # cardinalTrueSpec ∷ Specification fn Integer Source # typeSpecHasError ∷ TypeSpec fn (a, b, c, d, e) → Maybe (NonEmpty String) Source # alternateShow ∷ TypeSpec fn (a, b, c, d, e) → BinaryShow Source # monadConformsTo ∷ (a, b, c, d, e) → TypeSpec fn (a, b, c, d, e) → Writer [String] Bool Source # typeSpecOpt ∷ TypeSpec fn (a, b, c, d, e) → [(a, b, c, d, e)] → Specification fn (a, b, c, d, e) Source # guardTypeSpec ∷ [String] → TypeSpec fn (a, b, c, d, e) → Specification fn (a, b, c, d, e) Source # prerequisites ∷ Evidence (Prerequisites fn (a, b, c, d, e)) Source # | |
(HasSpec fn a, HasSpec fn b, HasSpec fn c, HasSpec fn d, HasSpec fn e, HasSpec fn g) ⇒ HasSpec fn (a, b, c, d, e, g) Source # | |
emptySpec ∷ TypeSpec fn (a, b, c, d, e, g) Source # combineSpec ∷ TypeSpec fn (a, b, c, d, e, g) → TypeSpec fn (a, b, c, d, e, g) → Specification fn (a, b, c, d, e, g) Source # genFromTypeSpec ∷ ∀ (m ∷ Type → Type). (HasCallStack, MonadGenError m) ⇒ TypeSpec fn (a, b, c, d, e, g) → GenT m (a, b, c, d, e, g) Source # conformsTo ∷ (a, b, c, d, e, g) → TypeSpec fn (a, b, c, d, e, g) → Bool Source # shrinkWithTypeSpec ∷ TypeSpec fn (a, b, c, d, e, g) → (a, b, c, d, e, g) → [(a, b, c, d, e, g)] Source # toPreds ∷ Term fn (a, b, c, d, e, g) → TypeSpec fn (a, b, c, d, e, g) → Pred fn Source # cardinalTypeSpec ∷ TypeSpec fn (a, b, c, d, e, g) → Specification fn Integer Source # cardinalTrueSpec ∷ Specification fn Integer Source # typeSpecHasError ∷ TypeSpec fn (a, b, c, d, e, g) → Maybe (NonEmpty String) Source # alternateShow ∷ TypeSpec fn (a, b, c, d, e, g) → BinaryShow Source # monadConformsTo ∷ (a, b, c, d, e, g) → TypeSpec fn (a, b, c, d, e, g) → Writer [String] Bool Source # typeSpecOpt ∷ TypeSpec fn (a, b, c, d, e, g) → [(a, b, c, d, e, g)] → Specification fn (a, b, c, d, e, g) Source # guardTypeSpec ∷ [String] → TypeSpec fn (a, b, c, d, e, g) → Specification fn (a, b, c, d, e, g) Source # prerequisites ∷ Evidence (Prerequisites fn (a, b, c, d, e, g)) Source # | |
(HasSpec fn a, HasSpec fn b, HasSpec fn c, HasSpec fn d, HasSpec fn e, HasSpec fn g, HasSpec fn h) ⇒ HasSpec fn (a, b, c, d, e, g, h) Source # | |
emptySpec ∷ TypeSpec fn (a, b, c, d, e, g, h) Source # combineSpec ∷ TypeSpec fn (a, b, c, d, e, g, h) → TypeSpec fn (a, b, c, d, e, g, h) → Specification fn (a, b, c, d, e, g, h) Source # genFromTypeSpec ∷ ∀ (m ∷ Type → Type). (HasCallStack, MonadGenError m) ⇒ TypeSpec fn (a, b, c, d, e, g, h) → GenT m (a, b, c, d, e, g, h) Source # conformsTo ∷ (a, b, c, d, e, g, h) → TypeSpec fn (a, b, c, d, e, g, h) → Bool Source # shrinkWithTypeSpec ∷ TypeSpec fn (a, b, c, d, e, g, h) → (a, b, c, d, e, g, h) → [(a, b, c, d, e, g, h)] Source # toPreds ∷ Term fn (a, b, c, d, e, g, h) → TypeSpec fn (a, b, c, d, e, g, h) → Pred fn Source # cardinalTypeSpec ∷ TypeSpec fn (a, b, c, d, e, g, h) → Specification fn Integer Source # cardinalTrueSpec ∷ Specification fn Integer Source # typeSpecHasError ∷ TypeSpec fn (a, b, c, d, e, g, h) → Maybe (NonEmpty String) Source # alternateShow ∷ TypeSpec fn (a, b, c, d, e, g, h) → BinaryShow Source # monadConformsTo ∷ (a, b, c, d, e, g, h) → TypeSpec fn (a, b, c, d, e, g, h) → Writer [String] Bool Source # typeSpecOpt ∷ TypeSpec fn (a, b, c, d, e, g, h) → [(a, b, c, d, e, g, h)] → Specification fn (a, b, c, d, e, g, h) Source # guardTypeSpec ∷ [String] → TypeSpec fn (a, b, c, d, e, g, h) → Specification fn (a, b, c, d, e, g, h) Source # prerequisites ∷ Evidence (Prerequisites fn (a, b, c, d, e, g, h)) Source # | |
HasSimpleRep (Maybe a) Source # | |
FunctionLike (GenericsFn fn) Source # | |
sem ∷ ∀ (as ∷ [Type]) b. GenericsFn fn as b → FunTy as b Source # | |
BaseUniverse fn ⇒ Functions (GenericsFn fn) fn Source # | |
propagateSpecFun ∷ ∀ (as ∷ [Type]) a b. (TypeList as, Typeable as, HasSpec fn a, HasSpec fn b, All (HasSpec fn) as) ⇒ GenericsFn 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) ⇒ GenericsFn fn as b → List (Term fn) as → Maybe (Term fn b) Source # mapTypeSpec ∷ (HasSpec fn a, HasSpec fn b) ⇒ GenericsFn fn '[a] b → TypeSpec fn a → Specification fn b Source # | |
BaseUniverse fn ⇒ Functions (SumFn fn) fn Source # | |
propagateSpecFun ∷ ∀ (as ∷ [Type]) a b. (TypeList as, Typeable as, HasSpec fn a, HasSpec fn b, All (HasSpec fn) as) ⇒ SumFn 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) ⇒ SumFn fn as b → List (Term fn) as → Maybe (Term fn b) Source # mapTypeSpec ∷ (HasSpec fn a, HasSpec fn b) ⇒ SumFn fn '[a] b → TypeSpec fn a → Specification fn b Source # | |
(HasSpec fn a, HasSpec fn b, Arbitrary (FoldSpec fn a), Arbitrary (FoldSpec fn b)) ⇒ Arbitrary (FoldSpec fn (a, b)) Source # | |
HasSimpleRep (Either a b) Source # | |
HasSimpleRep (a, b) Source # | |
HasSimpleRep (a, b, c) Source # | |
HasSimpleRep (a, b, c, d) Source # | |
HasSimpleRep (a, b, c, d, e) Source # | |
HasSimpleRep (a, b, c, d, e, g) Source # | |
HasSimpleRep (a, b, c, d, e, g, h) Source # | |