Bug in type inference
Koen Claessen
koen at cs.chalmers.se
Wed Jul 25 10:05:27 EDT 2001
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.
More information about the Glasgow-haskell-bugs
mailing list