Linear or multiplicity polymorphic coerce
Should there exist a
lcoerce :: Coercible a b => a %m -> b
As coerce
is primitive, lcoerce
cannot be defined "safely". (Although, coerce
isn't safe haskell either).
The coerce
itself could be generalized, but I'm not sure whether that would break something (even if it's defined explicitly as forall a b m. Coercible a b => a %m -> b
, so the possible TypeApplications
are still in right order).
Note: linear unsafeCoerce
can be written by a user using UnsafeEquality
.