small hiccup in new GND check

Joachim Breitner mail at joachim-breitner.de
Tue Oct 22 08:50:16 UTC 2013


Hi,

Am Montag, den 21.10.2013, 13:08 -0400 schrieb Richard Eisenberg:
> For the curious, you can see the code in my github fork
> at https://raw.github.com/goldfirere/ghc/master/compiler/typecheck/TcDeriv.lhs (search for `role_errs`). An example of the new error message is in https://github.com/goldfirere/testsuite/blob/master/tests/roles/should_fail/Roles10.stderr

you say
        Roles10.hs:16:12:
            Can't make a derived instance of ‛C Age’
              (even with cunning newtype deriving):
              it is not type-safe to use GeneralizedNewtypeDeriving on this class;
              ‛meth’, specialized to type ‛a -> F a’, cannot be converted safely
            In the newtype declaration for ‛Age’
        
but shouldn’t that be either 

Roles10.hs:16:12:
    Can't make a derived instance of ‛C Age’
      (even with cunning newtype deriving):
      it is not type-safe to use GeneralizedNewtypeDeriving on this class;
      the type of ‛meth’, ‛a -> F a’, cannot be converted safely
    In the newtype declaration for ‛Age’

or

Roles10.hs:16:12:
    Can't make a derived instance of ‛C Age’
      (even with cunning newtype deriving):
      it is not type-safe to use GeneralizedNewtypeDeriving on this class;
      ‛meth’, specialized to type ‛Age -> F Age’, cannot be converted safely
    In the newtype declaration for ‛Age’

(I’m confused by “specialized to” when the type as printed is not
specialized.)

Greetings,
Joachim

-- 
Joachim Breitner
  e-Mail: mail at joachim-breitner.de
  Homepage: http://www.joachim-breitner.de
  ICQ#: 74513189
  Jabber-ID: nomeata at joachim-breitner.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/ghc-devs/attachments/20131022/27964f8c/attachment.sig>


More information about the ghc-devs mailing list