newtype coercion wrapping status

Joachim Breitner mail at joachim-breitner.de
Tue Sep 10 16:48:43 CEST 2013


Hi,

Am Montag, den 09.09.2013, 13:25 -0400 schrieb Richard Eisenberg:
> According to the original post and the comments on #5498
> (http://ghc.haskell.org/trac/ghc/ticket/5498), breaking through
> abstraction is another reason for keeping GND outside of Safe Haskell.
> I'm worried that the same concern would affect newtype coercions given
> the current proposal.

an easy fix would be to disallow coerce in Safe Haskell.

A similarly easy fix would be to add the requirements that constructors
have to be in scope when generating the
        instance Coercible a b => Coercible (D a) (D b)
rule in Safe Haskell code. Although that might cripple the feature too
much, but not more than not having the feature at all.

I think the latter is a good compromise for the non-advertised release.

Greetings,
Joachim

-- 
Joachim “nomeata” Breitner
  mail at joachim-breitner.dehttp://www.joachim-breitner.de/
  Jabber: nomeata at joachim-breitner.de  • GPG-Key: 0x4743206C
  Debian Developer: nomeata at debian.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20130910/27788b6b/attachment.pgp>


More information about the ghc-devs mailing list