CS381 @ Oregon State University
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Assignment 3



Things to learn from file Doctest.hs

  • Creating funtion to add
  • Check condition
  • Multiple funtions
  • Math Calculation
  • Working with pair
  • Working with lists

Need help Running Haskell Code??

  • Haskell Platform – The easiest way to start using Haskell. I will assume you have this installed.

  • Hackage – The central package archive for the Haskell community. There are lots of useful libraries here. You can install them using the cabal tool, which comes with the Haskell Platform. First, run the following command to download the list of packages on Hackage.

  cabal update

Then you can install new packages by running the following command.
  cabal install [package-name]
  • How to cabal install – A longer tutorial about installing packages from Hackage, in case you run into problems.

  • Doctest – A useful tool for running examples in comments as unit tests. We’ll use this in some Homework assignments. You can install doctest using cabal install doctest, as described above.

You will probably also need to add the installation directory to your $PATH. Here are my best guesses as to where that will be:

Linux: ~/.cabal/bin
Mac: ~/Library/Haskell/bin
Windows: C:\Program Files\Haskell\bin