Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class (ConstraintsB b, ProductB b) => ProofB b where
- type CanDeriveGenericInstance b = (Generic (b (Target P)), GProof (ClassifyBarbie b) b (RecRep (b (Target F))), Rep (b (Target P)) ~ Repl' (Target F) (Target P) (RecRep (b (Target F))))
- type ConstraintsOfMatchesGenericDeriv c f b = (ConstraintsOf c f b ~ GConstraintsOf c f (RecRep (b (Target F))), ConstraintsOf c f b ~ ConstraintByType (ClassifyBarbie b) c f (RecRep (b (Target F))))
- type GConstraintsOf c f r = ConstraintByType (GClassifyBarbie r) c f r
- class GProof (bt :: BarbieType) b rep
- gbproofDefault :: forall b c f. (CanDeriveGenericInstance b, ConstraintsOfMatchesGenericDeriv c f b, ConstraintsOf c f b) => b (DictOf c f)
Documentation
class (ConstraintsB b, ProductB b) => ProofB b where Source #
Barbie-types with products have a canonical proof of instance.
There is a default bproof
implementation for Generic
types, so
instances can derived automatically.
bproof :: ConstraintsOf c f b => b (DictOf c f) Source #
bproof :: (CanDeriveGenericInstance b, ConstraintsOfMatchesGenericDeriv c f b, ConstraintsOf c f b) => b (DictOf c f) Source #
type CanDeriveGenericInstance b = (Generic (b (Target P)), GProof (ClassifyBarbie b) b (RecRep (b (Target F))), Rep (b (Target P)) ~ Repl' (Target F) (Target P) (RecRep (b (Target F)))) Source #
Every type that admits a generic instance of ProductB
and
ConstraintsB
, has a generic instance of ProofB
as well.
type ConstraintsOfMatchesGenericDeriv c f b = (ConstraintsOf c f b ~ GConstraintsOf c f (RecRep (b (Target F))), ConstraintsOf c f b ~ ConstraintByType (ClassifyBarbie b) c f (RecRep (b (Target F)))) Source #
type GConstraintsOf c f r = ConstraintByType (GClassifyBarbie r) c f r Source #
gbproofDefault :: forall b c f. (CanDeriveGenericInstance b, ConstraintsOfMatchesGenericDeriv c f b, ConstraintsOf c f b) => b (DictOf c f) Source #