Re: Reading/Writing Binary Data in Haskell

2003-07-08 Thread Glynn Clements
Gordon James Miller wrote: > 1 - Is there yet a standard, or at least commonly supported by hugs and > ghc, method for dealing with binary data. > > 2 - If not, is there a "standard" library that is used to manipulate > binary data. I've seen some references to some implementations but > giv

Re: Reading/Writing Binary Data in Haskell

2003-07-09 Thread Wolfgang Jeltsch
On Wednesday, 2003-07-09, 05:31, Glynn Clements wrote: > [...] > There isn't a standard mechanism for binary I/O. NHC98 contains the York Binary library. Can someone tell me if this is available for other Haskell systems? And didn't GHC also provide binary I/O? > However, a simple and fairly ge

Re: Reading/Writing Binary Data in Haskell

2003-07-09 Thread Christian Maeder
There isn't a standard mechanism for binary I/O. NHC98 contains the York Binary library. Can someone tell me if this is available for other Haskell systems? And didn't GHC also provide binary I/O? How does the GHC itself read/write binary data, since the interface files (*.hi) produced by GHC a

Re: Reading/Writing Binary Data in Haskell

2003-07-09 Thread Johannes Waldmann
> > And didn't GHC also provide binary I/O? http://www.haskell.org/ghc/docs/latest/html/base/Data.Array.IO.html#4 -- -- Johannes Waldmann http://www.informatik.uni-leipzig.de/~joe/ -- -- [EMAIL PROTECTED] -- phone/fax (+49) 341 9732 204/209 -- __

RE: Reading/Writing Binary Data in Haskell

2003-07-09 Thread Simon Peyton-Jones
ll Mailing List | Subject: Re: Reading/Writing Binary Data in Haskell | | On Wednesday, 2003-07-09, 05:31, Glynn Clements wrote: | > [...] | | > There isn't a standard mechanism for binary I/O. | | NHC98 contains the York Binary library. Can someone tell me if this is | available for

Re: Reading/Writing Binary Data in Haskell

2003-07-09 Thread Glynn Clements
Wolfgang Jeltsch wrote: > > However, a simple and fairly generic mechanism for doing this is: > > > > 1. Read in a list of "Char"s with the standard I/O functions. > > This will most likely cause problems under Windows. The reason is that the > standard I/O functions are intended for reading an

RE: Reading/Writing Binary Data in Haskell

2003-07-09 Thread Hal Daume
isi.edu/~hdaume > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Christian Maeder > Sent: Wednesday, July 09, 2003 1:34 AM > To: The Haskell Mailing List > Subject: Re: Reading/Writing Binary Data in Haskell > > > >>

Re: Reading/Writing Binary Data in Haskell

2003-07-09 Thread Wolfgang Jeltsch
On Wednesday, 2003-07-09, 15:16, CEST, Glynn Clements wrote: > [...] > Both GHC and Hugs provide openFileEx, which allows files to be read in > binary mode (without EOL/EOF translations). So we have portable binary I/O, don't we? By the way, does one still read characters rather than bytes even

Re: Reading/Writing Binary Data in Haskell

2003-07-09 Thread Glynn Clements
Wolfgang Jeltsch wrote: > > Both GHC and Hugs provide openFileEx, which allows files to be read in > > binary mode (without EOL/EOF translations). > > So we have portable binary I/O, don't we? > > By the way, does one still read characters rather than bytes even if using > openFileEx? openFil

Re: Reading/Writing Binary Data in Haskell

2003-07-12 Thread Martin Sjögren
tor 2003-07-10 klockan 04.56 skrev Glynn Clements: > OTOH, existing implementations (at least GHC and Hugs) currently read > and write "8-bit binary", i.e. characters 0-255 get read and written > "as-is" and anything else breaks, and changing that would probably > break a fair amount of existing co

Re: Reading/Writing Binary Data in Haskell

2003-07-15 Thread Axel Simon
On Thu, Jul 10, 2003 at 09:28:38AM +0200, Martin Sjgren wrote: > tor 2003-07-10 klockan 04.56 skrev Glynn Clements: > > OTOH, existing implementations (at least GHC and Hugs) currently read > > and write "8-bit binary", i.e. characters 0-255 get read and written > > "as-is" and anything else breaks

Unicode + Re: Reading/Writing Binary Data in Haskell

2003-07-14 Thread George Russell
Martin quoted Glynn: > OTOH, existing implementations (at least GHC and Hugs) currently read > and write "8-bit binary", i.e. characters 0-255 get read and written > "as-is" and anything else breaks, and changing that would probably > break a fair amount of existing code. The binary library I poste

Re: Unicode + Re: Reading/Writing Binary Data in Haskell

2003-07-14 Thread Glynn Clements
George Russell wrote: > > OTOH, existing implementations (at least GHC and Hugs) currently read > > and write "8-bit binary", i.e. characters 0-255 get read and written > > "as-is" and anything else breaks, and changing that would probably > > break a fair amount of existing code. > > The bi

Re: Unicode + Re: Reading/Writing Binary Data in Haskell

2003-07-14 Thread George Russell
Glynn wrote (about my binary library, snipped): > This is similar to UTF-8; however, UTF-8 is a standard format which > can be read and written by a variety of other programs. > > If we want a mechanism for encoding arbitrary Haskell strings as octet > lists, and we have a free choice as to the enc