reason
reason copied to clipboard
parsing error message very distant from actual parsing error
On this simple content:
let parse = file => { let json = Json_io.load_json(file); switch(json) { | J.Object xs => { let rules = List.assoc("rules",xs); parse_rules(rules) } | _ => error("Top"); } }
reason reports an error on line 2 (let json = ...) Error: SyntaxError in block but the actual error is line 4 where I forgot the parenthesis around xs in J.Object xs pattern.
I'm using reason 3.5.2 from opam on Linux.