Safe Haskell | None |
---|---|
Language | Haskell2010 |
Concise vinyl record field lens syntax. This module exports an
orphan instance to make working with labels a bit more powerful. It
will conflict with other libraries that provide special syntax for
labels (i.e. placing a label in function application position, as
in #age 23
, or using a label as a lens).
Example:
fieldRec (#x =: True, #y =:
b
) :: FieldRec '[ '("x", Bool), '("y", Char) ]fieldRec (#x =: True, #y =:
b
) & #x %~ not
Orphan instances
(HasField record s ts ts' t t', Functor f, RecElemFCtx record ElField, a' ~ (t -> f t'), b' ~ (record ElField ts -> f (record ElField ts'))) => IsLabel s (a' -> b') Source # | Concise record construction syntax. Example: Concise Credit to Tikhon Jelvis who shared this technique on the Haskell-Cafe mailing list on December 23, 2017. |