hello all,

  I've been using existentially quantified data constructors like

> data Box = forall a. Cxt a => Box a

  quite successfully for a while. But now I am trying to implement the
Load/Save mechanism and getting stuck with that. It's not hard to write
a Box into a file, but how do I get it back?

  Has anyone solved the same problem before? I would be very thankful
for any suggestions!

  If Template Haskell would support finding out all instances of a given
class, I could generate a function that would map Names of types to
appropriate Box readers. In the file I would write entries like
<NameOfTypeInTheBox> : <BoxContents>

  But sadly, TH doesn't allow that yet.

Cheers,
  Misha
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to