Skip to content

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

@xrchz

Description

@xrchz

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions