
26 Oct
2005
26 Oct
'05
5:22 p.m.
On 26 Oct 2005 10:11:25 -0400, kahl@cas.mcmaster.ca
Tomasz Zielonka
wrote Wed, 26 Oct 2005 13:37:29 +0200: Speaking about casts, I was playing with using GADTs to create a non-extensible version of Data.Typeable and Data.Dynamic. I wonder if it's possible to write such a thing without GADTs (and unsafeCoerce, which is used in Data.Dynamic, IIRC).
It is possible to get even closer to Typeable by using the same interface --- which is sufficient for some applications.
Hmmm... but you use unsafeCoerce, don't you? ;-) I might have been unclear about it - I didn't want to use unsafeCoerce. With unsafeCoerce you can easily implement Typeable/Dynamic without GADTs, don't you? Best regards Tomasz