Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Common descriptions for common generic data representation errors. Type level (compile time) and term level (runtime).
TODO: if this package ever expands, these deserve plenty of attention, like generic-optics has.
Runtime errors are a bit meatier because it's easy to do so, and I don't want people to see them more than once (really you should use the typing support).
Synopsis
- wrapE :: String -> String -> String
- type ENoEmpty = 'Text "Requested generic instance disallows empty data type"
- eNoEmpty :: String
- type EUnexpectedSum = 'Text "Cannot derive non-sum generic instance for sum data type"
- eNoSum :: String
- type EUnexpectedNonSum = 'Text "Refusing to derive sum generic instance for non-sum data type"
- eNeedSum :: String
Documentation
type EUnexpectedSum = 'Text "Cannot derive non-sum generic instance for sum data type" Source #
Common type error string for when GHC is asked to derive a non-sum instance, but the data type in question turns out to be a sum data type.
No need to add the data type name here, since GHC's context includes the surrounding instance declaration.
type EUnexpectedNonSum = 'Text "Refusing to derive sum generic instance for non-sum data type" Source #
Common type error string for when GHC is asked to derive a sum instance, but the data type in question turns out to be a non-sum data type.
No need to add the data type name here, since GHC's context includes the surrounding instance declaration.