-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Benja Fallenstein wrote: > Hi all, > > We've had a discussion on #haskell about how we can make a function > that reads in serialized values of an open data type, such as > > [...] > However, this is still kind of boring. Is there a better way? If not, > would it be a good idea to have compiler support for building this > kind of type table?
Since Show instances can overlap (e.g. (show (1::Int)) == (show (1::Integer))), we need to tag with the type. Reminds me of Typeable. Since GHC lets us derive Typeable with a guarantee of different types being distinct (at least for a single compile-and-run session...), maybe that can be leveraged somehow? (I see that was sort of mentioned in the IRC discussion) Isaac -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGcAyNHgcxvIWYTTURAlI5AKC8bdbK/oL+B3Btlox9hfP4Lga1GwCgliZu Vi+be1mSEZnsoSAm3VgNaHo= =1x5R -----END PGP SIGNATURE----- _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe