Commit 320b471
committed
Merge branch 'develop-remove-forall'. Close #518.
**Description**
The function `Copilot.Language.Spec.forall` was deprecated due to the
function name not being allowed in newer versions of GHC. An alternative
was provided, so the old function is not being used by any part of
Copilot.
The original functions was deprecated in Copilot 3.18 and no messages
have been received requesting that they be kept in this library.
As per our internal policy of waiting 3 versions from deprecation until
a public interface declaration can be removed, these functions can now
be removed.
**Type**
- Bug: unused code included in the implementation.
**Additional context**
- Issue #470 , addressed in Copilot 3.18, deprecated the function.
**Requester**
- Ivan Perez
**Method to check presence of bug**
Although this is not a bug per se, compiling with GHC >= 9.4 and
--ghc-options='-Werror=forall-identifier' produces an error due to
including a function called `forall`, which is not allowed in new
versions of GHC.
The following dockerfile installs copilot with GHC 9.8 and
`--ghc-options='-Werror=forall-identifier'`, and prints the message
"Success" if installation completes:
```Dockerfile
FROM ubuntu:focal
ENV DEBIAN_FRONTEND=noninteractive
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.19.2/x86_64-linux-ghcup-0.1.19.2 -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 apt-get install --yes pkg-config
SHELL ["/bin/bash", "-c"]
RUN ghcup install ghc 9.8.2
RUN ghcup install cabal 3.2
RUN ghcup set ghc 9.8.2
RUN cabal update
SHELL ["/bin/bash", "-c"]
CMD git clone $REPO && cd $NAME && git checkout $COMMIT && cd .. \
&& cabal v1-sandbox init \
&& cabal v1-install alex happy \
&& cabal v1-install --ghc-option="-Werror=forall-identifier" $NAME/**/ \
&& 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-518
```
**Expected result**
Running the dockerfile above prints the message success, indicating that
Copilot does not define the identifier `forall` anywhere.
**Solution implemented**
Remove the deprecated function `Copilot.Language.Spec.forall`, and any
references to it (exports).
Adjust README to indicate that copilot now compiles with GHC 9.8.
**Further notes**
None.File tree
5 files changed
+9
-8
lines changed- copilot-language
- src/Copilot
- Language
- copilot
5 files changed
+9
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| |||
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | 168 | | |
174 | 169 | | |
175 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
1 | 4 | | |
2 | 5 | | |
3 | 6 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
84 | | - | |
| 84 | + | |
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| |||
0 commit comments