diff options
author | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-07-25 15:11:22 +0200 |
---|---|---|
committer | Emilio Jesus Gallego Arias <e+git@x80.org> | 2017-07-25 16:02:32 +0200 |
commit | b6f3c8e4f173e3f272f966e1061e7112bf5d1b4a (patch) | |
tree | 0a13e6970482cb16a9e01f96703625552398ed22 /proofs/proof_type.ml | |
parent | c0fdb912c5e63bb43d6e8dd320e9f5613c6237ff (diff) |
[api] Put modules in order in API.{mli,ml}
We sort the dependency graph of API by following a logical declaration
order in `API.{ml,mli}` related to the actual dependency order of Coq
modules.
Things are a bit tricky here as Coq itself relies on the fact that
OCaml treats module interface and implementation separately
dependency-wise; however, when resorting module alias the design seems
to become more coupled.
Currently, API exposes both "namespaces", asserting a large number of
type equality between them, however the `API` namespace is not
self-contained.
In particular, this is a first step to solve problems such as
`Summary.frozen` being used in `API.mli` but not declared by the
`API.Summary` module, etc... In general we follow the invariant that a
type used in `API` must have been declared before.
Keep in mind that OCaml upstream has warned that it maybe tricky to
alias objects in this way. In particular, after API the old `mli` only
files have become full compilation units so we may want to be more
careful here.
The more "correct" declaration order allows us to remove the
`API.Prelude` module, as well as some other declarations that I
consider as spurious.
We still maintain the large number of type aliases which will be
removed in a future patch.
We follow linking order except for files in `intf`, which are
conceptually wrongly placed in the linking hierarchy but this doesn't
matter as the files don't contain any implementation.
We also move a couple of `.mli` only files to `.ml` so we are
consistent, and correct their linking order in `mllib`, even if that
doesn't matter as such `.ml`-only files contain no implementations.
Diffstat (limited to 'proofs/proof_type.ml')
-rw-r--r-- | proofs/proof_type.ml | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/proofs/proof_type.ml b/proofs/proof_type.ml new file mode 100644 index 000000000..11f1a13e6 --- /dev/null +++ b/proofs/proof_type.ml @@ -0,0 +1,28 @@ +(************************************************************************) +(* v * The Coq Proof Assistant / The Coq Development Team *) +(* <O___,, * INRIA - CNRS - LIX - LRI - PPS - Copyright 1999-2017 *) +(* \VV/ **************************************************************) +(* // * This file is distributed under the terms of the *) +(* * GNU Lesser General Public License Version 2.1 *) +(************************************************************************) + +(** Legacy proof engine. Do not use in newly written code. *) + +open Evd +open Names +open Term + +(** This module defines the structure of proof tree and the tactic type. So, it + is used by [Proof_tree] and [Refiner] *) + +type prim_rule = + | Cut of bool * bool * Id.t * types + | Refine of constr + +(** Nowadays, the only rules we'll consider are the primitive rules *) + +type rule = prim_rule + +type goal = Goal.goal + +type tactic = goal sigma -> goal list sigma |