Safe Haskell | None |
---|---|
Language | Haskell2010 |
An implementation of overloaded record fields. This module enables different types in the same module to have fields of the same name.
To use instances from this class, either:
- Enable the
OverloadedLabels
extension andimport Data.ProtoLens.Labels ()
; - Use the
field
function along with theTypeApplications
extension; or, - Import the corresponding names from the autogenerated
*_Fields
module.
For more information, see https://google.github.io/proto-lens/tutorial.html#field-overloading.
Documentation
class HasField s (x :: Symbol) a | s x -> a where Source #
A type class for lens fields.
The instance HasField s x a
can be understood as "s
has a field named x
of type a
".