Hi all,

I am playing with the Socket module in ghc-4.00 and getting weird type
errors. It is quite possible that it is my fault, but I cannot think of
any way to find out.

The problem occurs when I try to initialize some PortID value. With
this line, everything is fine and I get a server running and responding
to my connection attempts:

>  portID = Service "webcache"

However, when I use a plain number instead of a service name, ghc
refuses to compile:

>  portID = PortNumber 8671

yields:

>  Main.hs:10:
>      No instance for `Num SocketPrim.PortNumber'
>          arising from the literal `8671' at Main.hs:10

I use ghc-4.00 patchlevel 0 on a linux PC (Debian, 2.0.33 Kernel)
(although I doubt this is very helpful). Maybe I mix up different ghc
versions in the libraries, the compiler and the interface files?


thanks a lot,
  -Matthias




   (sorry again for the bounces a couple of days ago. it won't happen
                           again this time.)

--
Max-Planck-Institut f�r Informatik  |  Deutsches Forschungszentrum f�r KI
[EMAIL PROTECTED]                   |                    [EMAIL PROTECTED]
http://www.mpi-sb.mpg.de/~fis       |

Reply via email to