Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Generic.Type.Assert.Error
Description
Descriptive type errors for generic representation assertion failures.
These are potentially useful separately from the asserts, in places where
we're unable to perform asserts which evaluate to Constraint
s e.g. type
families, so we expose them neatly here.
Documentation
type GAssertError a msg = TypeError (('Text "Assertion on generic representation failed for type: " :<>: 'ShowType a) :$$: ('Text "Message: " :<>: 'Text msg)) Source #
type GAssertErrorVoid a = GAssertError a "not non-void type (>=1 constructor)" Source #
type GAssertErrorSum a = GAssertError a "not non-sum type (1 constructor)" Source #
type GAssertErrorNotSum a = GAssertError a "not sum type (>=2 constructors)" Source #
type GAssertErrorNotEnum a = GAssertError a "not enum type (all empty constructors)" Source #