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
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
>| 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
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
> > 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(
> 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
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,
| 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
>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.
> *** 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
| 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
___
11 matches
Mail list logo