haskell reify, was sequencing data structures

2003-08-20 Thread Bernard James POPE
Hi, Alistair writes: > This interface looks pretty similar to the interfacein Hugs The module is > hugs98/libraries/Hugs/Internals.hs: Yes. You may recall that I had something even closer to the Hugs interface previously which I called GhcInternals. I modelled that on what Hugs provides. I eve

RE: Database interface

2003-08-20 Thread Tom Pledger
Tim Docker writes: : | The list being folded over | is implied by the DB query, is accessible through the IO monad. | Hence a parameter is not required. It would really be: | | doquery :: Process -> String -> b -> (b -> IO (b,Bool)) -> IO b : | One thing that I am unsure about is whether t

Re: "let" vs. "where"

2003-08-20 Thread Hamilton Richards
At 7:42 AM +0200 8/20/03, Jan Scheffczyk wrote: Hi Andrew, let x = expensiveComputation foo in x + x I would certainly hope that expensiveComputation wasn't called twice, and even though the language doesn't guarantee it, I have already written code that assumed it. I always thought that ther

Re: sequencing data structures

2003-08-20 Thread Johan Jeuring
I want to sequence data structures in an efficient manner, to store them to files and to send them over the network. Simply deriving Show and Read is not very good, because it's space inefficient and read cannot give any output until the whole data structure is parsed. So I thought I should store

Re: sequencing data structures

2003-08-20 Thread Alastair Reid
On Wednesday 20 August 2003 9:16 am, Bernard James POPE wrote: > If you can live with supporting only one compiler then you can get a lot of > this done via the FFI. > > In buddha, my debugger for Haskell, I have to print pretty versions of > arbitrary data structures, which is in many ways simila

Re: Monads and Maybe

2003-08-20 Thread Derek Elkins
On Tue, 19 Aug 2003 14:09:16 +0100 (BST) C T McBride <[EMAIL PROTECTED]> wrote: > Hi > > > > As an example, I'll use the Maybe monad. Suppose I want to write > > > code to handle experimental data, in which there might be missing > > > values. I might then decide to represent measurements by data

Re: sequencing data structures

2003-08-20 Thread Bernard James POPE
> I want to sequence data structures in an efficient manner, to store them > to files and to send them over the network. > > Ideally, I want to be able to write an infinite data structure (at least > one containing loops). If that is not possible I want to be able to read > as lazily as possible,