RE: Wanted: mmap or other fast IO

2000-02-16 Thread Sigbjorn Finne
Manuel M. T. Chakravarty [EMAIL PROTECTED] writes: Sven Panne [EMAIL PROTECTED] wrote, [ Simply can't resist... ;-) ] Simon Marlow wrote: The easiest way is to declare mmap as a foreign function using foreign import, then build a little wrapper around it. A problem will

RE: Wanted: mmap or other fast IO

2000-02-16 Thread Simon Marlow
Title: RE: Wanted: mmap or other fast IO Is there any interface to mmap(2) available? Something that behaves like an immutable array would be great. An mmap may have a signature like mmap :: Ix a, ?? b = Handle - IO (Array a b) I've no idea what types should be allowed for b

Re: Wanted: mmap or other fast IO

2000-02-16 Thread Sven Panne
[ Simply can't resist... ;-) ] Simon Marlow wrote: The easiest way is to declare mmap as a foreign function using foreign import, then build a little wrapper around it. A problem will be: What Haskell types should be used for size_t and off_t? Getting this done properly would require

Re: Wanted: mmap or other fast IO

2000-02-16 Thread Manuel M. T. Chakravarty
Sven Panne [EMAIL PROTECTED] wrote, [ Simply can't resist... ;-) ] Simon Marlow wrote: The easiest way is to declare mmap as a foreign function using foreign import, then build a little wrapper around it. A problem will be: What Haskell types should be used for size_t and off_t?

RE: Wanted: mmap or other fast IO

2000-02-16 Thread Simon Marlow
Title: RE: Wanted: mmap or other fast IO Is there any interface to mmap(2) available? Something that behaves like an immutable array would be great. An mmap may have a signature like mmap :: Ix a, ?? b = Handle - IO (Array a b) I've no idea what types should be allowed for b

Re: Wanted: mmap or other fast IO

2000-02-16 Thread Sven Panne
[ Simply can't resist... ;-) ] Simon Marlow wrote: The easiest way is to declare mmap as a foreign function using foreign import, then build a little wrapper around it. A problem will be: What Haskell types should be used for size_t and off_t? Getting this done properly would require

Re: Wanted: mmap or other fast IO

2000-02-16 Thread Fergus Henderson
On 16-Feb-2000, Simon Marlow [EMAIL PROTECTED] wrote: The easiest way is to declare mmap as a foreign function using foreign import, then build a little wrapper around it. Unfortunately you won't be able to turn the resulting memory into an array (even a ByteArray), since these are assumed

Wanted: mmap or other fast IO

2000-01-31 Thread Matthias Kilian
Hello, Is there any interface to mmap(2) available? Something that behaves like an immutable array would be great. An mmap may have a signature like mmap :: Ix a, ?? b = Handle - IO (Array a b) I've no idea what types should be allowed for b. It has to be some fixed size type, e.g. Int, but