Re: Interaction and ambiguous type variables

Alastair Reid <[email protected]>
Newsgroups gmane.comp.lang.haskell.hugs.bugs,gmane.comp.lang.haskell.glasgow.bugs
Organization Reid-Hoffmann
Message-ID <[email protected]>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.