Changes between Initial Version and Version 1 of Ticket #13153, comment 9


Ignore:
Timestamp:
Sep 21, 2017 7:12:03 PM (2 years ago)
Author:
RyanGlScott
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #13153, comment 9

    initial v1  
    3333}}}
    3434
    35 Notice that we're now able to stick a `forall` inside of an instance context, something which GHC currently forbids! The idea here being that this `forall f a b. Applicative f => Coercible (f (inner b)) (f (Wrapped inner b))` would get fed into the constraint solver and could be used to conclude that `Coercible (f (inner b)) (f (Wrapped b))` works for //any// `f` and `b` (where `f` is `Applicative`).
     35Notice that we're now able to stick a `forall` inside of an instance context, something which GHC currently forbids! The idea here being that this `forall f a b. Applicative f => Coercible (f (inner b)) (f (Wrapped inner inner b))` would get fed into the constraint solver and could be used to conclude that `Coercible (f (inner b)) (f (Wrapped inner b))` works for //any// `f` and `b` (where `f` is `Applicative`).
    3636
    3737But do keep in mind that user-visible implication constraints are nothing but a feature request at the moment, so all the above is hypothetical. Until some wonderful day in the future when we have this, the escape hatch is `unsafeCoerce`.