module Generic.Type.Assert.Error where
import GHC.TypeError
import GHC.TypeLits ( type Symbol )
type GAssertError :: ka -> Symbol -> k
type GAssertError a msg = TypeError
('Text "Assertion on generic representation failed for type: "
:<>: 'ShowType a
:$$: 'Text "Message: " :<>: 'Text msg)
type GAssertErrorVoid a =
GAssertError a "not non-void type (>=1 constructor)"
type GAssertErrorSum a =
GAssertError a "not non-sum type (1 constructor)"
type GAssertErrorNotSum a =
GAssertError a "not sum type (>=2 constructors)"
type GAssertErrorNotEnum a =
GAssertError a "not enum type (all empty constructors)"