Scope checking issue with unverified build of pancake
- Dominant language
- Standard ML
- Stars
- 1.2k
- Forks
- 104
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 16
Description
The current `master` branch of _unverified_ pancake compiler (commit: [`4e312c0`](https://github.com/CakeML/cakeml/commit/4e312c0), HOL: [`e6d0417`](https://github.com/HOL-Theorem-Prover/HOL/commit/e6d0417)) fails to compile the following simple program
```
fun main() {
return 0;
}
```
To reproduce, compile `cake` in `unverified/sexpr-bootstrap/x64/64`, and then compile the program with `cake --pancake`. It returns
```
### ERROR: scope error
AT (2:9 2:10): function main is not in scope in function main
Program exited with nonzero exit code.
```
The verified build (`compiler/bootstrap/compilation/x64/64`) works fine.
Contributor guide
No contributing guide indexed for this repository
Research direction
Build `cake` in `unverified/sexpr-bootstrap/x64/64`, then compile the provided `main` program with `cake --pancake` to reproduce the scope error. Compare this with the working verified build in `compiler/bootstrap/compilation/x64/64`; done means the unverified build accepts the program without reporting that `main` is out of scope.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100