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

Recursive module inclusion check incomplete #7779

Open
vicuna opened this issue Apr 16, 2018 · 5 comments
Open

Recursive module inclusion check incomplete #7779

vicuna opened this issue Apr 16, 2018 · 5 comments

Comments

@vicuna
Copy link

vicuna commented Apr 16, 2018

Original bug ID: 7779
Reporter: @lpw25
Status: new
Resolution: open
Priority: normal
Severity: minor
Version: 4.06.0
Target version: later
Category: typing

Bug description

The following code does not type check:

module rec M : sig
  type a
  type b = a
end = struct
  type a
  type b = M.b
end;;
Characters 53-93:
  ........struct
      type a
      type b = M.b
    end..

Error: Signature mismatch:
       Modules do not match:
         sig type a = M.a type b = M.b end
       is not included in
         sig type a type b = a end
       Type declarations do not match:
         type b = M.b
       is not included in
         type b = a

Having dug into the issue, this appears to just be part of the incompleteness of the current inclusion check for recursive modules.

I don't expect it to be fixed unless the approach taken by that check is changed, but I thought I'd make this issue anyway to record it for posterity.

@vicuna
Copy link
Author

vicuna commented Apr 16, 2018

Comment author: @lpw25

For completeness, the following example is the one that I actually started looking at -- partly due to its dubious error message -- but the problem is the same as that of the more minimal example above:

module rec M : sig
  type a
  module type B = sig val x : M.a end
end = struct
  type a
  module type B = M.B
end;;

Characters 78-125:
  ........struct
    type a
    module type B = M.B
  end..
Error: Signature mismatch:
       Modules do not match:
         sig type a = M.a module type B = M.B end
       is not included in
         sig type a module type B = sig val x : M.a end end
       Module type declarations do not match:
         module type B = M.B
       does not match
         module type B = sig val x : M.a end
       At position module type B = <here>
       Modules do not match: M.B is not included in sig val x : M.a end
       At position module type B = <here>
       Values do not match: val x : M.a is not included in val x : M.a

@github-actions
Copy link

github-actions bot commented May 7, 2020

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label May 7, 2020
@stedolan stedolan removed the Stale label May 18, 2020
@github-actions
Copy link

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label May 21, 2021
@Octachron Octachron removed the Stale label Jun 21, 2021
@Octachron Octachron reopened this Jun 21, 2021
@github-actions
Copy link

github-actions bot commented Jul 1, 2022

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label Jul 1, 2022
@Octachron Octachron removed the Stale label Jul 1, 2022
@github-actions
Copy link

github-actions bot commented Jul 3, 2023

This issue has been open one year with no activity. Consequently, it is being marked with the "stale" label. What this means is that the issue will be automatically closed in 30 days unless more comments are added or the "stale" label is removed. Comments that provide new information on the issue are especially welcome: is it still reproducible? did it appear in other contexts? how critical is it? etc.

@github-actions github-actions bot added the Stale label Jul 3, 2023
@Octachron Octachron removed the Stale label Jul 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants