Dear stg-hugs team, 

The standard prelude in stg hugs 991125 exports IO
as datatype

> --  Non-standard exports
>    IO(..), IOResult(..), Addr, StablePtr,

but defines it as a type  abbreviation:

> type IO a = ST RealWorld a

This means that an instanciation like

> instance Blah (IO a) where ...

is not allowed in stdhugs, and there is no obvious way to correct it
(because neither ST nor RealWorld is exported from the prelude)

The Haskell 98 report clearly says that IO is a datatype (in section 6.1.7 and
the subject index) and can be a class instance. Ghc, hbc, and the old hugs
seem to support this view. 

What is the reason for the deviation?
Is stghugs supposed to be compatible with ghc on the library level?
I cannot imagine how hugs can be compatible with ghc objects if the library
constants have different categories.

I do not know if it is related, but hugs also gets confused when it reads an
ghc interface file containing 

> instance {PrelBase.Eq Hash} = zdfEqHash;

probably because there is no such thing as PrelBase in its own library.

Regards,

Ilya Beylin                               email:  [EMAIL PROTECTED]
 Department of Computing Sciences,         http://www.cs.chalmers.se/~ilya/
 Chalmers University of Technology,       phone: +46-31-772-1079
 SE-41296 Gothenburg, Sweden                fax: +46-31-165655


Reply via email to