aboutsummaryrefslogtreecommitdiff
path: root/pretyping
AgeCommit message (Collapse)Author
2016-06-15Allow `Pretyping.search_guard` to not check guardArnaud Spiwack
This is a minimal modification to the pretyping interface which allows for toplevel fixed points to be accepted by the pretyper. Toplevel co-fixed points are accepted without this. However (co-)fixed point _nested_ inside a `Definition` or a `Fixpoint` are always checked for guardedness by the pretyper.
2016-06-14Assume totality: dedicated type rather than boolArnaud Spiwack
The rational is that 1. further typing flags may be available in the future 2. it makes it easier to trace and document the argument
2016-04-05Revert "Prevent pretyping from checking well-guardedness unnecessarily."Arnaud Spiwack
This reverts commit 9f4e67a7c9f22ca853e76f4837a276a6111bf159.
2015-09-25Prevent pretyping from checking well-guardedness unnecessarily.Arnaud Spiwack
The `search_guard` function is called to infer the recursive argument of fixpoints. For each potential argument, it tests whether it is called structurally, calling the kernel test. When a single argument is available either because `{struct x}` was specified, or because there is a single inductive argument, the kernel test is performed, despite the fact that the kernel will do it later, and the kernel error reraised. It is unnecessary.
2015-06-26Add a flag to deactivate guard checking in the kernel.Arnaud Spiwack
2015-06-22Merge remote-tracking branch 'forge/v8.5'Pierre Boutillier
2015-06-08Make normalization of primitive projections in native_compute the same as ↵Maxime Dénès
with other reduction machines.
2015-06-01Merge branch 'v8.5'Pierre-Marie Pédrot
2015-05-28Fixup for 866c41bEnrico Tassi
2015-05-27Fix bug #4159Matthieu Sozeau
Some asynchronous constraints between initial universes and the ones at the end of a proof were forgotten. Also add a message to print universes indicating if all the constraints are processed already or not.
2015-05-19Adding an extensible global state to evarmaps.Pierre-Marie Pédrot
Evars already had their own extensible state, but adding it globally allows to write out extensible state-passing code in e.g. plugins. The additional data is hopefully transparently preserved by the code out there. Trespassers ought to be prosecuted.
2015-05-15Make Coercion.inh_app_fun respect its specification.Pierre-Marie Pédrot
It enhances bug #3527, as instead of raising an anomaly "Uncaught exception Coercion.NoCoercion(_)", it now fails with a typing error.
2015-05-15Merge v8.5 into trunkHugo Herbelin
Conflicts: tactics/eauto.ml4 (merging eauto.ml4 and adapting coq_micromega.ml to new typing.ml API)
2015-05-14Disable precompilation for native_compute by default.Guillaume Melquiond
Note that this does not prevent using native_compute, but it will force on-the-fly recompilation of dependencies whenever it is used. Precompilation is enabled for the standard library, assuming native compilation was enabled at configuration time. If native compilation was disabled at configuration time, native_compute falls back to vm_compute. Failure to precompile is a hard error, since it is now explicitly required by the user.
2015-05-13Safer typing primitives.Pierre-Marie Pédrot
Some functions from pretyping/typing.ml and their derivatives were potential source of evarmap leaks, as they dropped their resulting evarmap. This commit clarifies the situation by renaming them according to a unsafe_* scheme. Their sound variant is likewise renamed to their old name. The following renamings were made. - Typing.type_of -> unsafe_type_of - Typing.e_type_of -> type_of - A new e_type_of function that matches the e_ prefix policy - Tacmach.pf_type_of -> pf_unsafe_type_of - A new safe pf_type_of function. All uses of unsafe_* functions should be eventually eliminated.
2015-05-13Fix for a second avatar of bug #4234.Pierre-Marie Pédrot
2015-05-13Better fixing #4198 such that the term to match is looked for beforeHugo Herbelin
the predicate, thus respecting the visual left-to-right top-down order (see a45bd5981092). This fixes CFGV.
2015-05-12Fixing bug #4234.Pierre-Marie Pédrot
2015-05-10Code factorization in Constr_matching.Pierre-Marie Pédrot
2015-05-05Merge branch 'v8.5'Pierre-Marie Pédrot
2015-04-23Remove almost all the uses of string concatenation when building error messages.Guillaume Melquiond
Since error messages are ultimately passed to Format, which has its own buffers for concatenating strings, using concatenation for preparing error messages just doubles the workload and increases memory pressure.
2015-04-22Tactical `progress` compares term up to potentially equalisable universes.Arnaud Spiwack
Followup of: f7b29094fe7cc13ea475447bd30d9a8b942f0fef . In particular, re-closes #3593. As a side effect, fixes an undiscovered bug of the `eq_constr` tactic which didn't consider terms up to evar instantiation.
2015-04-22Fixing non exhaustive pattern-matching.Hugo Herbelin
2015-04-21Fixing #4198 (looking for subterms also in the return clause of match).Hugo Herbelin
This is actually not so perfect because of the lambdas in the return clause which we would not like to look in.
2015-04-21Fixing #3383 (a "return" clause without an "in" clause is not enoughHugo Herbelin
for being able to interpret a "match" as a constr pattern).
2015-04-21Some dead code.Hugo Herbelin
2015-04-15Merge branch 'v8.5'Pierre-Marie Pédrot
2015-04-09Really fix constr_of_pattern and bugs #3590 and #4120 byMatthieu Sozeau
removing all evars appearing in the constr (or their types, recursively) from the evar_map.
2015-04-09Remove evars in the type of _unnammed_ metas in pattern_of_constr (fixes ↵Matthieu Sozeau
QuicksortComplexity).
2015-03-30Merge branch 'v8.5' into trunkEnrico Tassi
2015-03-29Ensuring more invariants in Constr_matching.Pierre-Marie Pédrot
2015-03-29Fixing bug #4165.Pierre-Marie Pédrot
The context matching function was dropping the surrounding context in let-ins.
2015-03-27use a more compact representation of non-constant constructorsBenjamin Gregoire
for which there corresponding tag are greater than max_variant_tag. The code is a merge with the patch proposed by Bruno on github barras/coq commit/504c753d7bb104ff4453fa0ede21c870ae2bb00c
2015-03-26Fix bug 4157,Benjamin Gregoire
change the representation of inductive constructor when there is too many non constant constructors in the inductive type Conflicts: kernel/cbytegen.ml
2015-03-25Fully fixing bug #3491 (anomaly when building _rect scheme in theHugo Herbelin
presence of let-ins and recursively non-uniform parameters). The bug was in the List.chop of Inductiveops.get_arity which was wrong in the presence of let-ins and recursively non-uniform parameters. The bug #3491 showed up because, in addition to have let-ins, it was wrongly detected as having recursively non-uniform parameters. Also added some comments in declarations.mli.
2015-03-25Use kernel names instead of user names when looking for coercions. (Fix for ↵Guillaume Melquiond
bug #4133) Note that, if someone was purposely modifying the user name of a type in order to disable a coercion, it no longer works. Hopefully, no one did.
2015-03-24Fixing equality of notation_constrs. Fixes bug #4136.Pierre-Marie Pédrot
2015-03-17Add function to fix the non-substituted universe variables of an evar_map.Matthieu Sozeau
2015-03-04Merge branch 'v8.5'Pierre-Marie Pédrot
2015-03-04Fix bug #3532, providing universe inconsistency information when aMatthieu Sozeau
unification fails due to that, during a conversion step.
2015-03-03Fix bug #3590, keeping evars that are not turned into named metas byMatthieu Sozeau
pattern_of_constr in an evar_map, as they can appear in the context of said named metas, which is used by change. Not sure what to do in the PEvar case, which never matches anyway according to Constr_matching.matches.
2015-03-03Fix bug #4103: forgot to allow unfolding projections of cofixpoints likeMatthieu Sozeau
cases, in some cases.
2015-03-03Fix bug #4101, noccur_evar's expand_projection can legitimately failMatthieu Sozeau
when called from w_unify, so we protect it.
2015-03-03Fix bug introduced by my last commit, forgetting to adjust de BruijnMatthieu Sozeau
index lookup.
2015-03-02Fix bug #4097.Matthieu Sozeau
2015-02-28Merge branch 'v8.5'Pierre-Marie Pédrot
2015-02-27Taking current env and not global env in b286c9f4f42f (4 commits ago,Hugo Herbelin
as revealed by #2141).
2015-02-27simpl: honor Global for "simpl: never" (Close: 3206)Enrico Tassi
It was an integer overflow! All sorts of memories.
2015-02-27Add support so that the type of a match in an inductive type with let-inHugo Herbelin
is reduced as if without let-in, when applied to arguments. This allows e.g. to have a head-betazeta-reduced goal in the following example. Inductive Foo : let X := Set in X := I : Foo. Definition foo (x : Foo) : x = x. destruct x. (* or case x, etc. *)
2015-02-27Fixing first part of bug #3210 (inference of pattern-matching returnHugo Herbelin
clause in the presence of let-ins in the arity of inductive type).