[Haskell-cafe] Re: Global Variables and IO initializers
ger at informatik.uni-bremen.de
Mon Nov 29 07:50:16 EST 2004
Benjamin wrote (snipped):
> Typeable would be completely safe if the only way to declare instances
> would be to derive them, but this is only practical if it can be done
> from anywhere outside the data type definition.
Unfortunately this would also outlaw some legitimate uses of Typeable.
In particular, I think you can only derive Typeable for a type
constructor of type (*). GHC has recently added Typeable1,Typeable2,...
which are classes of type constructors of kind *->*, *->*->* and so on, up
to 6 arguments I think, and these can be derived, which is a great help.
But there are still kinds this does not include; for example (*->*)->*,
which is an example of a type constructor I actually used where I wanted
an instance of Typeable.
More information about the Haskell-Cafe