/cis-194-summer-2018

A modified version of the University of Pennsylvania's CIS194

Primary LanguageHaskellMIT LicenseMIT

CIS194: Summer 2018

A slightly modified version of UPenn's CIS 194 course, with tests!

Contributors

This test suite and lesson plan has been built out over the years with help from (but not limited to): acruikshank, aztecrex, clkunzang, coopernurse, finalfantasia, jxv, laser, lexi-lambda, markw, michaelavila, and will-wow.

Schedule

Week Lecture Assignment Due Due Presenter
1 Introduction to Haskell cc numbers, hanoi 7/17 Prakash presents on 7/10
2 Algebraic Data Types log parsing 7/31 Prakash presents on 7/17
3 Recursion patterns, polymorphism, and the Prelude code golf 8/14
4 Parametric Polymorphism BST, recursion 8/28
5 More polymorphism and type classes calculator 9/10 Erin presents on 8/28
6 Lazy evaluation streams 9/24 Erin presents on 9/10
7 Monoids monoids ...
8 Functors Applicative functors (part 1) parsers, part one ...
9 Applicative functors (part 2) parsers, part two ...
10 Property-based Testing w/QuickCheck testing ...
11 Monads risk ...
12 Lenses lenses ...

Member Presentations

Some presentations relevant to the course from years gone past:

Getting Started

Install Stack

This project uses Stack to build and test the assignments. To install it, follow the steps here.

Or, use Homebrew:

brew install haskell-stack

Clone the Repo (Don't Fork!!)

15:07 $ git clone git@github.com:laser/cis-194-summer-2018.git
Cloning into 'cis-194-summer-2018'...
remote: Counting objects: 350, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 350 (delta 13), reused 10 (delta 10), pack-reused 331
Receiving objects: 100% (350/350), 9.41 MiB | 2.93 MiB/s, done.
Resolving deltas: 100% (134/134), done.
Checking connectivity... done.

Create a Branch

Create a new branch off of master whose name is the same as your GitHub username. Then, push the branch to the remote (GitHub) repository. If you don't have permission to push to this repository, let me know and I'll grant them.

15:07 $ cd cis-194-summer-2018/

15:09 $ git checkout -b laser
Switched to a new branch 'laser'

15:09 $ git push origin laser
Total 0 (delta 0), reused 0 (delta 0)
To git@github.com:laser/cis-194-summer-2018.git
 * [new branch]      laser -> laser

Initialize Stack

We use Stack to build our project. After cloning the repository, run stack setup.

Running the Tests

Assignments are tested with Hspec and QuickCheck. The full test suite can be run by running the stack test command.

To run a single test:

15:10 $ stack build && stack runghc test/Homework/Week01Spec.hs

To rebuild and run the tests each time one of the project's files change:

15:13 $ stack test --file-watch

To rebuild the project and re-run a single test when a file changes, look into something like entr.

Useful Links