class Field (name :: k) s t a b | s name -> a, t name -> b, s name b -> t, t name a -> s whereField is morally the same as HasField, but it is constructed from an incoherent combination of HasField and HasField'. In this way, it can be seamlessly used in the IsLabel instance even when dealing with data types that don't have Field instances (like data instances).
Methods
fieldLens :: Lens s t a b