Open GuoDCZ opened 1 month ago
I think this is actually intentional. You're right that this would be a bug in OCaml, where every sum type is treated as different, but in Hazel the type
keyword is literally just an alias. In Hazel you can also write that code like:
let a : +A = A in
let b : +A = A in
[a,b]
The following code should have a static error![image](https://github.com/hazelgrove/hazel/assets/113280601/50905b04-91d7-4ab4-9562-cd4d3109a5ee)
Elements have inconsistent types: ...
in 5th line, but is mistakenly accepted in Hazel: