O'Reilly logo

Haskell Cookbook by Yogesh Sajanikar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

How to do it...

  1. Create a new project called working-with-cloud-haskell with the simple stack template:
        stack new working-with-cloud-haskell simple
  1. Add a dependency on the distributed-process library in the build-depends sub-section of executable section. Also add support libraries and the -threaded option to ghc-options:
        executable working-with-cloud-haskell
          hs-source-dirs:      src
          main-is:             Main.hs
          ghc-options:         -threaded
          default-language:    Haskell2010
          build-depends:       base >= 4.7 && < 5
                             , binary
                             , distributed-process
                             , network-transport
                             , network-transport-tcp

At the time of writing this recipe, the Cloud Haskell libraries are not part of LTS stack. Hence we need to add more dependencies to stack.yaml in the extra-deps section. Note that the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required