Re: Database interface - would like advice on oracle library binding

2003-09-23 Thread oleg
> 1. Is the left-fold the best/only interface to expose? I think yes, but that > doesn't allow fine-grained control over cursors i.e. being able to open many > cursors at once and interleave fetches from them. Or does it? I'd like to remark first that many real databases let us avoid opening many

Database interface - would like advice on oracle library binding

2003-09-23 Thread Tom Pledger
Bayley, Alistair writes: : | Still making slow progress on an Oracle database binding... now I'm trying | to fit the API I have into some sort of abstract interface (like the one(s) | discussed previously: | http://haskell.org/pipermail/haskell-cafe/2003-August/004957.html ). | | | 1. Is

Database interface - would like advice on oracle library binding

2003-09-23 Thread Bayley, Alistair
(2nd attempt; mailman thinks I'm not a list member, but it still keeps sending me mail.) Still making slow progress on an Oracle database binding... now I'm trying to fit the API I have into some sort of abstract interface (like the one(s) discussed previously: http://haskell.org/pipermail/haskel

Re: Generating "setMember" functions for record structures

2003-09-23 Thread Christian Maeder
setFoo:: State -> [Int] -> State setFoo st x= State { foo = x , bar = bar st } setBar:: State -> [String] -> State setBar st x= State { foo = foo st , bar = x } It should be sufficient

Re: Generating "setMember" functions for record structures

2003-09-23 Thread Malcolm Wallace
Peter Simons <[EMAIL PROTECTED]> writes: > > setFoo:: State -> [Int] -> State > > setFoo st x= State { foo = x > >, bar = bar st > >} There is an easier way to do this, using the record update syntax rather than record construction synt

Generating "setMember" functions for record structures

2003-09-23 Thread Peter Simons
Hi, in one of my programs, I have to modify individual fields of a pretty large record structure quite frequently. Assume the structure is: > data State = State { foo :: [Int] >, bar :: [String] >} Then I'd like to have functions setFoo and set

Re: garbage collection and Ptr/ForeignPtr/StablePtr

2003-09-23 Thread Alastair Reid
On Monday 22 September 2003 12:10 pm, Bayley, Alistair wrote: > Should I expect that Ptr memory allocated with malloc is garbage collected > when no longer used by the Haskell runtime? The FFI spec doesn't say so > explicitly (that I could see); C programs use pointers in many ways: pointers to s