Compatible with
- Coq 8.15 with Coq-Elpi 1.14.x
- Coq 8.16 with Coq-Elpi 1.15.x and 1.16.x
- Fix
HB.pack
works with structures about functions, and not just types. - Fix
HB.about
andHB.graph
now display shortest names. - New Command
HB.howto
to find all possible ways to instanciate structures. - New Structures now support keys which type's head is a global reference.
(Only keys corresponding to the coercion classes
Sortclass
andFunclass
were accepted).
Compatible with
- Coq 8.15 with Coq-Elpi 1.14.x
- Coq 8.16 with Coq-Elpi 1.15.x
- Fix Structures can be keyd on sorts (eg
Prop
) and products (egT -> U
) - New Mixin parameters can depend on structure instances inferred using previous mixins (see this test)
Compatible with
- Coq 8.13 or 8.14 with Coq-Elpi 1.11.x
- Coq 8.15 with Coq-Elpi 1.12.x
- Fix Do not unfold let-ins in instances (speedup)
- Fix Test suite for Coq 8.15
Compatible with
- Coq 8.13 or 8.14 with Coq-Elpi 1.11.x
- Fix Do not impose useless universe constraints on
option
andprod
by using custom inductive types. - New Check for instances which break Forgetful Inheritance, attribute
#[non_forgetful_inheritance]
to disable the check. - New Factory instances are canonically (key
Factory.sort
) instances of all the structures they can fulfill. This can be used inside proofs to provide canonical instances on a type. E.g.(factoryInstance : SomeStructure.sort _)
works iffactoryInstance
can be used to buildSomeStructure
- New
Strategy Opaque
for named mixins, improving conversion performance on generated terms - New Attributes
#[primitive]
and#[primitive_class]
forHB.structure/mixin/factory
to generate primitive records. - New Attribute
#[doc="text"]
supported by all commands and used byHB.about
- New Attribute
#[hnf]
supported byHB.instance
- New
HB.locate
to find where an instance comes from - New
HB.about
to display HB specific info attached to a HB generated constant
- New Tactic in term
HB.pack
andHB.pack_for
taking a keyK
and a bunch of factories and building a structure instance onK
. E.g.pose K_fooType : Foo.type := HB.pack K f1 f2 ..
works if factoriesf1 f2 ..
provide all mixins needed by structureFoo
.
Compatible with
- Coq 8.11 with Coq-Elpi 1.6.2,
- Coq 8.12 with Coq-Elpi 1.8.2,
- Coq 8.13 with Coq-Elpi 1.9.5.
- Experimental support for structures with a function as the carrier, for e.g. hierarchies of morphisms.
- Fix Type inference of parameters for HB commands improved, it can now rely on the right hand side of factories and mixins
- Fix Removed a hack that included phantom fields in mixins and factories in order to prevent erasure from section discharge.
- Cosmetic Changed naming convention for canonical instances e.g.
T_is_a_Ring
is now renamed toT_Ring
. This name should still not be relied upon. - Cleanup The elpi code has been split into several files, one for each command and a folder for common code.
- Fix Speedup
toposort
in elpi code. - Doc The file
structures.v
contains a detailed documentation of each command.
- Deprecated
HB.instance K F
in favor ofHB.instance Definition
. - New
HB.export
is likeExport
except that the module is stored in a database for later rexport. - New
HB.reexport
reexports all the modules that have been previously flagged byHB.export
, as well as all theHB.instance
that have been flagged by the attribute#[export]
. - New
HB.check
is likeCheck
but supports logging and can be disabled on a selection of Coq versions. - New
HB.graph
generates the graph of structures as a dot file. (One may usetred file.dot | xdot -
to visualize the output). - Extended
HB.structure
to generate methods.on
and.copy
(seestructures.v
for their documentation).
- New
#[export]
attribute can be given toHB.instance
in order to have instances (re)declared byHB.reexport
. - New
#[compress_coercions]
attribute (off by default) to shorten coercions paths in the synthesis of instances. When instanciating structures one by one, (e.g. T is declared as a Semiring, then as a Ring, then as a Field, etc) the coercions used to pile up, we now compress these chains of application. - New
#[log]
and#[log(raw)]
to print Coq commands equivalent to what HB is doing. The raw print is the only one which is reparsable. - New
#[key="T"]
to flag paramterT
as the key of the mixin/factory. The definitionindexed
used to serve this purpose is deprecated and will not do anything. - New
#[infer(P)]
can be used to tellHB.structure
to set things up so that parameterP
is automatically inferred. E.g. ifP : Ring.type
thenStructure.type
will take at : Type
and trigger a canonical inference. to infer thet_is_a_Ring : Ring.type
associated tot
. IfStructure
has a function carrier, one has to write#[infer(P = "_ -> _")]
. - New
#[arg_sort]
forHB.structure
generates an intermediate sort projection calledarg_sort
which is prioritary as a coercion and which unfolds tosort
. It is meant to be the sort of arguments of operations (seemathcomp/fingroup/fingroup.v
for more information). - New
#[local]
forHB.instance
so that they do not survive sections.
- New environment variable
COQ_ELPI_ATTRIBUTES="hb(log(raw))"
to have HB commands write patch files containing Coq commands equivalent to what HB did. These patch files have extension.v.hb
and are named after the file they apply to. - New
coq.hb
command line utility to patch/reset files. - New The CI is now testing mathcomp and plan B (using nix).
Requires Coq-Elpi 1.6 or 1.7 or 1.8 and Coq 8.11 or 8.12 or 8.13.
- Use Coq's elaborator to typecheck factories and structures (coercions are now inserted properly)
- New attribute
#[mathcomp]
forHB.structure
to synthesize backward compatibility code for the Mathematical Components library. When the mixin contains a single axiom its name can be given as#[mathcomp(axiom="eq_axiom")]
. HB.instance Definition name : factory T := term
works even if term is not a known builder. In this case the type (key) is read from the factory (the type of the definition).
- HB now supports parameters (experimental).
- Port to Coq-Elpi 1.5.
- Better error message in case classes are not defined in the right order.
- Structure operations are not reexported by substructures.
- Spurious trivial
TYPE
structure removed from demo1.
HB.instance
can be applied directly to a definition as inHB.instance Definition foo := Bar.Build T ...
- Port to Coq-Elpi version 1.4
- Operations
op
from factoryf
are not bound tof_op
anymore, they are now bound toop
and potentially masked operations are accessible viaSuper.op
.
First public release for Coq 8.10 and 8.11.