This assignment is a relatively simple program to capture various aspects of programming languages. This version is in Haskell. You may use any modules that are in the default Haskell library.

The easiest way to install Haskell is with GHCup. If you're on windows, click on the "Show all platforms" link under the copyable block. Use the recommended Haskel version (8.10.7 - NOT version 9, because it will use a different library from the one in your Fossil directory. If you have the wrong version installed, run

ghcup tui
uninstall the wrong version and install the correct version. If the tui option isn't available, say
ghcup install ghc 8.10.7 --set
If you have a previous version of ghc installed elsewhere on your computer, either remove it, or put the ghcup one eralier in your PATH.).

The application is a simple Orbits calculation, described here. In addition to the specifications there, the following Haskell-specific parameters will apply:

  1. Do your work in the A3/src directory.
  2. At the time the fossils were initially loaded, the testcase hadn't been written for Haskell. You should download these two files and make the following edits:
    • A3.cabal which should replace the file by the same name in the A3 directory
    • TestSuite.hs which should go into the A3/src directory
    Then saying:
    cabal test
    should run the tests. Feel free to add more tests to that file. Do not change that module, other than to add tests to the list of tests.
  3. Your src/MyLib module must have a process function that accepts a string and returns a string. You should not touch the main function (which reads from stdin and writes to stdout).
  4. Most evaluation will be based on unit tests, including those provided.
  5. Your unit tests should be implemented with HUnit (cabal install HUnit). The collection of tests should be named tests so they can all be evaluated with runTestTT tests from a cabal test.
  6. Put your ownership information (see the assignment page) in the A3/Ownership.txt file.
  7. The marker should be able to run your program by entering the following code:
    $ cabal test
    or
    $ cabal run A3 <../sample-input
    To make both work, the MyLib.hs file should have a module line like:
    module MyLib (main,process) where
    but you may want to export more things to support your unit testing.

You should do your assignment in the your Fossil CPS506 repository in the folder called A3. 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"