Unpacking coercions

David Feuer david.feuer at gmail.com
Mon Sep 3 17:00:39 UTC 2018


I had an idea for how we might be able to unpack coercions in a limited and
conservative way that doesn't get into the general problems of unpacking
constraints. Would this make sense?

1. Move the definition of Coercion from Data.Type.Coercion to GHC.Magic

2. Magically change the type of the Coercion constructor from

  Coercion :: Coercible a b => Coercion a b

to

  Coercion :: a ~R# b => Coercion a b

Now a strict Coercion field will unpack to nothing.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20180903/204d93a8/attachment.html>


More information about the ghc-devs mailing list