Preventing manual instances

Joachim Breitner mail at joachim-breitner.de
Tue Sep 10 19:13:19 UTC 2013


Hi,

Am Montag, den 09.09.2013, 15:57 +0000 schrieb Simon Peyton-Jones:
> I think I'd prefer all of these checks to be done in
> checkValidInstHead. It makes sense... it's just the kind of thing that
> checkValidInstHead is for. It would remove clutter (and filtration)
> from tcInstDecls1.  
> 
> The same goes for the SafeHaskell checks in tcInstDecls1.
> 
> I'm not sure who is willing to do this?  If no one wants to do it now
> can someone make a ticket? But it might be easier just to cut to the
> chase and do it :-)

I tried to cut the chase, but the issue is that checkValidInstHead has
no idea whether the instance head it is about to check is a standalone
instance or a regular one. For Coercible this is fine, but for Typeable
it needs to allow standalone instances. So this requires more
refactoring than I’m comfortable to do at the moment, hence the
requested ticket:
http://ghc.haskell.org/trac/ghc/ticket/8264

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/b00f6beb/attachment.pgp>


More information about the ghc-devs mailing list