[Haskell-cafe] A point in favour of -XOverlappingInstances (and -XTypeSynonymInstances)

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Sat May 17 12:38:12 EDT 2008

On Sat, 2008-05-17 at 15:12 +0200, Achim Schneider wrote:
> Token.hs:103:15:
>     Overlapping instances for Show (SourcePos, Tok)
>       arising from a use of `anyToken' at Token.hs:103:15-22
>     Matching instances:
>       instance (Show a, Show b) => Show (a, b) -- Defined in GHC.Show
>       instance [overlap ok] Show Token
>         -- Defined at Token.hs:(39,0)-(40,23)
> I was just trying _not_ to show the a of (a,b)

A point in favour of newtypes

newtype Token = Token (SourcePos, Tok)
instance Show Token where

More information about the Haskell-Cafe mailing list