Why does this work: 'instance Num (Show a) where'

This is accepted by GHC 7.6.3. Is this a bug? What does it mean? instance Num (Show a) where

Is there a corresponding Show datatype?
At least with 7.8.3, having just that line gives the following error:
The first argument of ‘Num’ should have kind ‘*’,
but ‘Show a’ has kind ‘Constraint’
In the instance declaration for ‘Num (Show a)’
On 4 November 2014 19:30, Tom Ellis
This is accepted by GHC 7.6.3. Is this a bug? What does it mean?
instance Num (Show a) where _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Ivan Lazar Miljenovic Ivan.Miljenovic@gmail.com http://IvanMiljenovic.wordpress.com

No, this is in an otherwise empty file. On Tue, Nov 04, 2014 at 08:46:08PM +1100, Ivan Lazar Miljenovic wrote:
Is there a corresponding Show datatype?
At least with 7.8.3, having just that line gives the following error:
The first argument of ‘Num’ should have kind ‘*’, but ‘Show a’ has kind ‘Constraint’ In the instance declaration for ‘Num (Show a)’
On 4 November 2014 19:30, Tom Ellis
wrote: This is accepted by GHC 7.6.3. Is this a bug? What does it mean?
instance Num (Show a) where

That's a bug. As you surmise, the code is meaningless. It seems to be fixed in 7.8.
On Nov 4, 2014, at 3:30 AM, Tom Ellis
This is accepted by GHC 7.6.3. Is this a bug? What does it mean?
instance Num (Show a) where _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (3)
-
Ivan Lazar Miljenovic
-
Richard Eisenberg
-
Tom Ellis