Machine Problem 1


This machine problem is in 2 parts. In part 1, we give you a number of polymorphic type declarations, and you'll provide working definitions. In part 2, you'll implement a number of different functions of varying complexity, given their specifications.

The full writeup for this machine problem (i.e., containing a detailed description of the constituent exercises, among other things) is found in the "" file of the lab starter code repository, which you will clone in the next step. For future machine problems we will not provide a separate writeup on the class website, as the initial steps for cloning the repository and signing the "package.yaml" file are the same for all machine problems.

Cloning the starter code repository

Each machine problem will require you to obtain and work in a separate, private Git repository containing the starter code.

You will claim your private repository using a GitHub invitation link. The invitation link for a given machine problem is found next to its name in "Repo Invite" column of the machine problems listing on the class website.

After following the link, you'll be prompted to create an account on GitHub (or sign in to an existing one --- your personal account is fine) and pick your IIT username from a list to use for accepting the assignment. GitHub will then clone the starter code into a private repository and take you to a URL that looks something like (where USER is your own GitHub username). This is your repository's homepage on GitHub. You can visit this page to see the status of your work as reflected on GitHub.

Next, you should clone this repository on the computer where you'll be doing your work. You can do this using whichever Git client you prefer (e.g., the terminal or a GUI client like GitHub Desktop). The URL for cloning is found on the repository's homepage on GitHub, under the green "Code" button.

Signing the "package.yaml" file

After cloning your repository, take a moment to sign the "package.yaml" file found in the repository root. Edit the values in the "author" and "maintainer" lines, replacing them with your own name and email address, in so doing also signing the honor pledge. You must do this for every machine problem!

Go ahead and commit and push your changes to GitHub. Refreshing your repository's homepage on GitHub should allow you to verify that the changes were pushed successfully --- look for "package.yaml" in the list of files, and check that the commit message and timestamp are up-to-date. You can also verify that the file was signed by clicking on it to view its contents.

The above is the same procedure you'll use for turning in your work. I.e., you will commit and push your changes to the source file(s) you modify --- for this machine problem, you should only modify the "src/MP1.hs" file. We will pull your changes from GitHub for evaluation.

Head on over to the writeup!

That's it for the setup. Head on over to the writeup for this machine problem, which you can find in the "" file of the starter code repository you just cloned. The writeup contains a detailed description of the constituent exercises, instructions for how to run the test suite, and information on the score breakdown.