[EMAIL PROTECTED] reports the following problem.
Version: 1.3b and 1.3c [March 1998]
OS: Linux
compiler: gcc
configuration:
Expected behaviour:
To have ST s in the Functor class
Reference: http://www.dcs.gla.ac.uk/mail-www/glasgow-haskell-bugs/msg01013.html
http://www.dcs.gla.ac.uk/mail-www/glasgow-haskell-bugs/msg01014.html
Observed behaviour:
hugs 1.3b complains
ERROR "STtest.hs" (line 2): ST a is not an instance of class "Functor"
hugs 1.3c [March 1998] complains
ERROR "STtest.hs" (line 2): Cannot justify constraints in application ...
Transcript:
The program below fails, but by uncommenting the instance
declaration solves it. In Hugs 1.4 it works and in the joint
ghc/Hugs extension library it is included. (This is a ghc
bug as well but that is already reported.)
Code:
import ST
main = print (runST (map id (return True)))
--instance Functor (ST s) where
-- map f mx = mx >>= \x -> return (f x)