Skip to content

createTransport in ch1 is broken with recent network-transport-tcp-0.6.0 #447

Open
@aleksandr-vin

Description

@aleksandr-vin

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
   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions