Haskell with Visual Studio Code on Windows
Vivek Kumar, CQF
Product Manager, Risk Data & Analytics at Standard Chartered Bank
Step 1: Install Haskell Complier and Build tool stack https://docs.haskellstack.org/en/stable/README/ (There are many other popular build tool available like cabal)
Step 2: Complete stack tool installation/setup via PowerShell prompt
> stack ghci
Step 3: Install Visual Studio Code
Step 4: Install Visual Studio Code extension: Haskell
Step 5: Create a new Haskell project on the Visual Studio Code Power shell terminal
Create a new project named Project1 by typing following on Terminal
>stack new Project1
wait for command to complete
It creates a new folder Project1
Step 6: Open the folder from Visual Studio Code
Navigate to the folder Project1 & open
All these files are auto generated
The sub folder app and src are for keeping Haskell source code files
Step 7: Execute following command on Visual Studio Code PowerShell Terminal to build the code
> stack build
It might take some time
Step 8: To run this project type stack run on the Visual Studio Code PowerShell Terminal
Babson College Glavin Global Fellow | Junior Studying Finance & Entrepreneurship
1 年Thanks for providing clear directions on setting up Haskell. It really helped out.
Very nice to use Code for Haskell on Fedora/Linix too…