-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tps' build instructions for 2023
- Loading branch information
Showing
4 changed files
with
28 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,3 @@ | |
bin | ||
dist-newstyle | ||
slides/*.java | ||
slides/Course*.hs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,37 @@ | ||
# This is the home of the TPs for the functional programming course of Telecom Nancy | ||
|
||
To reproduce a working environment: | ||
To reproduce a working environment, from the repository root, do: | ||
|
||
* Install the Haskell installer with [ghcup](https://www.haskell.org/ghcup/): | ||
`curl --proto '=https' --tlsv1.2 -sSf https://get-ghcup.haskell.org | sh` | ||
This will ask questions: | ||
- Answer `P` to update your `PATH` automatically. | ||
- Answer `Y` to install IDE tooling (`haskell-language-server`). | ||
- Answer `N` to install `stack`, since this project uses the simpler `cabal` build tool | ||
- Answer `N` to install `stack`, since this project uses the simpler | ||
[cabal](https://www.haskell.org/cabal/) build tool | ||
|
||
Once it's done, run `ghcup install ghc 8.10.7` and then `ghcup set ghc 8.10.7` | ||
Once it's done, run `ghcup install ghc 9.4.7` and then `ghcup set ghc 9.4.7` | ||
to set the expected compiler version. | ||
* Run `cabal build` | ||
* Then install [vscode](https://code.visualstudio.com/) and the | ||
* Run `cabal build all`. This will take a while as this repository depends on a number | ||
of fat libraries. Brew some coffee meanwhile. | ||
|
||
At this point, everything should be set to work on the command line, for example try: | ||
|
||
```shell | ||
cabal run -v0 TP4.hs | ||
``` | ||
|
||
You should get as output: | ||
|
||
``` | ||
pyEval "1 + 3" returned: 4 | ||
``` | ||
|
||
Now you can continue with the IDE configuration: | ||
|
||
* Install [vscode](https://code.visualstudio.com/) and the | ||
[Haskell extension](https://marketplace.visualstudio.com/items?itemName=haskell.haskell). | ||
* Launch `vscode` **from the terminal** (`code . &`), **from this repository's root**. | ||
If `vscode` asks you to install the Haskell Language Server, say yes. | ||
* Happy Haskell hacking! To experiment, hack in one of the `TP*.hs` files; | ||
see the first line for how to execute them. | ||
|
||
This project has a weird configuration to support multiple `Main` entry points. | ||
That is why, if you add a file on your own, you need to update the `hie.yaml` file | ||
(akin to a `.project` in Eclipse terms or an IDEA specification). To do this: | ||
|
||
* `cabal install implicit-hie` | ||
* `mv hie.yaml hie.yaml.backup` | ||
* `gen-hie > hie.yaml` |
This file was deleted.
Oops, something went wrong.