haskell-distributed / haskell-distributed/distributed-process

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

Open
#447 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

website
Dominant language
Haskell
Stars
751
Forks
99
Avg merge
45m
Merged PRs (30d)
2

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the ch1 example and inspect the createTransport call at line 17 alongside the network-transport-tcp and distributed-process versions. Reproduce the compilation failure with the recent dependencies, then update the example or version guidance so the example compiles successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
haskell
Domain
distributed-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.