ocaml-gospel / gospel

A tool-agnostic formal specification language for OCaml.
https://ocaml-gospel.github.io/gospel
MIT License
126 stars 16 forks source link

Improve type-error messages for mismatches between header and val type #339

Closed shym closed 11 months ago

shym commented 11 months ago

Distinguish between parameters and return values Handle the special case of too many parameters Fix a typo in the mismatch error message

shym commented 11 months ago

I confess myself lazy there... I rewrote the function to test, in that particular case, whether we are testing the returned values for a function returning a tuple and, if so, expand the explanation. It might now err on the side of verbosity. I’ve added a test for that particular case.

n-osborne commented 11 months ago

Nice, thanks you!