Maybe improve error messages of option<`bla> and others
If this is referring to what I think it's referring to I see this trip up a lot of newcomers, especially with generics.
Here's one example:
type foo = {bar: unit => unit}
external foo: unit => foo = "foo"
let x = foo()
switch x {
| Some(foo) => foo.bar()
| None => ()
}
This pattern matches values of type option<'a>
but a pattern was expected which matches values of type foo
Is it possible to show option<foo> here? Alternatively perhaps give a more specific hint of what might be wrong? 🤷
No that's unrelated. What I filed is a syntax error, where someone used ’ instead of '
The rescript-lang/syntax repo is obsolete and will be archived soon. If this issue is still relevant, please reopen in the compiler repo (https://github.com/rescript-lang/rescript-compiler) or comment here to ask for it to be moved. Thank you for your contributions.