This assignment is a relatively simple program to capture various aspects of programming languages. This version is in Haskell.
The application is simple bidding for the game of bridge, described here. In addition to the specifications there, the following Haskell-specific parameters will apply:
-
Do your work in the
Assign3
directory. -
Your
Main
module must have awithPermutation
function that accepts a list of integers. -
Your
Main
module must have an implementation of theShow
class for your Game type that formats a game as a string. - Most evaluation will be based on unit tests, including those provided.
-
Your
Main
module may have amain
function that does a randomized shuffle of the integers 1-52 and then passes them to thewithPermutation
function and formats and prints the result. -
Your unit tests should be implemented with HUnit (
cabal install HUnit
). The collection of tests should be namedtests
so they can all be evaluated withrunTestTT tests
from aghci
shell. -
Put your ownership information (see the assignment page) in the
Assign3/Ownership.txt
file. -
The marker should be able to run your program by entering the following code:
$ ghci tests.hs
orghc -o assign3 assign3.hs ./assign3
You should do your assignment in the your Fossil CPS506
repository in a folder called Assign3
.
Every time you have completed a part of the assignment, you should commit it to the repository.
You shouldn't wait until everything is complete to do this, it's better to check in regularly.
Remember to do fossil status
, fossil ext
, and fossil ci -m "reason"
from somewhere within the repository periodically to make sure you're commiting all of your code.
Also remember to not add binary files or other files that can be generated from the source.
Fossil uses a file called .fossil-settings/ignore-glob
in the top level directory that tells it to ignore commonly created files that should be excluded.
Add to that file if you notice any undesirable files being staged for commiting to the repository (i.e. when you run fossil ext
).
You can so a fossil add .
as many times as you want, but you only have to do it once each time there are new files to be included in the repository.
In a terminal/command window simply change to the working directory and check-in, for example:
cd cps506/A3 fossil commit -m "finished code and tests for bidding"