Homework 0 - Getting Started
This homework is designed to make sure that you can configure the tools that you need to do the rest of the assignments in the class. If you have any trouble with the steps of this assignment, post to Piazza.
Install GHC 8.6.4 and cabal 2.4.0 or better on your machine. We recommend downloading these via the Haskell Platform.
Make sure you have HUnit libraries available. Install Haskell libraries with the command line tool
cabal
.cabal install hunit
Follow our directions for installing git.
Download the code for the first lecture. You can make a git repository for this assignment yourself, but it is not necessary.
Complete the missing parts at the end of the file, compile, and run. You should be able to load the file directly into ghci. To make an executable, use the command:
ghc -o Lec1 --make -main-is Lec1 Lec1.lhs
Make sure you have hlint tool available. You should install Haskell-based tools with the command line tool
cabal
.cabal install hlint
Run
hlint
on your source file. This checker automatically looks for (some, but not all) style mistakes and gives you suggestions for how to improve your code. It will have a few suggestions forLec1.lhs
; but note that these are intentional!hlint Lec1.lhs
Submit your homework online.