Generic Language and Data Operand Syntax
GLaDOS is a interpreted programming language implemented in Haskell that follows a C-like syntax. As part of the assignment, it includes a small lisp interpreter.
Core Components
-
AST: Abstract Syntax Tree definitions.
-
Compiler: Transforms source code into bytecode.
-
VM: A Stack Machine to execute the compiled bytecode.
- 🎨 Design & Architecture: Figma Board
- 📋 Project Management: GitHub Project
Note
We use Nix Flakes to ensure a reproducible development environment
- Install Nix (if you haven't already)
- Enter the development environment:
nix develop
Build and run the project in a Docker container without installing dependencies:
# Build the Docker image
docker build -t glados .
# Run the container
docker run -it --rm glados
# Or run with volume mount for development
docker run -it --rm -v $(pwd):/app gladosInstall the following system dependencies:
GHC(version9.8.4)cabal(version3.14.2.0)make(version4.0+)
On Ubuntu/Debian:
sudo apt update
sudo apt install -y ghc cabal-install make
cabal updateOn Fedora
sudo dnf install -y ghc cabal-install make
cabal updateOn Arch Linux:
sudo pacman -S ghc cabal-install make
cabal updateTip
After installing GHC and Cabal, all Haskell package dependencies (like hspec, megaparsec, directory, etc.) will be automatically downloaded and installed by Cabal when you run make or cabal build all.
Build the entire project:
makeWe use Hspec for testing and hlint for linting.
Run Unit Tests:
cabal test allCheck Coverage:
cabal test all --enable-coverageLint Code:
hlint .