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

Generic.Data.Function.Common.Generic

Description

Handy generics utils.

Synopsis

Documentation

datatypeName' :: forall d. Datatype d => String Source #

datatypeName without the value (only used as a proxy). Lets us push our undefineds into one place.

conName' :: forall c. Constructor c => String Source #

conName without the value (only used as a proxy). Lets us push our undefineds into one place.

selName' :: forall s. Selector s => String Source #

selName without the value (only used as a proxy). Lets us push our undefineds into one place.

selName'' :: forall s. Selector s => Maybe String Source #

Get the record name for a selector if present.

On the type level, a 'Maybe Symbol' is stored for record names. But the reification is done using fromMaybe "". So we have to inspect the resulting string to determine whether the field uses record syntax or not. (Silly.)

absurdV1 :: forall {k} x a. V1 (x :: k) -> a Source #

absurd for the generic representation of the void type.