aboutsummaryrefslogtreecommitdiff
path: root/library
AgeCommit message (Collapse)Author
2014-09-03Fixing bug #2818.Pierre-Marie Pédrot
Local Ltac definitions do not register their name in the nametab anymore, thus elegantly solving the bug. The tactic body remains accessible from the tactic engine, but the name is rendered meaningless to the userside.
2014-09-02Fix Declaremods.end_library (Closes: #3536)Enrico Tassi
2014-08-30Simplify even further the declaration of primitive projections,Matthieu Sozeau
now done entirely using declare_mind, which declares the associated constants for primitive records. This avoids a hack related to elimination schemes and ensures that the forward references to constants in the mutual inductive entry are properly declared just after the inductive. This also clarifies (and simplifies) the code of term_typing for constants which does not have to deal with building or checking projections anymore. Also fix printing of universes showing the de Bruijn encoding in a few places.
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-25Fix computation of dangling constraints at the end of a proof (bug #3531).Matthieu Sozeau
2014-08-25instanciation is French, instantiation is EnglishJason Gross
2014-08-25Grammar: "avoiding to" isn't proper, eitherJason Gross
2014-08-05Small code simplification.Pierre-Marie Pédrot
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-07-25- Do module substitution inside mind_record.Matthieu Sozeau
- Distinguish between primitive and non-primitive records in the kernel declaration, so as to try eta-conversion on primitive records only.
2014-07-21More straightforward definition of Universes.add_list_map.Pierre-Marie Pédrot
2014-07-21Cleanup substitution inside universe instances, only done through subst_fn now,Matthieu Sozeau
and disable hashconsing of substituted instances which had a huge performance penalty in general. They are hashconsed when put in the environment only now.
2014-07-21Unifying locate code, also making it more powerful: it is now able to findPierre-Marie Pédrot
any prefix of the given qualid.
2014-07-21Adding a new "Locate Term" command, distinct from the raw "Locate" command.Pierre-Marie Pédrot
The new Term version has essentially the same behaviour as the old "Locate", while the new raw searches for all types of objects. Also code merging with the "Locate Ltac". Fixes bug #3380.
2014-07-21More complete printing of Ltac location, akin to the term-dedicated Locate ↵Pierre-Marie Pédrot
command.
2014-07-11Feedback: LoadedFile + GoalsEnrico Tassi
LoadedFile is generated when a .vo is loaded Goals is generated when -feedback-goals
2014-07-03Cleanup code related to the constraint solving, which sits now outside theMatthieu Sozeau
kernel in library/universes.ml.
2014-07-01Add toplevel commands to declare global universes and constraints.Matthieu Sozeau
2014-06-25all coqide specific files moved into ide/Enrico Tassi
lib/interface split into: - lib/feedback subscribe-based feedback bus (also used by coqidetop) - ide/interface definition of coqide protocol messages lib/pp structured info/err/warn messages lib/serialize split into: - lib/serialize generic xml serialization (list, pairs, int, loc, ...) used by coqide but potentially useful to other interfaces - ide/xmlprotocol serialization of protocol messages as in ide/interface the only drawback is that coqidetop needs -thread and I had to pass that option to all files in ide/
2014-06-21When discharging polymorphic definitions, we must take into account allMatthieu Sozeau
polymorphic variables of the section as they might incur universe constraints that were used to typecheck the body of the definition, even if the variable itself was not used. For "Monomorphic" variables, their constraints are already always pushed to the global context. This fixes bug # 3330.
2014-06-20Fixed some HoTT bugs, provide a proper error message when giving an ill-formedMatthieu Sozeau
universe instance.
2014-06-18Proofs now take and return an evar_universe_context, simplifying interfacesMatthieu Sozeau
and avoiding explicit substitutions and merging of contexts, e.g. in obligations.ml. The context produced by typechecking a statement is passed in the proof, allowing the universe name context to be correctly folded as well. Mainly an API cleanup.
2014-06-17Removing dead code.Pierre-Marie Pédrot
2014-06-17- Fix the de Bruijn problem in check_projection for good :)Matthieu Sozeau
- Fix HoTT coq bug #80, implicit arguments with primitive projections were wrongly automatically infered.
2014-06-17Safer entry point of primitive projections in the kernel, now it does recognizeMatthieu Sozeau
a projection constant only of the form λ params (r : I params), match r with BuildR args => args_i end, without any other user input and relies on it being typable (no more primitive projections escaping this).
2014-06-16Checking that a library name is valid before compilation.Pierre-Marie Pédrot
Fixes bug #3333.
2014-06-13Deprecate options -dont, -lazy, -force-load-proofs.Guillaume Melquiond
These options no longer have any impact on the way proofs are loaded. In other words, loading is always lazy, whatever the options. Keeping them just so that coqc dies when the user prints some opaque symbol does not seem worth it.
2014-06-13Less ocaml warnings.Hugo Herbelin
2014-06-10- Fix substitution of universes which needlessly hashconsed existing universes.Matthieu Sozeau
- More cleanup. remove unneeded functions in universes
2014-06-10Cleanup in Univ, moving code for UniverseConstraints outside the kernel in ↵Matthieu Sozeau
Universes. Needed to exponse compare_head_gen(_leq) so that it could be reused in Universes. Remove unused functions from univ as well and refactor a little bit. Changed the syntax to Type@{} for explicit universe level specs, following the WG decision.
2014-06-08ind_tables: always declare side effects (Closes: HOTT#110)Enrico Tassi
declare takes care of ignoring side effects that are available in the global environment. This is yet another instance of what the "abominion" (aka abstract) can do: the code was checking for the existence in the environment of the elimination principle, and not regenerating it (nor declaring the corresponding side effect) if the elimination principle is used twice. Of course to functionalize the imperative actions on the environment when two proofs generated by abstract use the same elim principle, such elim principle has to be inlined twice, once in each abstracted proof. In other words, a side effect generated by a tactic inside an abstract is *global* but will be made local, si it must always be declared, no matter what. Now the system works like this: - side effects are always declared, even if a caching mechanism thinks the constant is already there (it can be there, no need to regenerate it but the intent to generate it *must* be declared anyhow) - at Qed time, we filter the list of side effects and decide which ones are really needed to be inlined. bottom line: STOP using abstract.
2014-06-08Function in Univ uselessly exported.Pierre-Marie Pédrot
2014-06-04- Fix hashing of levels to get the "right" order in universe contexts etc...Matthieu Sozeau
- Add a tentative syntax for specifying universes: Type{"i"} and foo@{Type{"i"},Type{"j"}}. These are always rigid. - Use level-to-level substitutions where the more general level-to-universe substitutions were previously used.
2014-05-22Fix native_compute for systems with a limited size for the command line.Guillaume Melquiond
The call to the native compiler can fail due to the sheer amounts of -I options passed to it. Indeed, it is easy to get the command line to exceed 512KB, thus causing various operating systems to reject it. This commit avoids the issue by only passing the -I options that matter for the currently compiled code. Note that, in the worst case, this commit is still not sufficient on Windows (32KB max), but this worst case should be rather uncommon and thus can be ignored for now. For the record, the command-line size mandated by Posix is 4KB.
2014-05-16Declare: fix Future managementEnrico Tassi
2014-05-15heads: avoid forcing opaque proofsEnrico Tassi
2014-05-11Eliminating a potentially quadratic behaviour in Require, by using mapsPierre-Marie Pédrot
instead of lists to test if a library has already been encountered.
2014-05-06Fix extraction taking a type in the wrong environment.Matthieu Sozeau
Fix restriction of universe contexts to not forget about potentially useful constraints.
2014-05-06Avoid u+k <= v constraints, don't take the sup of an algebraic universe duringMatthieu Sozeau
minimization.
2014-05-06- Add back some compatibility functions to avoid rewriting plugins.Matthieu Sozeau
- Fix in canonical structure inferce, we have to check that the heads are convertible and keep universe information around.
2014-05-06- Fix arity handling in retyping (de Bruijn bug!)Matthieu Sozeau
- Enforce that no u <= Prop/Set can be added for u introduced by the user in Evd.process_constraints. (Needs to be enforced in the kernel as well, but that's the main entry point). - Fix a test-suite script and remove a regression comment, it's just as before now.
2014-05-06Fix restrict_universe_context removing some universes that do appear in the ↵Matthieu Sozeau
term.
2014-05-06Fix restrict_universe_context to not remove useful constraints.Matthieu Sozeau
2014-05-06- Fix bug preventing apply from unfolding Fixpoints.Matthieu Sozeau
- Remove Universe Polymorphism flags everywhere. - Properly infer, discharge template arities and fix substitution inside them (kernel code to check for correctness). - Fix tactics that were supposing universe polymorphic constants/inductives to be parametric on that status. Required to make interp_constr* return the whole evar universe context now. - Fix the univ/level/instance hashconsing to respect the fact that marshalling doesn't preserve sharing, sadly losing most of its benefits. Short-term solution is to add hashes to these for faster comparison, longer term requires rewriting all serialization code. Conflicts: kernel/univ.ml tactics/tactics.ml theories/Logic/EqdepFacts.v
2014-05-06Adapt universe polymorphic branch to new handling of futures for delayed proofs.Matthieu Sozeau
2014-05-06Fix issue #88: restrict_universe_context was wrongly forgetting about ↵Matthieu Sozeau
constraints, and keeping spurious equalities. simplify_universe_context is correct, although it might keep unused universes around (it's the responsibility of the tactics to not produce unused universes then). Add printer for future universe contexts for debugging.
2014-05-06Adapt Y. Bertot's path on private inductives (now the keyword is "Private").Yves Bertot
A quick and dirty approach to private inductive types Types for which computable functions are provided, but pattern-matching is disallowed. This kind of type can be used to simulate simple forms of higher inductive types, with convertibility for applications of the inductive principle to 0-constructors Conflicts: intf/vernacexpr.mli kernel/declarations.ml kernel/declarations.mli kernel/entries.mli kernel/indtypes.ml library/declare.ml parsing/g_vernac.ml4 plugins/funind/glob_term_to_relation.ml pretyping/indrec.ml pretyping/tacred.mli printing/ppvernac.ml toplevel/vernacentries.ml Conflicts: kernel/declarations.mli kernel/declareops.ml kernel/indtypes.ml kernel/modops.ml
2014-05-06- Fix abstract forgetting about new constraints.Matthieu Sozeau
2014-05-06- Fix handling of polymorphic inductive elimination schemes.Matthieu Sozeau
- Avoid generation of dummy universes for unsafe_global* - Handle side effects better for polymorphic definitions. Conflicts: kernel/term_typing.ml tactics/tactics.ml
2014-05-06Fix printing of projections with implicits.Matthieu Sozeau