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.0.1 and cabal or better on your machine. If you don't have these installed already, we suggest The Haskell Platform, January 2017 release to make installation more convenient. See also the resources page for more information.
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.