generic-data-functions-0.2.0: Familiar functions lifted to generic data types
Safe HaskellSafe-Inferred
LanguageGHC2021

Generic.Data.Rep.Error

Description

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

Documentation

type ENoEmpty = 'Text "Requested generic instance disallows empty data type" Source #

Common type error string for when you attempt to use a generic instance at an empty data type (e.g. Void, V1).

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.