Bug in type inference
Simon Peyton-Jones
simonpj at microsoft.com
Wed Jul 25 11:59:23 EDT 2001
How true. How embarassing. I keep mis-implementing the
monomorphism restriction!
Fixed.
Simon
| -----Original Message-----
| From: Koen Claessen [mailto:koen at cs.chalmers.se]
| Sent: 25 July 2001 15:05
| To: glasgow-haskell-bugs at haskell.org
| Subject: Bug in type inference
|
|
| Hi,
|
| If I load the following module:
|
| module Apa where
| import ST
| apa = newSTRef () >> return ()
|
| into "ghci -package lang", and I ask for the type of "apa",
| the following happens:
|
| Apa> :t apa
| ST () ()
|
| This is obviously wrong, it should be (as "hugs -98" says):
|
| Apa> :t apa
| apa :: ST a ()
|
| The behaviour is present in GHC 5.00.2, but has been
| detected in earlier versions as well.
|
| It does not have anything to do with GHCi, because regular
| "ghc" makes the same mistake.
|
| /Koen.
|
|
| _______________________________________________
| Glasgow-haskell-bugs mailing list
| Glasgow-haskell-bugs at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-| haskell-bugs
|
More information about the Glasgow-haskell-bugs
mailing list