Skip to content

Commit 0845db1

Browse files
Merge branch 'dev-readme-installation'. Close #597.
**Description** The current installation instructions do not expose all packages, meaning that users can only access whatever is re-exported by the package `copilot`. This prevents users from accessing many key features of Copilot, and from compiling many specifications. **Type** - Bug: Installation instructions are insufficient for standard use cases. **Additional context** None. **Requester** - Ivan Perez. **Method to check presence of bug** Install Copilot using instructions in the README: ```sh $ cabal v2-install --lib copilot ``` Try to compile a specification in one of the examples: ```sh $ runhaskell copilot/examples/Heater.hs copilot/examples/Heater.hs:11:1: error: [GHC-87110] Could not load module `Copilot.Compile.C99'. It is a member of the hidden package `copilot-c99-4.2'. You can run `:set -package copilot-c99' to expose it. (Note: this unloads all the modules in the current scope.) Use :set -v to see a list of the files searched for. | 11 | import Copilot.Compile.C99 | ^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` **Expected result** The following Dockerfile installs Copilot using the instructions in the README and then runs the example specifications referenced above to show that it can be compiled correctly, after which it prints the message "Success": ``` FROM ubuntu:focal ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update RUN apt-get install --yes libz-dev pkg-config libncurses-dev RUN apt-get install --yes git RUN apt-get install --yes wget RUN mkdir -p $HOME/.ghcup/bin RUN wget https://downloads.haskell.org/~ghcup/0.1.17.7/x86_64-linux-ghcup-0.1.17.7 -O $HOME/.ghcup/bin/ghcup RUN chmod a+x $HOME/.ghcup/bin/ghcup ENV PATH=$PATH:/root/.ghcup/bin/ ENV PATH=$PATH:/root/.cabal/bin/ RUN apt-get install --yes curl RUN apt-get install --yes gcc g++ make libgmp3-dev RUN ghcup install ghc 9.8.2 RUN ghcup install cabal 3.4 RUN ghcup set ghc 9.8.2 RUN cabal update SHELL ["/bin/bash", "-c"] CMD git clone $REPO \ && cd $NAME \ && git checkout $COMMIT \ && cabal v2-install --lib copilot copilot-core copilot-c99 copilot-language \ copilot-theorem copilot-libraries copilot-interpreter copilot-prettyprinter \ && runhaskell copilot/examples/Heater.hs \ && echo Success ``` Command (substitute variables based on new path after merge): ``` $ docker run -e "REPO=https://github.com/Copilot-Language/copilot" -e "NAME=copilot" -e "COMMIT=<HASH>" -it copilot-verify-597 ``` **Solution implemented** Modify installation instructions in the README to expose all packages in the Copilot project. **Further notes** None.
2 parents f39b9da + ea702c9 commit 0845db1

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

copilot/CHANGELOG

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
2025-02-24
1+
2025-03-05
22
* Include missing dependencies in installation instructions. (#591)
33
* Update version of GHC in README. (#590)
44
* Add example of how to use proveWithCounterExample. (#589)
5+
* List all Copilot packages in installation command in README. (#597)
56

67
2025-01-07
78
* Version bump (4.2). (#577)

copilot/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ Once the compiler is installed, install Copilot from
112112
[Hackage](https://hackage.haskell.org/package/copilot) with:
113113

114114
```sh
115-
cabal v2-install --lib copilot
115+
cabal v2-install --lib copilot copilot-core copilot-c99 copilot-language \
116+
copilot-theorem copilot-libraries copilot-interpreter copilot-prettyprinter
116117
```
117118

118119
To test that Copilot is available, execute the following:
@@ -141,7 +142,8 @@ Once the compiler is installed, install Copilot from
141142
[Hackage](https://hackage.haskell.org/package/copilot) with:
142143

143144
```sh
144-
$ cabal v2-install --lib copilot
145+
$ cabal v2-install --lib copilot copilot-core copilot-c99 copilot-language \
146+
copilot-theorem copilot-libraries copilot-interpreter copilot-prettyprinter
145147
```
146148

147149
To test that Copilot is available, execute the following:

0 commit comments

Comments
 (0)