Re: [Haskell-cafe] Design suggestion for Data.Binary.Defer

2008-06-19 Thread Neil Mitchell
Hi Actually, you ought to be able to pretty easily remove this tradeoff by introducing a strict read function as a new method in your class. So anyone who wants to strictly read lazy data can use that function instead of the lazy one. Not quite, the library is written so that strict fields

Re: [Haskell-cafe] Design suggestion for Data.Binary.Defer

2008-06-17 Thread David Roundy
On Tue, Jun 17, 2008 at 07:55:51AM +0100, Neil Mitchell wrote: Hi, Hello! David: Is there any reason not to just write all lazy fields of variable size in a deferred manner? I completely hadn't though of this! You will loose a bit of time, for example reading fields which were

Re: [Haskell-cafe] Design suggestion for Data.Binary.Defer

2008-06-17 Thread Nicolas Pouillard
Excerpts from David Roundy's message of Tue Jun 17 20:27:01 +0200 2008: On Tue, Jun 17, 2008 at 07:55:51AM +0100, Neil Mitchell wrote: Hi, Hello! Hello, :( Lazy reading seems to require strict writing, while lazy writing requires strict reading! I'm wondering if it would be an option to

[Haskell-cafe] Design suggestion for Data.Binary.Defer

2008-06-16 Thread Neil Mitchell
Hi, I'm in the process of updating the Deferred Binary library, http://www-users.cs.york.ac.uk/~ndm/binarydefer/. The idea is that its does serialisation, but certain elements can be marked as deferred - instead of being written in the current file stream, they are merely pointed at and if

Re: [Haskell-cafe] Design suggestion for Data.Binary.Defer

2008-06-16 Thread Derek Elkins
On Mon, 2008-06-16 at 17:43 +0100, Neil Mitchell wrote: Hi, I'm in the process of updating the Deferred Binary library, http://www-users.cs.york.ac.uk/~ndm/binarydefer/. The idea is that its does serialisation, but certain elements can be marked as deferred - instead of being written in the

Re: [Haskell-cafe] Design suggestion for Data.Binary.Defer

2008-06-16 Thread David Roundy
On Mon, Jun 16, 2008 at 9:43 AM, Neil Mitchell [EMAIL PROTECTED] wrote: == The Question == Is there a simple way of tagging fields in a constructor as deferred, just once for reading and writing, and ideally outside the instance definition and not requiring additional code to unwrap? I can't