tn-fp-haskell-course

This is the home of the TPs for the functional programming course of Telecom Nancy

Containerized setup (Docker)

The fastest way to get a working environment is to use the docker image published by CI. Haskell tooling and this project’s dependencies are included; your clone of the repository is mounted at /workspaces/tn-fp-haskell-course.

vscode

In vscode (with the Dev Containers extension): open the repository root, then run Dev Containers: Reopen in Container from the command palette (Ctrl/Cmd+Shift+P). vscode reads .devcontainer/devcontainer.json, pulls the image and mounts your clone.

Without vscode

Run the image manually:

docker pull ghcr.io/smelc/tn-fp-haskell-course:latest
docker run -it --rm -v "$(pwd):/workspaces/tn-fp-haskell-course" -w /workspaces/tn-fp-haskell-course -p 8000:8000 -p 6419:6419 ghcr.io/smelc/tn-fp-haskell-course:latest bash

In both cases

The image is not refreshed automatically. When told to adopt a new version, do:

docker pull ghcr.io/smelc/tn-fp-haskell-course:latest

then, in vscode, run Dev Containers: Rebuild Container from the command palette.

From a terminal inside the container you can then run e.g.:

cabal run -v0 TP4.hs

You can run the REPL as follows:

cabal repl TP1.hs

Direct setup on your host (Dockerless)

To reproduce a working environment, from the repository root, do:

At this point, everything should be set to work on the command line, for example try:

cabal run -v0 TP4.hs

You should get as output:

pyEval "1 + 3" returned: 4

Now you can continue with the IDE configuration: