[Haskell-cafe] Reverse Show instance

Andrew Coppin andrewcoppin at btinternet.com
Thu May 19 23:15:06 CEST 2011


On 19/05/2011 10:11 PM, Artyom Kazak wrote:
> And I can declare an instance for (x, y) which does NOT implies (Show x):
>
> instance Show (x, y) where
> show _ = "I'm tuple! Hooray!"

Ah. So it's a feature.

Fortunately I refactored the program where this came up, so it's no 
longer an issue. I just wanted to see whether or not it was a bug.

PS. Wouldn't such an instance require FlexibleContexts or something?



More information about the Haskell-Cafe mailing list