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
The kernel supports instantiating a functor with a body in a type through the with Module construct, but the upper layers seemingly do not. Incidentally we do not have any test for higher-order module constraint in the test-suite.
Small Rocq / Coq file to reproduce the bug
ModuleType S. End S.
Module N. End N.
ModuleType T.
DeclareModule F(X : S) : S.
End T.
Module F0 (X : S).
Definition n := 2. (* dummy value to sanity-check subtyping *)End F0.
(* This works, note the <: *)Module M_ok <: T with Module F := F0.
Module F(X : S).
Definition m := 1.
Definition n := m + m.
End F.
End M_ok.
Module FF_ok := M_ok.F.
Module MM_ok := FF_ok(N).
(* This does not after sealing *)Module M_ko : T with Module F := F0.
Module F(X : S).
Definition m := 1.
Definition n := m + m.
End F.
End M_ko.
Module FF_ko := M_ko.F.
Module MM_ko := FF_ko(N). (* Error: Application of a functor with too few arguments. *)
Version of Rocq / Coq where this bug occurs
No response
Last version of Rocq / Coq where the bug did not occur
No response
The text was updated successfully, but these errors were encountered:
ppedrot
added
kind: bug
An error, flaw, fault or unintended behaviour.
needs: triage
The validity of this issue needs to be checked, or the issue itself updated.
part: modules
The module system of Coq.
and removed
needs: triage
The validity of this issue needs to be checked, or the issue itself updated.
labels
Jan 6, 2025
Description of the problem
The kernel supports instantiating a functor with a body in a type through the
with Module
construct, but the upper layers seemingly do not. Incidentally we do not have any test for higher-order module constraint in the test-suite.Small Rocq / Coq file to reproduce the bug
Version of Rocq / Coq where this bug occurs
No response
Last version of Rocq / Coq where the bug did not occur
No response
The text was updated successfully, but these errors were encountered: