Is is possible to read/show an existentially typed
list?
Would it be possible if, instead of using
read/show, I defined some variant that relies on
the typeof/typeable infrastructure? Is there a
way to read in a typename for use in coercing a
read?
-Alex-
S. Alexander Jacobson [EMAIL PROTECTED] wrote in article [EMAIL PROTECTED] in
gmane.comp.lang.haskell.cafe:
Is is possible to read/show an existentially typed
list?
Would it be possible if, instead of using
read/show, I defined some variant that relies on
the typeof/typeable
hi,
i have thought about things like that, but the qualification
Type.Constructor does
not seem particularly useful. you can achieve the same by using _, e.g
data A = A_X | A_Y
data B = B_X | B_Y
alternatively (at least for non-recursilve datatypes) anonymous sums
(ala TREX's records)
could