FP Complete Haskell

The strong, lazy type

1 Download Haskell Stack

Chosen operating system: Windows

Download and run the installer:

Windows 64-bit installer

With the Haskell Stack you get a comprehensive development environment for Haskell:

  • Stack: A project builder for multi-package Haskell projects.
  • GHC: A compiler and interpreter for Haskell programs.
  • Haddock: A documentation generator for Haskell packages.
  • Stackage: A curated repository of thousands of packages installed on demand.

2 Running Haskell programs

To quickly run a Haskell script:

  1. Copy the following content into a file called HelloWorld.hs

    #!/usr/bin/env stack
    -- stack --resolver lts-13.7 script
    
    main :: IO ()
    main = putStrLn "Hello World"
              
  2. Open up a terminal and run stack HelloWorld.hs.

Done!

Start on a proper Haskell package. Run the following in your terminal:

        $ stack new new-project rio
        $ cd new-project
        $ stack run
      

3 Next steps

Congratulations, you're setup to start writing Haskell code! We've broken down next steps into a few common workflows with Stack. If you're not sure where to start, we recommend reading them in order.