Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The typechecker fails with an exception on functor applications #338

Closed
shym opened this issue Sep 21, 2023 · 1 comment · Fixed by #404
Closed

The typechecker fails with an exception on functor applications #338

shym opened this issue Sep 21, 2023 · 1 comment · Fixed by #404

Comments

@shym
Copy link
Contributor

shym commented Sep 21, 2023

On:

val tricky : Set.Make(Int).t -> bool

the typechecker fails with:

gospel: internal error, uncaught exception:
        Invalid_argument("Ppxlib.Longident.flatten")
        Raised at Stdlib.invalid_arg in file "stdlib.ml", line 30, characters 20-45
        Called from Ppxlib__Longident.flatten_exn in file "src/longident.ml" (inlined), line 34, characters 22-33
        Called from Gospel__Typing.ty_of_core in file "src/typing.ml", line 101, characters 39-70
        Called from Gospel__Typing.val_parse_core_type in file "src/typing.ml", line 766, characters 8-25
        Called from Gospel__Typing.process_val in file "src/typing.ml", line 964, characters 18-49
        Called from Gospel__Typing.process_sig_item.process_sig_item in file "src/typing.ml", line 1329, characters 31-67
        Called from Gospel__Typing.process_sig_item in file "src/typing.ml", line 1361, characters 23-51
        Called from Gospel__Typing.type_sig_item in file "src/typing.ml", line 1366, characters 15-49
@shym
Copy link
Contributor Author

shym commented Sep 21, 2023

Proposal of fix:

  • add a new “Functor application not supported” error,
  • wrap all calls to Longident.flatten_exn to report that error if need be.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant