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

cannot create same-name record and field in different theory #260

Closed
xrchz opened this Issue Jun 1, 2015 · 5 comments

Comments

Projects
None yet
2 participants
@xrchz
Copy link
Member

xrchz commented Jun 1, 2015

I'm not sure whether this is intentional, but I would prefer if this were allowed (or to know the rationale for disallowing it):
fooScript.sml:

open HolKernel bossLib;
val _ = new_theory"foo";
val _ = Datatype`foo = <| f : bool |>`;
val _ = export_theory();

barScript.sml:

open HolKernel bossLib fooTheory;
val _ = new_theory"bar";
val _ = Datatype`foo = <| f : bool |>`;
val _ = export_theory();
Exception raised at Datatype.Hol_datatype:
at Term.create_const:
not a type match
Exception- HOL_ERR {message = "at Term.create_const:\nnot a type match", origin_function = "Hol_datatype", origin_structure = "Datatype"} raised
Holmake: Failed script build for barScript - exited with code 1
@mn200

This comment has been minimized.

Copy link
Member

mn200 commented Jun 2, 2015

It should be allowed. Curiously, though I get warning messages when I try this, I don't get failures. I will commit my test-case (and try to make the code more robust such that it doesn't give me mk_const warnings; what the heck is create_const?)

mn200 added a commit that referenced this issue Jun 2, 2015

Test-case for repeated record def'n issue
This is github issue #260.

I don't see an error when attempting this; I do see warnings that I
don't think should be there.
@xrchz

This comment has been minimized.

Copy link
Member

xrchz commented Jun 2, 2015

I saw the exception on 1ee64d3. I'll try updating to see if it turns into just a warning...

@xrchz

This comment has been minimized.

Copy link
Member

xrchz commented Jun 2, 2015

still get the exception at HEAD (abc8e74)

@mn200

This comment has been minimized.

Copy link
Member

mn200 commented Jun 2, 2015

Can you adjust the test-case so as to demonstrate the bug please? I still can't reproduce (and nor can the regression machines so far).

@mn200

This comment has been minimized.

Copy link
Member

mn200 commented Jun 2, 2015

Don't worry; I've got a local reproduction.

mn200 added a commit that referenced this issue Jun 2, 2015

@mn200 mn200 closed this in 70888e0 Jun 2, 2015

mn200 added a commit that referenced this issue Jun 2, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment