Coerce the type in the context m to to.
Example:
newtype MyInt = MyInt Int
newtype MyReader a = MyReader (Reader Int a)
deriving (HasReader "a" MyInt) via
Coerce MyInt (MonadReader (Reader Int))
Converts the instance of
Capability.Reader.HasReader "a" Int to a
Capability.Reader.MonadReader (Reader Int)
instance using Capability.Reader.HasReader "a" MyIntCoercible Int MyInt.
Constructors
Coerce (m a)
Instances10HasReader, HasSource, HasState, HasSink, Monad, Functor, …
(Coercible from to, HasReader tag from m, forall x y. Coercible x y => Coercible (m x) (m y)) => HasReader tag to (Coerce to m)Defined in capability-0.5.0.1 · Capability.Reader.Internal.Strategies · orphanConvert the environment using safe coercion.
(Coercible from to, HasSource tag from m, forall x y. Coercible x y => Coercible (m x) (m y)) => HasSource tag to (Coerce to m)Defined in capability-0.5.0.1 · Capability.Source.Internal.Strategies · orphan(Coercible from to, HasState tag from m, forall x y. Coercible x y => Coercible (m x) (m y)) => HasState tag to (Coerce to m)Defined in capability-0.5.0.1 · Capability.State.Internal.Strategies · orphanConvert the state using safe coercion.
(Coercible from to, HasSink tag from m) => HasSink tag to (Coerce to m)Defined in capability-0.5.0.1 · Capability.Sink.Internal.Strategies · orphanConvert the state using safe coercion.
Monad m => Monad (Coerce to m)Defined in capability-0.5.0.1 · Capability.AccessorsFunctor m => Functor (Coerce to m)Defined in capability-0.5.0.1 · Capability.AccessorsApplicative m => Applicative (Coerce to m)Defined in capability-0.5.0.1 · Capability.AccessorsMonadIO m => MonadIO (Coerce to m)Defined in capability-0.5.0.1 · Capability.AccessorsPrimMonad m => PrimMonad (Coerce to m)Defined in capability-0.5.0.1 · Capability.Accessorstype PrimState (Coerce to m) = PrimState mDefined in capability-0.5.0.1 · Capability.Accessors