Commit e95cc62
committed
Merge branch 'develop-remove-pragmas-theorem'. Close #613.
**Description**
The code of `copilot-theorem` contains unused language pragmas. To comply with
our coding style, which required unused code not to be included in the
codebase, those pragmas should be removed.
**Type**
- Management: comply with styling requirement.
**Additional context**
None.
**Requester**
- Ivan Perez.
**Method to check presence of bug**
Not applicable (not a bug).
**Expected result**
The code contains no unused pragmas. Running `hlint` with the following
auxiliary file indicates that there are no unused PRAGMAS.
```yaml
- ignore: {name: "Redundant bracket"}
- ignore: {name: "Use infix"}
- ignore: {name: "Redundant as"}
- ignore: {name: "Redundant <$>"}
- ignore: {name: "Use camelCase"}
- ignore: {name: "Avoid lambda"}
- ignore: {name: "Use gets"}
- ignore: {name: "Redundant $"}
- ignore: {name: "Use <&>"}
- ignore: {name: "Use concatMap"}
- ignore: {name: "Move brackets to avoid $"}
- ignore: {name: "Use /="}
- ignore: {name: "Use newtype instead of data"}
- ignore: {name: "Use :"}
- ignore: {name: "Replace case with fromMaybe"}
- ignore: {name: "Use >=>"}
- ignore: {name: "Use curry"}
- ignore: {name: "Use first"}
- ignore: {name: "Use hPrint"}
- ignore: {name: "Use or"}
- ignore: {name: "Use fmap"}
- ignore: {name: "Use if"}
- ignore: {name: "Use <$>"}
- ignore: {name: "Reduce duplication"}
- ignore: {name: "Eta reduce"}
```
The following dockerfile runs hlint on copilot-theorem with the provided list
of ignored warnings, which does not include unnecessary language pragmas, and
checks that there are no warnings reported, after which it prints the message
success:
```
--- Dockerfile-verify-613
FROM ubuntu:jammy
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install --yes git
RUN apt-get install --yes hlint
ADD ignore.yaml /tmp/ignore.yaml
RUN hlint --version
SHELL ["/bin/bash", "-c"]
CMD git clone $REPO \
&& cd $NAME \
&& git checkout $COMMIT \
&& hlint -h /tmp/ignore.yaml copilot-theorem/src \
&& echo "Success"
--- ignore.yaml
- ignore: {name: "Redundant bracket"}
- ignore: {name: "Use infix"}
- ignore: {name: "Redundant as"}
- ignore: {name: "Redundant <$>"}
- ignore: {name: "Use camelCase"}
- ignore: {name: "Avoid lambda"}
- ignore: {name: "Use gets"}
- ignore: {name: "Redundant $"}
- ignore: {name: "Use <&>"}
- ignore: {name: "Use concatMap"}
- ignore: {name: "Move brackets to avoid $"}
- ignore: {name: "Use /="}
- ignore: {name: "Use newtype instead of data"}
- ignore: {name: "Use :"}
- ignore: {name: "Replace case with fromMaybe"}
- ignore: {name: "Use >=>"}
- ignore: {name: "Use curry"}
- ignore: {name: "Use first"}
- ignore: {name: "Use hPrint"}
- ignore: {name: "Use or"}
- ignore: {name: "Use fmap"}
- ignore: {name: "Use if"}
- ignore: {name: "Use <$>"}
- ignore: {name: "Reduce duplication"}
- ignore: {name: "Eta reduce"}
```
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-613
```
**Solution implemented**
Remove all unused PRAGMAS from the code in `copilot-theorem`.
**Further notes**
None.4 files changed
+13
-17
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 | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | 1 | | |
3 | 2 | | |
4 | 3 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
16 | 11 | | |
17 | 12 | | |
18 | 13 | | |
| |||
0 commit comments