Skip to content
This repository has been archived by the owner on Jun 3, 2023. It is now read-only.

Arthi-chaud/HAL

Repository files navigation

HAL

HAL is a Lisp interpreter in Haskell. It lets you interpret Lisp files and run instruction from the command line. Chez-Scheme was used as reference interpreter. This is an EPITECH School project (Nantes, Promo 2024) made in 3rd year

Build Functional tests Unit tests

Features

Supports

  • Signed integers (64 bits or more)
  • Symbols (unique identifiers)
  • Lists as linked lists of cons cells, an empty list being represented by ’()
  • REPL (Read, Evaluate, print loop)

Builtins

  • cons, car, cdr
  • eq?
  • atom?
  • Arithmetics operations: +, -, *, div, mod, <
  • quote
  • lambda
  • define
  • let
  • cond

How to use HAL ?

Compilation

  • To compile, use the following command:
make
  • To re-compile:
make re

Usage

./hal [-i] [FILES]...
  • -i: to use REPL feature
  • [FILES]: list of files to run. If -i is specified, the files are run before prompting the user

Testing policy

To run unit tests, run:

make tests_run

or

stack test

To run functional tests, run:

marvinette --exec-all

(See toolstack to know more about functional testing framework)

Toolstack

  • Stack
  • GNU's Makefile (used to wrap compilation)
  • HUnit (for unit testing)
  • Marvinette (for functional testing)

Contributors