Safe Haskell | None |
---|---|
Language | Haskell2010 |
- class (Wrapped f, Rewrapped f f) => NamedField f where
- fieldAsPair :: forall f. NamedField f => f -> (Text, Unwrapped f)
Documentation
class (Wrapped f, Rewrapped f f) => NamedField f where Source #
Class of types which represent fields which can be named statically (i.e. via their type only) and contain some value.
fieldName :: proxy f -> Text Source #
Reflect the name of the field as Text
given some proxy representing the type.
KnownSymbol s => NamedField ((:->) s a) Source # | |
fieldAsPair :: forall f. NamedField f => f -> (Text, Unwrapped f) Source #
Extract the value and reflect the name of some named field.