Open
Description
Versions of the network-transport-tcp
(and distributed-process
) are needed to be specified.
For now, with recent version, example does not compile:
• Couldn't match expected type ‘IO
(Either
a0 network-transport-0.5.2:Network.Transport.Transport)’
with actual type ‘Network.Transport.TCP.TCPParameters
-> IO
(Either
GHC.IO.Exception.IOException
network-transport-0.5.2:Network.Transport.Transport)’
• Probable cause: ‘createTransport’ is applied to too few arguments
In a stmt of a 'do' block:
Right t <- createTransport "127.0.0.1" "10501" defaultTCPParameters
In the expression:
do Right t <- createTransport
"127.0.0.1" "10501" defaultTCPParameters
node <- newLocalNode t initRemoteTable
runProcess node
$ do echoPid <- spawnLocal $ forever $ do ...
say "send some messages!"
....
In an equation for ‘main’:
main
= do Right t <- createTransport
"127.0.0.1" "10501" defaultTCPParameters
node <- newLocalNode t initRemoteTable
runProcess node
$ do echoPid <- spawnLocal $ forever $ ...
....
|
17 | Right t <- createTransport "127.0.0.1" "10501" defaultTCPParameters
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^