Re: Network problem with ghc on WinXP

2004-01-28 Thread Sigbjorn Finne
Hi there, looks like a network byte-order vs host byte-order gotcha. Never use the PortNum constructor, but declare 'portnum' to have type PortNumber and simply drop the use of PortNum in your code alltogether. Alternatively, use intToPortNumber to translate between Int and PortNumber. hth --sigb

Network problem with ghc on WinXP

2004-01-28 Thread robin abraham
Hi, I have ghc-6.0.1 on WinXP and Solaris. I have a simple echo server (server.hs given below) and client (client.hs given below) and I encounter the following: 1) server.hs compiled and running on Solaris: a) client.hs (Solaris) can connect. b) client.hs (WinXP) cannot connect. c) tel

Re: Problem with ghc on Windows ME

2004-01-28 Thread Claus Reinke
>| For system, I do need doublequotes in arguments (e.g., when passing >| complex option flags to the programs invoked, or when the arguments >| contain strings). Can that really always be avoided for rawSystem? >Perhaps the comment is misleading. You can indeed put quotes in >arguments (they get

RE: Generics...(ish)

2004-01-28 Thread MR K P SCHUPKE
I have read the "Scrap Your Boilerplate: A Practical Design Pattern for Generic Programming" and have worked out how to do it. This seems much better than using Template Haskell for this kind of problem. I used mkQ and extQ to convert from various types that are allowed in the record structure, t

RE: linking problems after switching from GHC5 to GHC6

2004-01-28 Thread Volker Wysk
> > I can't link with a library any longer, after switching from ghc5 to > > ghc6.2. I've recompiled the library with the new compiler version, so > > that's not the problem. > > [snip] > > > ghc -o build/test0 build/test0.o -odir build > > `src/lib/hsunix-config --local --libs` > > build/test0.o(

RE: linking problems after switching from GHC5 to GHC6

2004-01-28 Thread Simon Marlow
> I can't link with a library any longer, after switching from ghc5 to > ghc6.2. I've recompiled the library with the new compiler version, so > that's not the problem. [snip] > ghc -o build/test0 build/test0.o -odir build > `src/lib/hsunix-config --local --libs` > build/test0.o(.text+0x25): I

RE: Generics...(ish)

2004-01-28 Thread Simon Peyton-Jones
Try the new stuff (in GHC6.2) in the Data.Generics library. In particular the class Data, and its related types Constr and DataType http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data.Generics .Basics.html Ralf and I are writing a paper about the extensions you'll find there,

RE: Problem with ghc on Windows ME

2004-01-28 Thread Simon Peyton-Jones
| For system, I do need doublequotes in arguments (e.g., when passing | complex option flags to the programs invoked, or when the arguments | contain strings). Can that really always be avoided for rawSystem? Perhaps the comment is misleading. You can indeed put quotes in arguments (they get esc

Re: Problem with ghc on Windows ME

2004-01-28 Thread Claus Reinke
>rawSystem :: FilePath -> [String] -> IO ExitCode > >Question: how do you get the string \" into an argument? Turns out that >the argument "\\"" does not do the job. (This turns into a single \.) >Puzzling but probably not important in practice. This comment is puzzling me: I tend to use System.

RE: Problem with ghc on Windows ME

2004-01-28 Thread Simon Peyton-Jones
> *** Literate pre-processor C:\GHC\GHC-6.2\unlit.exe -h Demo.lhs Demo.lhs > C:\WINDOWS\TEMP\ghc-1160737.lpp > > Failed: C:\GHC\GHC-6.2\unlit.exe -h Demo.lhs Demo.lhs > C:\WINDOWS\TEMP\ghc-1160737.lpprawSystem: does not exist (No such file or > directory) *** Deleting temp files Deleting: C:/WINDO

RE: "Talking" with the compiler

2004-01-28 Thread Simon Peyton-Jones
| Yes, the HEP was one attempt to define the interface. There was a | "HEP-lite" implementation at one point, I believe, but it was never | fully adopted. But in effect, GHCi-as-a-library amounts to a HEP expressed as a Haskell library rather than a COM object. So we're getting there. S ___