On this page
rocket_launch
00 Intro
Functional programming is a programming paradigm where programs are constructed by applying and composing functions.
Setup
Setting up the development environment for the module.
- Install GHCup (https://www.haskell.org/ghcup/install/)
- Follow the instructions and answer the questions to finish setup
- Install Visual Studio Code
- Install the Haskell Extension Pack
Haskell
The Glasgow Haskell Compiler (GHC) has an interactive command-line interface called GHCi. This REPL can be used to test code and functions in addition to showing useful debug information.
A list of useful GHCi commands:
ghci <filename> # start GHCi and load contents of <filename> into runtime (optional).
ghci> :r # reload file(s) provided on session start
ghci> :set # list options which are currently set
ghci> :set +<option> # enable <option> (e.g. :set +t prints type after each evaluation)
ghci> :t <expression> # print type of <expression>
ghci> :q # quit GHCi