Re: [Haskell-cafe] Serialising types with existential data constructors

2006-09-16 Thread Misha Aizatulin
Klaus Ostermann and I allude to this non-trivial extensibility problem in our GPCE 2006 paper and we started to look into ways (not in that paper) to resolve the problem in a principled way. I'm really looking forward to that! For now I'll probably use Template Haskell to register all

Re: [Haskell-cafe] Serialising types with existential data constructors

2006-09-13 Thread Einar Karttunen
On 12.09 15:28, Misha Aizatulin wrote: I've been using existentially quantified data constructors like data Box = forall a. Cxt a = Box a If you can include Typeable into the mix then serializing works. Serialize the value as name of type value. When deserializing use a Map name of type

RE: Re: [Haskell-cafe] Serialising types with existential data constructors

2006-09-13 Thread Misha Aizatulin
Einar Karttunen wrote: I've been using existentially quantified data constructors like data Box = forall a. Cxt a = Box a If you can include Typeable into the mix then serializing works. Serialize the value as name of type value. When deserializing use a Map name of type

RE: Re: [Haskell-cafe] Serialising types with existential data constructors

2006-09-13 Thread Ralf Lammel
] [mailto:haskell-cafe- [EMAIL PROTECTED] On Behalf Of Misha Aizatulin Sent: Wednesday, September 13, 2006 8:13 AM To: haskell-cafe@haskell.org Subject: RE: Re: [Haskell-cafe] Serialising types with existential data constructors Einar Karttunen wrote: I've been using existentially quantified

[Haskell-cafe] Serialising types with existential data constructors

2006-09-12 Thread Misha Aizatulin
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

Re: [Haskell-cafe] Serialising types with existential data constructors

2006-09-12 Thread Bulat Ziganshin
Hello Misha, Tuesday, September 12, 2006, 4:28:28 PM, you wrote: 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? gshow/gread provided by module

Re: [Haskell-cafe] Serialising types with existential data constructors

2006-09-12 Thread Misha Aizatulin
Bulat Ziganshin wrote: 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? gshow/gread provided by module