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

possible typechecker bug #8289

Closed
vicuna opened this issue Sep 18, 2003 · 0 comments
Closed

possible typechecker bug #8289

vicuna opened this issue Sep 18, 2003 · 0 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Sep 18, 2003

Original bug ID: 1840
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Fernando Alegre
Version: 3.06 and 3.07beta2
OS: Linux
Submission from: r49h230.res.gatech.edu (128.61.49.230)

We are puzzled by what we think is possibly a typechecker bug, as the only
difference between Tbool and Tfloat below is the specific type (either bool
or float). The compiler should either fail or succeed in both cases, but it
succeeds in one and fails in the other...

Here is the content of test.ml:

module Test (A: sig type t end) (B: sig type x = {f:A.t} end) = struct end

module Abool = struct type t = bool end
module Bbool = struct type x = {f:bool} end

module Afloat = struct type t = float end
module Bfloat = struct type x = {f:float} end

module Tbool = Test(Abool) (Bbool)
module Tfloat = Test(Afloat)(Bfloat)

And here is the output (both in Ocaml-3.06 and 3.07beta2):

$ ocamlc -c test.ml
File "test.ml", line 11, characters 29-35:
Signature mismatch:
Modules do not match:
sig type x = Bfloat.x = { f : float; } end
is not included in
sig type x = { f : Afloat.t; } end
Type declarations do not match:
type x = Bfloat.x = { f : float; }
is not included in
type x = { f : Afloat.t; }

@vicuna vicuna closed this as completed Sep 23, 2003
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant