aboutsummaryrefslogtreecommitdiff
path: root/pretyping
AgeCommit message (Collapse)Author
2015-12-02Add an option to deactivate compatibility printing of primitiveMatthieu Sozeau
projections (off by default).
2015-11-27Univs: entirely disallow instantiation of polymorphic constants withMatthieu Sozeau
Prop levels. As they are typed assuming all variables are >= Set now, and this was breaking an invariant in typing. Only one instance in the standard library was used in Hurkens, which can be avoided easily. This also avoids displaying unnecessary >= Set constraints everywhere.
2015-11-25Reverting 1467c225 (Fixing an old typo in Retyping, found by Matej).Hugo Herbelin
This was not a typo (was correctly taking the family type of the type).
2015-11-24Fixing an old typo in Retyping, found by Matej.Hugo Herbelin
2015-11-22Fixing a vm_compute bug in the presence of let-ins among theHugo Herbelin
parameters of an inductive type.
2015-11-22Fixing a bug of adjust_subst_to_rel_context.Hugo Herbelin
2015-11-22Fixing kernel bug in typing match with let-ins in the arity.Hugo Herbelin
Was exploitable in 8.3, 8.4 and 8.5beta1. A priori not exploitable in 8.5beta2 and 8.5beta3 from a Coq file because typing done while compiling "match" would serve as a protection. However exploitable by calling the kernel directly, e.g. from a plugin (but a plugin can anyway do what it wants by bypassing kernel type abstraction). Fixing similar error in pretyping.
2015-11-19Fix bug #4433, removing hack on evars appearing in a pattern from aMatthieu Sozeau
constr, and the associated signature, not needed anymore. Update CHANGES, no evar_map is produced by pattern_of_constr anymore.
2015-11-17Performance fix for destruct.Pierre-Marie Pédrot
The clenv_fchain function was needlessly merging universes coming from two evarmaps even though one was an extension of the other. A flag was added so that the tactic just retrieves the newer universes.
2015-11-11Ensure that conversion is called on terms of the same type inMatthieu Sozeau
unification (not necessarily preserved due to the fo approximation rule).
2015-11-11Fix bug #3998: when using typeclass resolution for conversion, allowMatthieu Sozeau
only one disjoint component of the typeclasses instances to resolve.
2015-11-11Fix bug #4293: ensure let-ins do not contain algebraic universes inMatthieu Sozeau
their type annotation.
2015-11-09Pushing the backtrace in conversion anomalies.Pierre-Marie Pédrot
2015-11-04Univs: missing checks in evarsolve with candidates and missing aMatthieu Sozeau
whd_evar in refresh_universes.
2015-11-04Univs: update refman, better printers for universe contexts.Matthieu Sozeau
2015-11-04Univs: compatibility with 8.4.Matthieu Sozeau
When refreshing a type variable, always use a rigid universe to force the most general universe constraint, as in 8.4.
2015-11-02Fix bug #4151: discrepancy between exact and eexact/eassumption.Matthieu Sozeau
2015-11-02Refresh rigid universes as well, and in 8.4 compatibility mode,Matthieu Sozeau
make them rigid to disallow minimization.
2015-10-29Handle side-effects of Vernacular commands inside proofs better, so thatMatthieu Sozeau
universes are declared correctly in the enclosing proofs evar_map's.
2015-10-28Univs: local names handling.Matthieu Sozeau
Keep user-side information on the names used in instances of universe polymorphic references and use them for printing.
2015-10-28Avoid type checking private_constants (side_eff) again during Qed (#4357).Enrico Tassi
Side effects are now an opaque data type, called private_constant, you can only obtain from safe_typing. When add_constant is called on a definition_entry that contains private constants, they are either - inlined in the main proof term but not re-checked - declared globally without re-checking them As a safety measure, the opaque data type contains a pointer to the revstruct (an internal field of safe_env that changes every time a new constant is added), and such pointer is compared with the current value store in safe_env when the private_constant is inlined. Only when the comparison is successful the private_constant is not re-checked. Otherwise else it is. In short, we accept into the kernel private constant only when they arrive in the very same order and on top of the very same env they arrived when we fist checked them. Note: private_constants produced by workers never pass the safety measure (the revstruct pointer is an Ephemeron). Sending back the entire revstruct is possible but: 1. we lack a way to quickly compare two revstructs, 2. it can be large.
2015-10-28Fix bug in native compiler with universe polymorphism.Maxime Dénès
Universe instances for constructors were not always correct, for instance in: [cons _ list (nil _)] with a polymorphic [list] type, [nil] was receiving an empty instance.
2015-10-28Refine Gregory Malecha's patch on VM and universe polymorphism.Maxime Dénès
- Universes are now represented in the VM by a structured constant containing the global levels. This constant is applied to local level variables if any. - When reading back a universe, we perform the union of these levels and return a [Vsort]. - Fixed a bug: structured constants could contain local universe variables in constructor arguments, which has to be prevented. Was showing up for instance when evaluating [cons _ list (nil _)] with a polymorphic [list] type. - Fixed a bug: polymorphic inductive types can have an empty stack. Was showing up when evaluating [bool] with a polymorphic [bool] type. - Made a few cosmetic changes. Patch written with Benjamin Grégoire.
2015-10-28Conversion of polymorphic inductive types was incomplete in VM and native.Maxime Dénès
Was showing up when comparing e.g. prod Type Type with prod Type Type (!) with a polymorphic prod.
2015-10-28Adds support for the virtual machine to perform reduction of universe ↵Gregory Malecha
polymorphic definitions. - This implementation passes universes in separate arguments and does not eagerly instanitate polymorphic definitions. - This means that it pays no cost on monomorphic definitions.
2015-10-28Revert "Fixing #4198 (continued): not matching within the inner lambdas/let-ins"Hugo Herbelin
After all, let's target 8.6.
2015-10-26Documenting a bit more interpretation functions in passing.Hugo Herbelin
2015-10-20Fix lemma-overloadingMatthieu Sozeau
Update the evar_source of the solution evar in evar/evar problems to propagate the information that it does not necessarily have to be solved in Program mode.
2015-10-19Do occur-check w.r.t existential's types also when instantiating an evar.Matthieu Sozeau
2015-10-18Using "__" rather than this unelegant arbitrary "A" for the name of ↵Hugo Herbelin
variables of the context of an evar in debugging mode.
2015-10-18Fixing #4198 (continued): not matching within the inner lambdas/let-insHugo Herbelin
of the return clause and of the branches (what assumed that the implementation preserves the invariant that the return predicate and the branches are in canonical [fun Δ => t] form, with Δ possibly containing let-ins).
2015-10-18Using appropriate lambda decomposition function counting let-ins whenHugo Herbelin
dealing with "match". Contrastingly, "fix" is considered not to count let-ins for finding the recursive argument (which is ok because the last argument is necessarily a lambda).
2015-10-15Avoid dependency of the pretyper on C code.Maxime Dénès
Using the same hack as in the kernel: VM conversion is a reference to a function, updated when modules using C code are actually linked. This hack should one day go away, but always linking C code may produce some other trouble (with the OCaml debugger for instance), so better be safe for now.
2015-10-15 Fix #4346 2/2: VM casts were not inferring universe constraints.Maxime Dénès
2015-10-15Fix #4346 1/2: native casts were not inferring universe constraints.Maxime Dénès
2015-10-14Occur-check in evar_define was not strong enough.Matthieu Sozeau
2015-10-14Fix constr_matching when a match is found in the head of a case constructMatthieu Sozeau
2015-10-14Fixing evarmap implementation.Pierre-Marie Pédrot
2015-10-13Fix some typos.Guillaume Melquiond
2015-10-12Fix rechecking of applications: it can be given ill-typed terms. Fixes ↵Matthieu Sozeau
math-classes.
2015-10-11Fixing untimely unexpected warning "Collision between bound variables" (#4317).Hugo Herbelin
Collecting the bound variables is now done on the glob_constr, before interpretation, so that only variables given explicitly by the user are used for binding bound variables.
2015-10-11Refining 0c320e79ba30 in fixing interpretation of constr under bindersHugo Herbelin
which was broken after it became possible to have binding names themselves bound to ltac variables (2fcc458af16b). Interpretation was corrected, but error message was damaged.
2015-10-11Fixing obviously untested fold_glob_constr and iter_glob_constr.Hugo Herbelin
2015-10-11Constr_matching: renaming misleading name stk into ctx.Hugo Herbelin
2015-10-09Code cleaning in VM (with Benjamin).Maxime Dénès
Rename some functions, remove dead code related to (previously deprecated, now removed) option Set Boxed Values.
2015-10-09Fix inference of return clause raising a type error.Matthieu Sozeau
2015-10-08Univs: fix bug #3807Matthieu Sozeau
Add a flag to disallow minimization to set
2015-10-08Univs: fix bug #4161.Matthieu Sozeau
Retypecheck abstracted infered predicate to register the right universe constraints.
2015-10-07Univs: fix FingerTree contrib.Matthieu Sozeau
Let merge_context_set be lenient when merging the context of side effects of an entry from solve_by_tac.
2015-10-07Univs: add Strict Universe Declaration option (on by default)Matthieu Sozeau
This option disallows "declare at first use" semantics for universe variables (in @{}), forcing the declaration of _all_ universes appearing in a definition when introducing it with syntax Definition/Inductive foo@{i j k} .. The bound universes at the end of a definition/inductive must be exactly those ones, no extras allowed currently. Test-suite files using the old semantics just disable the option.