GĂ©ometrie du jeu de Jean-Esther's Gaming Chat (https://discord.gg/94Hykez)

root

COMMON INFORMATION

Prerequisites

All the commands are tested in Linux Mint 19.

All the commands are given assuming that pwd (present working directory) is the root directory of the project.

COMPILE AND RUN APPLICATION

WITH GHC

WITH HASKELL STACK

Requirements:

  • Installed haskell stack of version 2.1 or higher

The following commands builds the project

stack build

One might need to add --nix key: stack build --nix.

WITH DOCKER

Requiremenets

  • Docker 19 (it might work with older versions)

One-command instruction

Run build.sh script:

./build.sh

or

sh build.sh

It will build an image and run stack build in a container.

Optimized approach

Build an image with

cd .devcontainer && docker build -t myHaskellImg .

Run your command in a container with

docker run -v "$PWD":/workspace -w /workspace -u vscode:vscode --rm -it myHaskellImg stack build --nix

WITH VSCODE

TEST

WITH HASKELL STACK

RUn

stack test

One might need to add --nix key: stack test --nix.

WITH DOCKER

Run

docker run -v "$PWD":/workspace -w /workspace -u vscode:vscode --rm -it myHaskellImg stack test --nix

DOCUMENTATION

WITH HASKELL STACK OR GHC

cd src && haddock --html --odir=../doc *.hs

WITH DOCKER

docker run -v "$PWD":/workspace -w /workspace/src -u vscode:vscode --rm -it myHaskellImg haddock --html --odir=../doc *.hs