aboutsummaryrefslogtreecommitdiff
path: root/pretyping
AgeCommit message (Collapse)Author
2014-09-06Cleanup code for looking up projection bodies.Matthieu Sozeau
2014-09-05The pretyping of [uconstr] in [refine] uses the identifier of the ltac ↵Arnaud Spiwack
context for goal contexts.
2014-09-05Adds an identifier context in pretying's Ltac context.Arnaud Spiwack
Binder names are interpreted as the Ltac specified one if available.
2014-09-04Proofview refiner is now type-safe by default.Pierre-Marie Pédrot
In order not to be too costly, there is an [unsafe] flag to be set if the tactic does not have to check that the partial proof term is well-typed (to be used with caution though). This patch breaks one [fix]-based example in the refine test-suite, but a huge development like CompCert still goes through.
2014-09-04Typing.sort_of does not leak evarmaps anymore.Pierre-Marie Pédrot
2014-09-04Fix bug #3561, correct folding of env in context[] matching.Matthieu Sozeau
2014-09-04Fix bug #3559, ensuring a canonical order of universe level quantifications whenMatthieu Sozeau
introducing constants (e.g. Top.1 is always before Top.2), compatible with the one used before introduction of hMaps in LMap/LSet.
2014-09-04Print [Variant] types with the keyword [Variant].Arnaud Spiwack
Involves changing the [mind_finite] field in the kernel from a bool to the trivalued type [Decl_kinds.recursivity_kind]. This is why so many files are (unfortunately) affected. It would not be very surprising if some bug was introduced.
2014-09-04Add test-suite file for Case derivation on primitive records.Matthieu Sozeau
2014-09-04Fix bug #3563, making syntactic matching of primitive projectionsMatthieu Sozeau
and their eta-expanded forms succeed, potentially filling parameter metavariables from the type information of the projected object.
2014-09-02Fixing bug #3136.Pierre-Marie Pédrot
Second-order pattern-matching now respect variable abstraction order.
2014-09-01In evarconv, do first-order unification of LetIn's properly, ensuring we ↵Matthieu Sozeau
compare bodies of convertible types! Bug found by B. Ziliani.
2014-08-28Change the way primitive projections are declared to the kernel.Matthieu Sozeau
Now kernel/indtypes builds the corresponding terms (has to be trusted) while translate_constant just binds a constant name to the already entered projection body, avoiding the dubious "check" of user given terms. "case" Pattern-matching on primitive records is now disallowed, and the default scheme is implemented using projections and eta (all elimination tactics now use projections as well). Elaborate "let (x, y) := p in t" using let bindings for the projections of p too.
2014-08-28Fix bugs #3484 and #3546.Matthieu Sozeau
The unification oracle now prefers unfolding the eta-expanded form of a projection over the primitive projection, and allows first-order unification on applications of constructors of primitive records, in case eta-conversion fails (disabled by previous patch on eta).
2014-08-28There are some occurs-check cases that can be handled by imitation (using ↵Matthieu Sozeau
pruning), hence do not entirely prevent solve_simple_eqn in case of apparent occurs-check but backtrack to eqappr on OccurCheck failures (problem found in Ssreflect).
2014-08-28Fixing an unnatural selection of subterms larger than expected in theHugo Herbelin
presence of let-ins.
2014-08-26Debug RAKAMPierre Boutillier
2014-08-26Make evarconv and unification able to handle eta for records in presenceMatthieu Sozeau
of metas/evars
2014-08-26Fix compilation error due to commented code in previous commit by Hugo.Matthieu Sozeau
2014-08-25Fixing bug #3377 by giving env and sigma to constrMathching. Now it's possibleMatthieu Sozeau
to match on a primitive projection application c.(p) using "?f _", binding f to (fun x => x.(p)) with the correct typing.
2014-08-25Fixing the essence of naming bug #3204: use same strategy for namingHugo Herbelin
cases pattern variables than for naming forall/fun binders (but still avoiding constructor names). Note in passing: such as it is implemented, the general strategy is in O(n²) in the number of nested binders, because, when computing the name for each 'fun x => c" (or forall, or a pattern name), the names from the outside c and visibly occurring in c are computed.
2014-08-25instanciation is French, instantiation is EnglishJason Gross
2014-08-25Grammar: "avoiding to" isn't proper, eitherJason Gross
2014-08-22Move UnsatisfiableConstraints to a pretype error.Matthieu Sozeau
2014-08-18Fixing unification of subterms identified by patterns.Hugo Herbelin
2014-08-18Refine patch for behavior of unify_to_subterm to allow backtracking onMatthieu Sozeau
unsatisfiable constraint failures but give sensible error messages if an occurrence was found and only typeclass resolution failed. Fixes MathClasses.
2014-08-14Remove confusing behavior of unify_with_subterm that could fail withMatthieu Sozeau
NoOccurenceFound when only typeclass resolution failed. Might break some scripts relying on backtracking on typeclass resolution failures to find other terms to rewrite, which can be fixed using occurrences or directly setoid_rewrite.
2014-08-14Fix non-printing of coercions for primitive projections (fixes bug #3433).Matthieu Sozeau
2014-08-14Restrict eta-conversion to inductive records, fixing bug #3310.Matthieu Sozeau
2014-08-13Bettre pretty-printing of evar maps, avoids printing universe informationMatthieu Sozeau
for typeclass errors.
2014-08-10Fix bug introduced by earlier commit on first-order unification of primitiveMatthieu Sozeau
projections and their expansion, allowing unfolding when it fails. Cleanup code in reductionops.ml
2014-08-09Fix unification which was failing when unifying a primitive projection againstMatthieu Sozeau
its expansion if it could reduce (fixes bug #3480).
2014-08-09Allow pattern matching on the applied form of projections with primitiveMatthieu Sozeau
applications, solving part of bug #3503.
2014-08-09Do early occur-check in unification to allow eta to fire (fixes bug #3477)Matthieu Sozeau
2014-08-09Using the asymmetric merging primitive in Evd.Pierre-Marie Pédrot
2014-08-09Cleaning up interface of ContextSet.Pierre-Marie Pédrot
Names and arguments were uniformized, and some functions were redesigned to take their typical use-case into account.
2014-08-09Tentative performance fix for Evd.merge_uctx.Pierre-Marie Pédrot
The levels added by the context are in general much fewer than the size of the evarmap, so it is better to add them to the latter rather than doing it the other way around.
2014-08-08Fix evarconv not applying eta when it used to. Fixes bug#3319.Matthieu Sozeau
2014-08-07Better structure for Ltac pretyping environments.Pierre-Marie Pédrot
2014-08-06[uconstr]: use a closure instead of eager substitution.Arnaud Spiwack
This avoids relying on detyping. As Matthieu Sozeau pointed out to me, [understand∘detyping] has no reason to be the identity. This may create surprising behaviour some times (when a detyped term loses its relations to the current context, in particular in terms of universes), and downright incompatibilities in the case of refine. As a bonus this should be a faster implementation of [uconstr] with a leaner memory profile.
2014-08-05Small code simplification.Pierre-Marie Pédrot
2014-08-05A new step in the new "standard" naming policy for propositional hypothesesHugo Herbelin
obtained from case analysis or induction. Made it under experimental status. This replaces commit bf7d2a3ad2535e7d57db79c17c81aaf67d956965 which was acting at the level of logic.ml. Now acting in tactics.ml. Parts of things to be done about naming (not related to Propositions): induction on H:nat+bool produces hypotheses n and b but destruct on H produces a and b. This is because induction takes the dependent scheme whose names are statically inferred to be a and b while destruct dynamically builds a new scheme.
2014-08-03- Fix handling of opaque polymorphic definitions which were turned transparent.Matthieu Sozeau
- Decomment code in reductionops forgotten after debugging.
2014-08-03Move to a representation of universe polymorphic constants using indices for ↵Matthieu Sozeau
variables. Simplifies instantiation of constants/inductives, requiring less allocation and Map.find's. Abstraction by variables is handled mostly inside the kernel but could be moved outside.
2014-08-03- Fix has_undefined_evars not using its or_sorts argument anymore.Matthieu Sozeau
- Allow apply's unification to use conversion even if some polymorphic constants appear in the goal (consistent with occur_meta_or_evar, and evarconv in general).
2014-08-01Continuing (incomplete) cleaning of Inductiveops.Hugo Herbelin
2014-08-01A tentative uniform naming policy in module Inductiveops.Hugo Herbelin
- realargs: refers either to the indices of an inductive, or to the proper args of a constructor - params: refers to parameters (which are common to inductive and constructors) - allargs = params + realargs - realdecls: refers to the defining context of indices or proper args of a constructor (it includes letins) - paramdecls: refers to the defining context of params (it includes letins) - alldecls = paramdecls + realdecls
2014-07-31Add an option to solve typeclass goals generated by apply which can't beMatthieu Sozeau
catched otherwise due to the discrepancy between evars and metas.
2014-07-30Avoid introducing additional universes when doing pruning in evarsolve.Matthieu Sozeau
2014-07-29Rework code for refolding projections in whd_state/whd_simpl to allow ArgumentsMatthieu Sozeau
Specifications indicating that the record object must be a constructor. Fixes bug #3432.