coercible-subtypes-profunctor-1: Combine profunctors with coercible-subtypes
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Type.Coercion.Sub.Profunctor

Synopsis

Documentation

dimapR :: (forall x x' y y'. (Coercible x x', Coercible y y') => Coercible (t x y) (t x' y'), Profunctor t) => Sub a a' -> Sub b b' -> Sub (t a' b) (t a b') Source #

Extend subtype relation over a Profunctor.

upcastWith (dimapR f g) == dimap (upcastWith f) (upcastWith g)

lmapR :: (forall x x' y. Coercible x x' => Coercible (t x y) (t x' y), Profunctor t) => Sub a a' -> Sub (t a' b) (t a b) Source #

Extend subtype relation over a Profunctor (, but only contravariant part.)

upcastWith (lmapR f) == lmap (upcastWith f)

rmapR :: (forall x y y'. Coercible y y' => Coercible (t x y) (t x y'), Profunctor t) => Sub b b' -> Sub (t a b) (t a b') Source #

Extend subtype relation over a Profunctor (, but only covariant part.)

upcastWith (rmapR g) == rmap (upcastWith g)