The Tools We Use For Ampersand
  • Introduction
  • Tools used in the Ampersand project
  • Version control with Git
  • How to release an Ampersand upgrade
  • Documenting with GitBook
    • Getting started with GitBook
    • Do's and Dont's in Ampersand documentation
  • Building
    • Building an Ampersand Compiler with Stack
    • Baking a Docker image that contains the Ampersand Compiler
    • Testing with Docker on your own laptop
    • Automated builds
  • Prototype framework
  • Automation of releasing (CI/CD)
    • Github packages
  • Installation of RAP
    • Deploying to your own laptop
    • Deploying RAP4 in the Azure cloud
    • Deploying OUNL RAP4
    • Maintaining RAP4
    • Making Docker images
    • Deployment Configuration
    • Details
  • Functionality of RAP4
    • Student
    • Tutor
    • Account Manager
    • Graduate Student
  • Deploying with Kubernetes
  • Authentication and access management with OAuth
  • Ampersand language support
  • Group 1
    • Development using VS Code
Powered by GitBook
On this page
Export as PDF
  1. Building

Building an Ampersand Compiler with Stack

To build your own Ampersand compiler is something to avoid as a user. As a developer, however, you may have reasons to do this yourself. For instance to verify what happens in older versions.

PreviousBuildingNextBaking a Docker image that contains the Ampersand Compiler

Last updated 5 years ago

The Ampersand compiler is a Haskell program built with . Stack is a build tool for Haskell projects such as Ampersand. We have automated the building process (using stack) for the following purposes:

  1. to prevent mistakes such as dependency conflicts inside and between Haskell packages, for an uninterrupted compilation process (robust building);

  2. to generate ampersand compilers for different platforms (platform independence);

  3. to provide a reproducible and reliable build process to developers with diverse development tools, operating systems, and working environments (uniform building);

  4. to allow for generating images for docker containers (containerization);

  5. to accellerate the build process to increase the release frequency of Ampersand.

Installation

comes as part of , so there is no need to install Haskell separately.

The are pretty clear for the various platforms. Make sure you read the part about the STACK_ROOT environment variable.

To compile Ampersand you need a file , which sits in the Ampersand repository. Fetch it and put it in you working directory. From the command-line, call command stack install and after a while (go get coffee!) your ampersand compiler exists! NB: If you want to build Rieks' preprocessor as well, the magic spell is stack install --flag ampersand:buildAll

stack
Haskell
Stack
instructions to install Stack
package.yaml