User Manual sec. 3.4.4 Type defaulting in GHCi

Simon Peyton-Jones simonpj at microsoft.com
Thu Mar 3 09:53:33 EST 2005


In this case there are no type classes involved, so GHC defaults the
element type of the list to ().  It can hardly leave it as an unbound
\alpha

Simon

| -----Original Message-----
| From: Wolfgang Thaller [mailto:wolfgang.thaller at gmx.net]
| Sent: 02 March 2005 18:42
| To: Simon Peyton-Jones
| Cc: cvs-ghc at haskell.org
| Subject: Re: User Manual sec. 3.4.4 Type defaulting in GHCi
| 
| Simon Peyton-Jones wrote:
| 
| > I've added a note.  the difference is that is the phrase "or the
Show,
| > Eq, or
| > | > Ord class"
| >
| > Simon
| 
| OK, the text is much clearer now, but it doesn't seem to explain the
| behaviour I'm observing...
| 
| when I do
| 
| Prelude> foo <- return []
| Prelude> :t foo
| foo :: [()]
| 
| ... then there is no type class involved at all. The value is not
| shown, compared or anything.
| 
| Cheers,
| 
| Wolfgang



More information about the Cvs-ghc mailing list