RE: Transmitting Haskell values

2003-11-06 Thread Simon Marlow
I've done some hacking on Haddock to address some of these issues. Please take a look at http://www.haskell.org/~simonmar/haddock-test/libraries/ which is the library documentation as it will look in the next GHC release. Note that there is a single contents page listing all the modules

Re: Transmitting Haskell values

2003-11-04 Thread Sven Panne
Simon Marlow wrote: Generating a single unified index is entirely possible, given all the .haddock files for the relevant packages. I'll try to get this into the next version of Haddock. But only as an option and/or addition, I hope... 2. Remove the split between type/class index and

Re: Transmitting Haskell values

2003-10-29 Thread Glynn Clements
Peter Simons wrote: Joachim Durchholz writes: What sent me first into deep confusion is that I found all of {Text,GHC}.{Read,Show} first, and the Read classes marked as nonportable GHC extensions. Then you will surely love the Foreign.* hierarchy, most notably Foreign.Storable.

Re: Transmitting Haskell values

2003-10-29 Thread ketil+haskell
Hal Daume III [EMAIL PROTECTED] writes: What sent me first into deep confusion is that I found all of {Text,GHC}.{Read,Show} first, and the Read classes marked as nonportable GHC extensions. Quite disheartening :-( Well, then I found the Prelude definition (though it's entirely unclear how

RE: Transmitting Haskell values

2003-10-29 Thread Simon Peyton-Jones
| The GHC versions are simply more efficient versions. Show and Read are | completely portable. | | AIIEE! Now they tell me -- I've optimized one of my programs, and it | now spends most of it's time 'read'ing. So the thing is just to | import GHC(read) instead of using the Prelude version?

Re: Marshalling functions was: Transmitting Haskell values

2003-10-29 Thread Alastair Reid
Is [marshaling functions] something absolutely impossible in Haskell and by what reason? Just because of strong typing (forgive my stupidity ;)? Or are there some deeper theoretical limitations? The big theoretical issue is whether it would provide an Eq or Show instance for - by the

Re: Marshalling functions was: Transmitting Haskell values

2003-10-29 Thread Joachim Durchholz
Alastair Reid wrote: Is [marshaling functions] something absolutely impossible in Haskell and by what reason? Just because of strong typing (forgive my stupidity ;)? Or are there some deeper theoretical limitations? The big theoretical issue is whether it would provide an Eq or Show instance

Re: Transmitting Haskell values

2003-10-29 Thread Joachim Durchholz
Glynn Clements wrote: The problem with Storable is that the representation is architecture-specific. It isn't suitable for implementing a commodity protocol which can be used for communication between different architectures. Just endianness issues, or are there deeper differences? If it's just

Re: Marshalling functions was: Transmitting Haskell values

2003-10-29 Thread C.Reinke
Is [marshaling functions] something absolutely impossible in Haskell and by what reason? Just because of strong typing (forgive my stupidity ;)? Or are there some deeper theoretical limitations? If you're interested in some recent work here, have a look at Clean (similar enough to

Re: Transmitting Haskell values

2003-10-29 Thread Glynn Clements
Joachim Durchholz wrote: The problem with Storable is that the representation is architecture-specific. It isn't suitable for implementing a commodity protocol which can be used for communication between different architectures. Just endianness issues, or are there deeper differences?

Re: Transmitting Haskell values

2003-10-28 Thread Joachim Durchholz
Hal Daume III wrote: I think the standard way would be to use Show and Read and then send/write/rcv/read strings from the network/disk. What sent me first into deep confusion is that I found all of {Text,GHC}.{Read,Show} first, and the Read classes marked as nonportable GHC extensions. Quite

Re: Transmitting Haskell values

2003-10-28 Thread Hal Daume III
Hi, What sent me first into deep confusion is that I found all of {Text,GHC}.{Read,Show} first, and the Read classes marked as nonportable GHC extensions. Quite disheartening :-( Well, then I found the Prelude definition (though it's entirely unclear how they relate to the Text and GHC

Re: Transmitting Haskell values

2003-10-28 Thread Peter Simons
Joachim Durchholz writes: What sent me first into deep confusion is that I found all of {Text,GHC}.{Read,Show} first, and the Read classes marked as nonportable GHC extensions. Then you will surely love the Foreign.* hierarchy, most notably Foreign.Storable. If you want to do binary I/O

Re: Transmitting Haskell values

2003-10-28 Thread Ben Escoto
On Tue, 28 Oct 2003 17:09:36 +0100 Joachim Durchholz [EMAIL PROTECTED] wrote: In all, I'm finding it rather difficult to find my way in the documentation (just as a data point for the documentation folks). To make the critique helpful instead of just a critique, here are a few ideas of what

Marshalling functions was: Transmitting Haskell values

2003-10-28 Thread Dimitry Golubovsky
Hi, Hal Daume III wrote: Hmm... I can write out functions using the Show (a - b) instance, but there's no matching Read (a - b). Show (a - b) is a bogus instances -- you won't actually be able to use it for marshalling functions. Well, marshalling functions (or storing-restoring some internal

Re: Marshalling functions was: Transmitting Haskell values

2003-10-28 Thread Hal Daume III
No, it's possible -- it's done under the hood in GPH (parallel Haskell); it just doesn't exist in normal GHC... On Tue, 28 Oct 2003, Dimitry Golubovsky wrote: Hi, Hal Daume III wrote: Hmm... I can write out functions using the Show (a - b) instance, but there's no matching Read (a - b).

Transmitting Haskell values

2003-10-26 Thread Joachim Durchholz
Hi all, sorry if it's a FAQ or I'm simply too dumb to look in the right places. What I want to do is to send Haskell values over a network to another Haskell process. Or save a Haskell value on disk and read it in in a later incarnation of the same pogram, or with a different program. Is

Re: Transmitting Haskell values

2003-10-26 Thread Hal Daume III
I think the standard way would be to use Show and Read and then send/write/rcv/read strings from the network/disk. Or you could use the Binary class to get binary representations, but these (sometimes, depending on which implementation you use) have endianness issues if you're transmitting