aboutsummaryrefslogtreecommitdiffhomepage
path: root/pretyping
Commit message (Collapse)AuthorAge
...
* | | | | | | | [api] Move `Vernacexpr` to parsing.Gravatar Emilio Jesus Gallego Arias2018-05-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a few spurious dependencies on the `Vernac` AST in the pretyper, we remove them and move `Vernacexpr` and `Extend` to parsing, where they do belong more.
* | | | | | | | [api] Move `opacity_flag` to `Proof_global`.Gravatar Emilio Jesus Gallego Arias2018-05-23
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Proof_global` is the main consumer of the flag, which doesn't seem to belong to the AST as plugins show. This will allow the vernac AST to be placed in `vernac` indeed.
* | | | | | | Merge PR #7384: Split UniversesGravatar Pierre-Marie Pédrot2018-05-22
|\ \ \ \ \ \ \
* \ \ \ \ \ \ \ Merge PR #6965: [api] Move universe syntax to `Glob_term`Gravatar Pierre-Marie Pédrot2018-05-18
|\ \ \ \ \ \ \ \
| | * | | | | | | Split off Universes functions about substitutions and constraintsGravatar Gaëtan Gilbert2018-05-17
| | | | | | | | |
| | * | | | | | | Split off Universes functions dealing with generating new universes.Gravatar Gaëtan Gilbert2018-05-17
| | | | | | | | |
| | * | | | | | | Split off Universes functions dealing with names.Gravatar Gaëtan Gilbert2018-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This API is a bit strange, I expect it will change at some point.
| | * | | | | | | Stop using Universes.subst(_opt)_univs_constrGravatar Gaëtan Gilbert2018-05-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Should it be removed? The underlying `universe_subst -> constr -> constr` seems like it could be useful for plugins but where would the substitution be from?
| | * | | | | | | Make set minimization option internal to UniversesGravatar Gaëtan Gilbert2018-05-17
| |/ / / / / / / |/| | | | | | |
* | | | | | | | Merge PR #7359: Reduce usage of evar_map referencesGravatar Pierre-Marie Pédrot2018-05-17
|\ \ \ \ \ \ \ \
* \ \ \ \ \ \ \ \ Merge PR #7213: Do not compute constr matching context if not used.Gravatar Matthieu Sozeau2018-05-15
|\ \ \ \ \ \ \ \ \
| | * | | | | | | | Use evd_combX in Cases.Gravatar Gaëtan Gilbert2018-05-14
| | | | | | | | | |
| | * | | | | | | | Typing implementation doesn't use evdref.Gravatar Gaëtan Gilbert2018-05-14
| | | | | | | | | |
| | * | | | | | | | Deprecate Typing.e_* functionsGravatar Gaëtan Gilbert2018-05-14
| | | | | | | | | |
| | * | | | | | | | Typing: define functional alternatives to e_* functionsGravatar Gaëtan Gilbert2018-05-14
| | | | | | | | | |
| | * | | | | | | | set_solve_evars doesn't use an evar_map refGravatar Gaëtan Gilbert2018-05-11
| | | | | | | | | |
| | * | | | | | | | Deprecate Evarconv.e_conv,e_cumulGravatar Gaëtan Gilbert2018-05-11
| | | | | | | | | |
| | * | | | | | | | Deprecate most evarutil evdref functionsGravatar Gaëtan Gilbert2018-05-11
| |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | clear_hyps remain with no alternative
| | * | | | | | | [api] Move universe syntax to `Glob_term`Gravatar Emilio Jesus Gallego Arias2018-05-08
| |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We move syntax for universes from `Misctypes` to `Glob_term`. There is basically no reason that this type is there instead of the proper file, as witnessed by the diff. Unfortunately the change is not compatible due to moving a type to a higher level in the hierarchy, but we expect few problems. This change plus the related PR (#6515) moving universe declaration to their proper place make `Misctypes` into basically an empty file save for introduction patterns.
* | | | | | | | [api] Rename `global_reference` to `GlobRef.t` to follow kernel style.Gravatar Emilio Jesus Gallego Arias2018-05-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In #6092, `global_reference` was moved to `kernel`. It makes sense to go further and use the current kernel style for names. This has a good effect on the dependency graph, as some core modules don't depend on library anymore. A question about providing equality for the GloRef module remains, as there are two different notions of equality for constants. In that sense, `KerPair` seems suspicious and at some point it should be looked at.
* | | | | | | | Merge PR #7338: [api] Move `hint_info_expr` to `Typeclasses`.Gravatar Pierre-Marie Pédrot2018-05-04
|\ \ \ \ \ \ \ \
* | | | | | | | | [api] Move bullets and goals selectors to `proofs/`Gravatar Emilio Jesus Gallego Arias2018-05-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `Vernacexpr` lives conceptually higher than `proof`, however, datatypes for bullets and goal selectors are in `Vernacexpr`. In particular, we move: - `proof_bullet`: to `Proof_bullet` - `goal_selector`: to a new file `Goal_select`
* | | | | | | | | Strict focusing using Default Goal Selector.Gravatar Gaëtan Gilbert2018-04-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We add a [SelectAlreadyFocused] constructor to [goal_selector] (read "!") which causes a failure when there's not exactly 1 goal and otherwise is a noop. Then [Set Default Goal Selector "!".] puts us in "strict focusing" mode where we can only run tactics if we have only one goal or use a selector. Closes #6689.
* | | | | | | | | Merge PR #7358: Fix #7356: missing lift when interpreting default instances ↵Gravatar Enrico Tassi2018-04-27
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of evars
| * | | | | | | | | Pretyping: Fixing a de Bruijn bug in interpreting default instances of evars.Gravatar Hugo Herbelin2018-04-26
| | | | | | | | | |
| | * | | | | | | | [api] Move `hint_info_expr` to `Typeclasses`.Gravatar Emilio Jesus Gallego Arias2018-04-26
| |/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `hint_info_expr`, `hint_info_gen` do conceptually belong to the typeclasses modules and should be able to be used without a dependency on the concrete vernacular syntax.
* / / / / / / / / Always print explanation for univ inconsistency, rm Flags.univ_printGravatar Gaëtan Gilbert2018-04-26
|/ / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the Flags.univ_print in the kernel, making it possible to put the univ printing flag ownership back in Detyping. The lazyness is because getting an explanation may be costly and we may discard it without printing. See benches - with lazy https://ci.inria.fr/coq/view/benchmarking/job/benchmark-part-of-the-branch/406/console - without lazy https://ci.inria.fr/coq/view/benchmarking/job/benchmark-part-of-the-branch/405/console Notably without lazy mathcomp odd_order is +1.26% with some lines showing significant changes, eg PFsection11 line 874 goes from 11.76s to 13.23s (+12%). (with lazy the same development has -1% overall and the same line goes from 11.76s to 11.23s (-4%) which may be within noise range)
* | | | | | | | [api] Relocate `intf` modules according to dependency-order.Gravatar Emilio Jesus Gallego Arias2018-04-23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In a component-based source code organization of Coq `intf` doesn't fit very well, as it sits in bit of "limbo" between different components, and indeed, encourages developers to place types in sometimes random places wrt the hierarchy. For example, lower parts of the system reference `Vernacexpr`, which morally lives in a pretty higher part of the system. We move all the files in `intf` to the lowest place their dependencies can accommodate: - `Misctypes`: is used by Declaremod, thus it has to go in `library` or below. Ideally, this file would disappear. - `Evar_kinds`: it is used by files in `engine`, so that seems its proper placement. - `Decl_kinds`: used in `library`, seems like the right place. [could also be merged. - `Glob_term`: belongs to pretyping, where it is placed. - `Locus`: ditto. - `Pattern`: ditto. - `Genredexpr`: depended by a few modules in `pretyping`, seems like the righ place. - `Constrexpr`: used in `pretyping`, the use is a bit unfortunate and could be fixed, as this module should be declared in `interp` which is the one eliminating it. - `Vernacexpr`: same problem than `Constrexpr`; this one can be fixed as it contains stuff it shouldn't. The right place should be `parsing`. - `Extend`: Is placed in `pretyping` due to being used by `Vernacexpr`. - `Notation_term`: First place used is `interp`, seems like the right place. Additionally, for some files it could be worth to merge files of the form `Foo` with `Foo_ops` in the medium term, as to create proper ADT modules as done in the kernel with `Name`, etc...
* | | | | | | | Evar maps contain econstrs.Gravatar Gaëtan Gilbert2018-04-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We bootstrap the circular evar_map <-> econstr dependency by moving the internal EConstr.API module to Evd.MiniEConstr. Then we make the Evd functions use econstr.
* | | | | | | | Merge PR #6454: [econstr] Flag to make `to_constr` fail if its output ↵Gravatar Pierre-Marie Pédrot2018-04-13
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | contains evars
* \ \ \ \ \ \ \ \ Merge PR #6972: [api] Deprecate a couple of aliases that we missed.Gravatar Maxime Dénès2018-04-12
|\ \ \ \ \ \ \ \ \
| | | | * | | | | | Replace uses of Termops.dependent by more specific functions.Gravatar Pierre-Marie Pédrot2018-04-10
| |_|_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is more efficient in general, because Termops.dependent doesn't take advantage of the knowledge of its pattern argument.
| | | * | | | | | Do not compute constr matching context if not used.Gravatar Pierre-Marie Pédrot2018-04-10
| |_|/ / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | This mitigates bug #6860.
| | | | | * | | Fixes #7195 (missing freshness condition in Ltac pattern-matching names).Gravatar Hugo Herbelin2018-04-08
| |_|_|_|/ / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We ensure that all original names in a spine of matched nested binders are distinct. Note: This enforces that two binders with same internal names are kept disjoint but this does not enforce that we shall respect names exactly as they are printed. Only the original prefix of the internal names are preserved, not their "0" or "1" etc. suffix.
| | | | * | | Fix #5539: algebraic universe produced by cases.Gravatar Gaëtan Gilbert2018-04-06
| |_|_|/ / / |/| | | | |
* | | | | | Merge PR #7106: Supporting fix and cofix in Ltac pattern-matching (wish #7092)Gravatar Pierre-Marie Pédrot2018-04-01
|\ \ \ \ \ \
| | | * | | | [econstr] Forbid calling `to_constr` in open terms.Gravatar Emilio Jesus Gallego Arias2018-03-31
| |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We forbid calling `EConstr.to_constr` on terms that are not evar-free, as to progress towards enforcing the invariant that `Constr.t` is evar-free. [c.f. #6308] Due to compatibility constraints we provide an optional parameter to `to_constr`, `abort` which can be used to overcome this restriction until we fix all parts of the code. Now, grepping for `~abort:false` should return the questionable parts of the system. Not a lot of places had to be fixed, some comments: - problems with the interface due to `Evd/Constr` [`Evd.define` being the prime example] do seem real! - inductives also look bad with regards to `Constr/EConstr`. - code in plugins needs work. A notable user of this "feature" is `Obligations/Program` that seem to like to generate kernel-level entries with free evars, then to scan them and workaround this problem by generating constants.
| * | | | | Supporting fix/cofix in Ltac pattern-matching (wish #7092).Gravatar Hugo Herbelin2018-03-28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is done by not failing for fix/cofix while translating from glob_constr to constr_pattern.
| * | | | | Patterns: Accepting patterns in PFix and PCofix and not only constr.Gravatar Hugo Herbelin2018-03-28
| | | | | |
| * | | | | Detyping: Adding a variant of share_names for patterns.Gravatar Hugo Herbelin2018-03-28
| | | | | |
| * | | | | Detyping: Making detype_fix/detype_cofix polymorphic combinator (step 1).Gravatar Hugo Herbelin2018-03-28
| | | | | |
| * | | | | Patternops: renaming an internal function to more closely match its effect.Gravatar Hugo Herbelin2018-03-28
| | | | | |
| * | | | | Glob_ops: cosmetic renaming to reflect the type of objects.Gravatar Hugo Herbelin2018-03-28
| | | | | |
| | | | * | Getting rid of some false "collision between bound variable names" warnings.Gravatar Hugo Herbelin2018-03-28
| | |_|/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - In a situation like "match x with ... end" with no "return" clause we don't warn for the implicit "as x" coming from repeating "x" - In a multiple fixpoint, we don't warn for the recursive context being distributed several times over the different mutual components.
| | * | | [api] Deprecate a couple of aliases that we missed.Gravatar Emilio Jesus Gallego Arias2018-03-28
| |/ / / |/| | |
| | | * Fixing #5547 (typability of return predicate in nested pattern-matching).Gravatar Hugo Herbelin2018-03-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Answering to commit about #5500: we don't know in general if the return predicate T(y1,..,yn,x) in the intermediate step of a nested pattern-matching is a sort, but we don't even know if it is well-typed: retyping is not enough, we need full typing.
| | | * Fixing #5500 (missing test in return clause of match leading to anomaly).Gravatar Hugo Herbelin2018-03-27
| | |/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a quick fix to check in nested pattern-matching that the return clause is typed by an arity (there was already a check when the return clause was given explicitly - in the 3rd section of prepare_predicate -; it was automatically typed by a sort when the return clause was coming by pattern-matching with the type constraint, since the type constraint is a type; but it was not done when the predicate was derived from a former predicate in nested pattern-matching). Indeed, in nested pattern-matching, we know that the return predicate has the form λy1..yn.λx:I(y1,..,yn).T(y1,..,yn,x) and we know that T(v1,...,vn,u) : Type for the effective u:I(v1,..,vn) we are matching on, but we don't know if T(y1,..,yn,x) is itself a sort (e.g. it can be a "match" which reduces to a sort when instantiated with v1..vn, but whose evaluation remains blocked when the y1..yn are variables). Note that in the bug report, the incorrect typing is produced by small inversion. In practice, we can raise the anomaly also without small inversion, so we fix it in the general case. See file 5500.v for details.
| | * Fixes #7011 (Fix/CoFix were not considered in tactic unification).Gravatar Hugo Herbelin2018-03-26
| |/
* / Slightly refining some error messages about unresolvable evars.Gravatar Hugo Herbelin2018-03-24
|/ | | | For instance, error in "Goal forall a f, f a = 0" is now located.
* [located] Push inner locations in `reference` to a CAst.t node.Gravatar Emilio Jesus Gallego Arias2018-03-09
| | | | | | | | | | | | | | The `reference` type contains some ad-hoc locations in its constructors, but there is no reason not to handle them with the standard attribute container provided by `CAst.t`. An orthogonal topic to this commit is whether the `reference` type should contain a location or not at all. It seems that many places would become a bit clearer by splitting `reference` into non-located `reference` and `lreference`, however some other places become messier so we maintain the current status-quo for now.