You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**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.
0 commit comments