Feature Request: Compiler Warning Messages
- Dominant language
- Standard ML
- Stars
- 1.2k
- Forks
- 104
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 16
Description
It would be a nice feature of the CakeML compiler for it to provide warning messages during compilation of possibly unintended behaviors.
**Example:**
```sml
fun is_upper_X str =
let
val uppX = "X"
val lowX = "x"
in
case str of
uppX => True
| lowX => False
end
val () =
let
val _ = TextIO.print (Bool.toString (is_upper_X "X"))
val _ = TextIO.print "\n"
val _ = TextIO.print (Bool.toString (is_upper_X "x"))
val _ = TextIO.print "\n"
in
()
end
```
Running it will return
```
True
True (* Possibly unexpected behavior *)
```
I believe it would be beneficial for the compiler to give the user a warning such as `Pattern "lowX" is redundant in this clause.`
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.