You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Improve error message when non-functor used as functor #13702
#12224 improved the error message issued when a non-functor occurs in an applicand position. It would be good to similarly improve the error message when a non-functor appears in other places where a functor is expected (e.g. as an argument or in an ascription), e.g.:
# module F : sig end -> sig end = struct end;;
Line 1, characters 32-42:
1 | module F : sig end -> sig end = struct end;;
^^^^^^^^^^
Error: Signature mismatch:
Modules do not match: -> ... is not included in (sig end) -> ...
An argument appears to be missing with module type sig end
Activity
#13702 error messages: specialized error messages for non-functors (#…
Octachron commentedon Mar 21, 2025
This was fixed by #13865, the error message is now specialized to
The reverse case is also handled with a hint about missing arguments (or incompatible module types).