reasonml / reason

Simple, fast & type safe code that leverages the JavaScript & OCaml ecosystems
http://reasonml.github.io
MIT License
10.09k stars 424 forks source link

fix parsing of "module type of" on functors return #2615

Closed EduardoRFS closed 3 years ago

EduardoRFS commented 3 years ago

As there is no ambiguity and (module type of X) seems to fit on our definition of simple_module_type it seems that it should be there.

Also this is probably safe and there is only two usage of simple_module_type, at module_type itself and at at https://github.com/facebook/reason/blob/master/src/reason-parser/reason_parser.mly#L1574

This PR closes #2608

jordwalke commented 3 years ago

You should add this one to the type checked tests because it will catch issues in the parsing of it.

EduardoRFS commented 3 years ago

@jordwalke I think that's not needed, there was just a problem on the expected output. I added the comment and forgot to update the tests.