Types that contain another type, either by being a record with a field with that type, or by actually being that type.
Methods
typed :: Lens s s a aA lens that focuses on a field with a unique type in its parent type.
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
Context a s => HasType a sDefined in generic-optics-2.3.0.0 · Data.Generics.Product.TypedHasType a VoidDefined in generic-optics-2.3.0.0 · Data.Generics.Product.TypedUncluttering type signatures (see Void)
Example1 expression :t typedtyped :: HasType a s => Lens s s a a
Note that this might not longer be needed given the 'HasType a a' instance.
HasType a aDefined in generic-optics-2.3.0.0 · Data.Generics.Product.TypedEvery type has itself.