Records that have a field with a unique type.
Methods
typed :: Lens s s a aA lens that focuses on a field with a unique type in its parent type. Compatible with the lens package's
Control.Lens.Lenstype.Example1 expression human ^. typed @Int50
Type errors
Example1 expression human ^. typed @String......... The type Human contains multiple values of type [Char].... The choice of value is thus ambiguous. The offending constructors are:... Human... HumanNoTall...
Example1 expression human ^. typed @Bool......... Not all constructors of the type Human contain a field of type Bool.... The offending constructors are:... HumanNoTall...
getTyped :: s -> aGet field at type.
setTyped :: a -> s -> sSet field at type.
Instances3HasType
HasType a VoidDefined in generic-lens-2.2.2.0 · Data.Generics.Product.TypedUncluttering type signatures (see Void)
Example1 expression :t +d typedtyped :: (HasType a s, Functor f) => (a -> f a) -> s -> f s
Note that this might not longer be needed given the 'HasType a a' instance.
HasType a aDefined in generic-lens-2.2.2.0 · Data.Generics.Product.TypedContext a s => HasType a sDefined in generic-lens-2.2.2.0 · Data.Generics.Product.Typed