[go: up one dir, main page]

Skip to content

Coursework assignment from Y2-T1 at the University Of Exeter for the 'Computer Languages and Representations' module.

License

Notifications You must be signed in to change notification settings

sentinal-x/haskell

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ECM2418 Coursework 2021

This is the template project for the ECM2418 coursework for 2021. It consists of three folders:

  • src contains templates for the three main modules: Compiler.hs, Interpreter.hs, and StackMachine.hs.
  • test contains a simple testsuite which allows you to check that your code satisfies minimum criteria.
  • app contains the main module which is invoked when the executable is executed.

In addition the project contains three configuration files:

  • package.yaml to describe project dependencies
  • stack.yaml to describe execution options

For your assignment you do only need to modify files in src and app. Do not change any other files.

The project is setup to be used with the Haskell Tool Stack which is a cross-platform program for developing Haskell projects.

How to install

Stack can be installed on most Unix-like (Un*x) operating systems, including macOS, and on Windows.

For most Un*x operating systems, the easiest way to install is to run:

curl -sSL https://get.haskellstack.org/ | sh

or

wget -qO- https://get.haskellstack.org/ | sh

On Windows, you can download and install the Windows 64-bit Installer. Note that systems with antivirus software may need stack added to the list of "trusted" applications.

For other operating systems and direct downloads, check out the install and upgrade guide.

If you already have stack installed, upgrade it to the latest version by running:

stack upgrade

Executing ghci

To execute the interpreter you can just execute

stack ghci

from within the coursework directory. This will download the correct version of ghci and execute it.

Executing testcases

To execute the testcases you can execute

stack test

This will execute all the tests from the test directory.

Executing the project

You can also build the project by executing

stack build

This will compile the project and produce an executable which executes the main method from the Main module (app/Main.hs). The executable can then be executed with

stack exec coursework-exe

About

Coursework assignment from Y2-T1 at the University Of Exeter for the 'Computer Languages and Representations' module.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published