14 Mar
2001
14 Mar
'01
3:36 a.m.
Would it be appropriate for Haskell to be able to remember contexts in existential types? For instance, currently this does not work in Hugs: -- class Charable a where obtainChar :: a -> Char instance Charable Char where obtainChar c = c data AnyCharable = forall c. (Charable c) => MkAnyCharable c anyA = MkAnyCharable 'a' recoverA = obtainChar ((\(MkAnyCharable c) -> c) anyA) -- I believe allowing it to work would not amount to storing dynamic type information. Is this an overlooked hole or would it break the spirit of the language? -- Ashley Yakeley, Seattle WA