GithubHelp home page GithubHelp logo

simple-haskell-vm's Introduction

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

simple-haskell-vm's People

Contributors

plesekz avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.