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**
`copilot-theorem` is failing to compile with GHC 9.6.3. This is because
the module `Control.Monad.State` no longer re-exports `Control.Monad`,
so the functions `ap`, `forM`, `when`, `liftM` and `liftM2` are not in
scope. Another issue is that `System.Directory` can no longer be
imported safely. These errors are causing the build to fail on hackage,
which uses GHC 9.6.3.
**Type**
- Bug: Failure to compile with version of dependency.
**Additional context**
- haskell/directory#147
**Requester**
- Ivan Perez
**Method to check presence of bug**
The following Dockerfile checks whether Copilot can be installed with
GHC 9.6, in which case it prints the message Success:
```Dockerfile
FROM ubuntu:focal
RUN apt-get update
RUN apt-get install --yes libz-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.6.3
RUN ghcup install cabal 3.4
RUN ghcup set ghc 9.6.3
RUN cabal update
SHELL ["/bin/bash", "-c"]
CMD git clone $REPO \
&& cd $NAME \
&& git checkout $COMMIT \
&& cabal install --lib copilot**/ \
&& 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-491
```
**Expected result**
Compiling with GHC 9.6 succeeds. Running the above image prints the
message Success, indicating that Copilot can be compile with GHC 9.6.3.
**Solution implemented**
Modify `copilot-theorem` to import `Control.Monad` explicitly, instead of via
re-exports from other modules.
Modify the module that imports `System.Directory` so that it is marked
as trustworthy instead of Safe.
**Further notes**
None.
0 commit comments