ocaml-gospel / gospel

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

Fix `is_ts_tuple` #386

Closed n-osborne closed 7 months ago

n-osborne commented 8 months ago

This PR proposes to change the implementation of the Ttypes.is_ts_tuple function so that it doesnt confuse unit for a tuple of length 0.

This has the immediate benefit of concentrating the logic in the function rather than having to check that a type symbol is not ts_unit before calling is_ts_tuple (hence the simplifcation of the condition in Typing.process_val_spec.

This also improves the state of ortac#207