Skip to content

Builder instances must always depend on their factory - deprecate HB.instance K F. #182

@CohenCyril

Description

@CohenCyril

This is enforced by HB.instance Definition _ := _ via a let in hack, but it does not work for the "existing instance command" HB.instance T F, as spotted by @proux01.

Here is a minmal counter example:

From HB Require Import structures.

HB.mixin Record hasInvol T := { invol : T -> T }.
HB.structure Definition Invol := { T of hasInvol T }.

HB.factory Record mkIdInvol T := { }.
HB.builders Context T of mkIdInvol T.
Definition XXX := hasInvol.Build T id.
HB.instance T XXX.
HB.end.

HB.instance Definition _ := mkIdInvol.Build nat.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions