You can access our in-class code for CPSC 312 here. We're going to try to ensure it's also accessible via a forkable REPL that makes it easy to run the code.
If you have a local install of a Haskell compiler, clone the code and run it as you like locally. Try running files with one of ghci
(works if you have any packages the set of notes uses installed), stack ghci
, or cabal repl
.
To run on replit, for the Haskell unit:
- If you haven't already, make a replit account at https://replit.com/~. (You can use Google, Github, or Facebook integrations for your account. Github is a great choice to make connecting to repos easy.)
- Go to Steve's CPSC 312 repl and click the
fork
button. If your fork adds a number to the name, beware! So, look for, e.g.,cpsc-312-lecture-code-1
orcpsc-312-lecture-code-2
. You may need to delete old forks and rename to get the name to simplycpsc-312-lecture-code
. - Critically, to run code in the repl, click the "Shell" tab (not the Console tab) and run
cd ~/cpsc-312-lecture-code && cabal repl
(or change to thecpsc-312-lecture-code
and runcabal repl
).
If you already have the repl and don't want to fork it again to get Steve's latest code, you can try git pull
in the shell or replit's version control pane on the left to synchronize with https://github.com/steven-wolfman/cpsc-312-lecture-code/.
Coming soon!