composite-base-0.1.1.0: Shared utilities for composite-* packages.

Safe HaskellNone
LanguageHaskell2010

Composite.Base

Contents

Synopsis

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.

Minimal complete definition

fieldName

Methods

fieldName :: proxy f -> Text Source #

Reflect the name of the field as Text given some proxy representing the type.

Instances

KnownSymbol s => NamedField ((:->) s a) Source # 

Methods

fieldName :: proxy (s :-> a) -> Text Source #

fieldAsPair :: forall f. NamedField f => f -> (Text, Unwrapped f) Source #

Extract the value and reflect the name of some named field.

Orphan instances

Wrapped ((:->) s a) Source # 

Associated Types

type Unwrapped ((:->) s a) :: * #

Methods

_Wrapped' :: Iso' (s :-> a) (Unwrapped (s :-> a)) #

(~) * t ((:->) s b) => Rewrapped ((:->) s a) t Source #