RE: [Haskell-cafe] Typeclasses and instances

I've finally gotten around to fixing this. The fix won't be in 6.4 (ever) as mentioned below, but it's done in the HEAD. Simon | -----Original Message----- | From: haskell-cafe-bounces@haskell.org [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of | Simon Peyton-Jones | Sent: 18 March 2005 13:01 | To: Mark Carroll; haskell-cafe@haskell.org | Subject: RE: [Haskell-cafe] Typeclasses and instances | | Strange. This is a bug in GHC that crept in when I implemented GADTs. | It turns out to be slightly structural; fixing it will change the | interface-file format. So it won't get fixed in 6.4; but will in the | HEAD. That doesn't bother me; the context on a data/newtype decl is a | strange thing anyway; only useful for generating extra errors... but | yes, it's a bug thanks for pointing it out. | | Simon | | | -----Original Message----- | | From: haskell-cafe-bounces@haskell.org | [mailto:haskell-cafe-bounces@haskell.org] On Behalf Of Mark | | Carroll | | Sent: 17 March 2005 19:58 | | To: haskell-cafe@haskell.org | | Subject: Re: [Haskell-cafe] Typeclasses and instances | | | | Another note, with more help from friends: | | | | It turns out that GHC 6.4 will let me do, | | | | newtype Floating a => Test a = Test [a] deriving Show | | | | x = Test [False, True] | | | | but, if I change "newtype" to "data", it then says, | | | | No instance for (Floating Bool) | | | | I'm not sure I quite understand what's going on. | | | | -- Mark | | _______________________________________________ | | Haskell-Cafe mailing list | | Haskell-Cafe@haskell.org | | http://www.haskell.org/mailman/listinfo/haskell-cafe | _______________________________________________ | Haskell-Cafe mailing list | Haskell-Cafe@haskell.org | http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (1)
-
Simon Peyton-Jones