Interaction and ambiguous type variables

Alastair Reid alastair@reid-hoffmann.net
Thu, 3 Jul 2003 14:25:35 +0100


Could this problem be solved by having interactive environments (ghci, Hugs) 
extend the default rules so that they don't just apply for Num contexts but 
also for Show contexts?

For example, with a default declaration 

  default ((), Integer, Double)

we would have the ambiguous type

  show [] :: Show a => String

which would be resolved by choosing a=().

(Note that I'm using () instead of adding a new type 'Void'.  This seems nicer 
from a language-design viewpoint and I'd guess is nicer for someone trying to 
teach Haskell.)

--
Alastair