> The same thing happened to me when I tried to test Dynamic.lhs distributed
> with Hugs98.  The library module seems to have been imported from the GHC
> distribution, so it worked only after moving the sub-expressions to the
> top level.

> Dynamic.lhs distributed with GHC and Hugs98 utilizes unsafePerformIO
> in generating unique numbers, but it also assumes that the representation
> of each type constructor is generated at most once.
> This property is ensured by a particular optimization phase of GHC.

*sigh*. This is a wart from the GHC implementation. I did not realize
that its also in Hugs. STG Hugs also has the problem.

I'll fix the TyCon Eq for the next Hugs release.

Haskell needs a real reflection interface. This could be used for
implementing several things, including a debugger and a better Dynamic.
The reflection module could have a

getType :: a -> TypeRep

and the unique for quick compares could be hidden behind the reflection
interface.

Simon M; do you want to work together on a reflection API? I could
use it for observe.

Andy

Reply via email to