aboutsummaryrefslogtreecommitdiffhomepage
path: root/toplevel
Commit message (Collapse)AuthorAge
* [pp] Move terminal-specific tagging to the toplevel.Gravatar Emilio Jesus Gallego Arias2017-03-21
| | | | | | | | Previously, tags were associated to terminal styles, which doesn't make sense on terminal-free pretty printing scenarios. This commit moves tag interpretation to the toplevel terminal handling module `Topfmt`.
* [pp] Remove special tag type and handler from Pp.Gravatar Emilio Jesus Gallego Arias2017-03-21
| | | | | | | | | | | | | For legacy reasons, pretty printing required to provide a "tag" interpretation function `pp_tag`. However such function was not of much use as the backends (richpp and terminal) hooked at the `Format.tag` level. We thus remove this unused indirection layer and annotate expressions with their `Format` tags. This is a step towards moving the last bit of terminal code out of the core system.
* [pp] Make feedback the only logging mechanism.Gravatar Emilio Jesus Gallego Arias2017-03-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously to this patch, Coq featured to distinct logging paths: the console legacy one, based on `Pp.std_ppcmds` and Ocaml's `Format` module, and the `Feedback` one, intended to encapsulate message inside a more general, GUI-based feedback protocol. This patch removes the legacy logging path and makes feedback canonical. Thus, the core of Coq has no dependency on console code anymore. Additionally, this patch resolves the duplication of "document" formats present in the same situation. The original console-based printing code relied on an opaque datatype `std_ppcmds`, (mostly a reification of `Format`'s format strings) that could be then rendered to the console. However, the feedback path couldn't reuse this type due to its opaque nature. The first versions just embedded rending of `std_ppcmds` to a string, however in 8.5 a new "rich printing" type, `Richpp.richpp` was introduced. The idea for this type was to be serializable, however it brought several problems: it didn't have proper document manipulation operations, its format was overly verbose and didn't preserve the full layout, and it still relied on `Format` for generation, making client-side rendering difficult. We thus follow the plan outlined in CEP#9, that is to say, we take a public and refactored version of `std_ppcmds` as the canonical "document type", and move feedback to be over there. The toplevel now is implemented as a feedback listener and has ownership of the console. `richpp` is now IDE-specific, and only used for legacy rendering. It could go away in future versions. `std_ppcmds` carries strictly more information and is friendlier to client-side rendering and display control. Thus, the new panorama is: - `Feedback` has become a very module for event dispatching. - `Pp` contains a target-independent box-based document format. It also contains the `Format`-based renderer. - All console access lives in `toplevel`, with console handlers private to coqtop. _NOTE_: After this patch, many printing parameters such as printing width or depth should be set client-side. This works better IMO, clients don't need to notify Coq about resizing anywmore. Indeed, for box-based capable backends such as HTML or LaTeX, the UI can directly render and let the engine perform the word breaking work. _NOTE_: Many messages could benefit from new features of the output format, however we have chosen not to alter them to preserve output. A Future commits will move console tag handling in `Pp_style` to `toplevel/`, where it logically belongs. The only change with regards to printing is that the "Error:" header was added to console output in several different positions, we have removed some of this duplication, now error messages should be a bit more consistent.
* [error] Move back fatal_error to toplevelGravatar Emilio Jesus Gallego Arias2017-03-21
| | | | | | | | | | | This reverts 4444768d3f4f9c4fcdd440f7ab902886bd8e2b09 (the mllib dependencies that should be surely tweaked more). The logic for `fatal_error` has no place in `CErrors`, this is coqtop-specific code. What is more, a libobject caller should handle the exception correctly, I fail to see why the fix was needed on the first place.
* [pp] Prepare for serialization, remove opaque glue.Gravatar Emilio Jesus Gallego Arias2017-03-21
| | | | | We also remove flushing operations `msg_with`, now the flushing responsibility belong to the owner of the formatter.
* [pp] Replace `Pp.Tag` by `Ppstyle.tag` = `string list`Gravatar Emilio Jesus Gallego Arias2017-03-21
| | | | | | | | This is what has always been used, so it doesn't represent a functional change. This is just a preliminary patch, but many more possibilities could be done wrt tags.
* [safe_string] toplevel/vernacGravatar Emilio Jesus Gallego Arias2017-03-14
| | | | | No functional changes, only a minor copy on a deprecated output option.
* [safe_string] toplevel/coqloopGravatar Emilio Jesus Gallego Arias2017-03-14
| | | | | No functional change, even if we could optimize `blanch_utf8_string` a bit more by using `String.init`.
* Ltac as a plugin.Gravatar Pierre-Marie Pédrot2017-02-17
| | | | | | | This commit is essentially moving files around. In particular, the corresponding plugin still relies on a mllib file rather than a mlpack one. Otherwise, this causes link-time issues for third-party plugins depending on modules defined in the Ltac plugin.
* [stm] Break stm/toplevel dependency loop.Gravatar Emilio Jesus Gallego Arias2017-02-15
| | | | | | | | | | | | | | | | | | Currently, the STM, vernac interpretation, and the toplevel are intertwined in a mutual dependency that needs to be resolved using imperative callbacks. This is problematic for a few reasons, in particular it makes the interpretation of commands that affect the document quite intricate. As a first step, we split the `toplevel/` directory into two: "pure" vernac interpretation is moved to the `vernac/` directory, on which the STM relies. Test suite passes, and only one command seems to be disabled with this approach, "Show Script" which is to my understanding obsolete. Subsequent commits will fix this and refine some of the invariants that are not needed anymore.
* [safe-string] Switch to buffer to `Bytes`Gravatar Emilio Jesus Gallego Arias2017-02-14
|
* Merge PR#253: Sort Search results by relevanceGravatar Maxime Dénès2017-02-14
|\
* | Type cleanup in `Metasyntax`Gravatar Emilio Jesus Gallego Arias2017-02-07
| | | | | | | | | | | | | | | | | | | | Types were a bit difficult to read as they were mostly based on anonymous products, this commit replaces them by named records and refactors out some imperative code. There is still quite a bit of room for improvement, but at least the records provide a basis for more fine-grained understanding and documentation.
* | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2017-02-01
|\ \
| * | Fix bug #5262: Error should tell me which name is duplicated.Gravatar Pierre-Marie Pédrot2017-01-28
| | |
| * | Merge branch 'v8.5' into v8.6Gravatar Pierre-Marie Pédrot2017-01-23
| |\ \
* | | | Adding a new evar source to remember the name of evars which wereGravatar Hugo Herbelin2017-01-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | named in the original term. Useful at least for debugging, useful to give a better message than "this placeholder", even if in the loc is known in this case.
* | | | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2017-01-19
|\| | |
| * | | Fixing (part of) #5303 (clarifications around Record/Structure/Variant).Gravatar Hugo Herbelin2017-01-16
| | | | | | | | | | | | | | | | | | | | | | | | - We fix the inconsistency of Structure and Record which according to doc are the same. - We improve the error message when not using { ... } for Record or Structure.
| | * | Fix some documentation typos.Gravatar Guillaume Melquiond2016-12-26
| | | |
| | * | Excluding explicitly coinductive types in Scheme Equality (#5284).Gravatar Hugo Herbelin2016-12-23
| | | |
* | | | Fixing #5277 (Scheme Equality not robust wrt choice of names).Gravatar Hugo Herbelin2016-12-22
| | | | | | | | | | | | | | | | This is only a quick fix, as hinted by Jason.
| | * | Fixing anomaly EqUnknown in Equality Scheme (#5278).Gravatar Hugo Herbelin2016-12-22
| | | |
* | | | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2016-12-07
|\| | |
| * | | Merge remote-tracking branch 'github/pr/366' into v8.6Gravatar Maxime Dénès2016-12-04
| |\ \ \ | | | | | | | | | | | | | | | Was PR#366: Univs: fix bug 5208
| * | | | Comment on universe handling in ParametersGravatar Matthieu Sozeau2016-12-02
| | | | |
| * | | | Univs: fix bug #5188Gravatar Matthieu Sozeau2016-12-02
| | | | | | | | | | | | | | | | | | | | | | | | | Parameter was implemented the wrong way trying to separate the universes of the telescope.
* | | | | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2016-11-30
|\| | | |
| | * | | Fix UGraph.check_eq!Gravatar Matthieu Sozeau2016-11-30
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Universes are kept in normal form w.r.t. equality but not the <= relation, so the previous check worked almost always but was actually too strict! In cases like (max(Set,u) = u) when u is declared >= Set it was failing to find an equality. Applying the KISS principle: u = v <-> u <= v /\ v <= u. Fix invariant breakage that triggered the discovery of the check_eq bug as well. No algebraic universes should appear in a term position (on the left of a colon in a typing judgment), this was not the case when an algebraic universe instantiated an evar that appeared in the term. We force their universe variable status to change in refresh_universes to avoid this. Fix ind sort inference: Use syntactic universe equality for inductive sort inference instead of check_leq (which now correctly takes constraints into account) and simplify code
| * | | Fix some documentation typos.Gravatar Guillaume Melquiond2016-11-24
| | | | | | | | | | | | | | | | | | | | Note: "dependant" does exist, but it is a noun and it means a person that is somehow financially dependent on someone else.
| * | | Stop parsing -compat-notations options, which are no longer supported (bug ↵Gravatar Guillaume Melquiond2016-11-21
| | | | | | | | | | | | | | | | #3339).
* | | | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2016-11-18
|\| | |
| * | | Revert "Merge remote-tracking branch 'github/pr/360' into v8.6"Gravatar Maxime Dénès2016-11-18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit b00e039b957b8428c21faec5c76f3a3484cde2cf, reversing changes made to ca9e00ff9b2a8ee17430398a5e0bef2345c39341. It turns out that calling from fake_ide the STM commands that were removed by this PR requires an extension of the XML protocol. So postponing the integration.
| * | | [stm] Remove STM-related vernacularsGravatar Emilio Jesus Gallego Arias2016-11-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I think these commands never make a lot of sense on scripts other than debugging and we have better methods now. The last remaining command, used for the tty emulation has been renamed to VtBack, but it should go away at some point too once the legacy interfaces are removed.
| * | | Fix bug in warnings: -w foo was silent when foo did not exist.Gravatar Maxime Dénès2016-11-14
| | | |
| * | | Do not mention "none" in warnings doc, as it is there for compatibility.Gravatar Maxime Dénès2016-11-14
| | | |
| | | * Ordering search: memoise relevance metricGravatar Arnaud Spiwack2016-11-07
| | | | | | | | | | | | | | | | | | | | Recalculating the metric all the time was proving costly (it was obvious even on small queries).
| | | * Refine the relevance measureGravatar Arnaud Spiwack2016-11-07
| | | | | | | | | | | | | | | | Having more disctinc symbols incurs a penalty.
| | | * Sort search results by relevanceGravatar Arnaud Spiwack2016-11-07
| |_|/ |/| | | | | | | | | | | | | | | | | This orders the results of search commands (such as `Search`, `SearchAbout`, …) according to a "relevance" metric to minimise. In this minimal version, the metric is the size of the displayed term.
| * | Merge remote-tracking branch 'github/pr/339' into v8.6Gravatar Maxime Dénès2016-11-07
| |\ \ | | | | | | | | | | | | Was PR#339: Documenting type class options, typeclasses eauto
| | * | Fixes to compile with ocaml 4.01Gravatar Matthieu Sozeau2016-11-07
| | | |
| * | | Merge commit 'e6edb33' into v8.6Gravatar Maxime Dénès2016-11-07
| |\ \ \ | | | | | | | | | | | | | | | Was PR#331: Solve_constraints and Set Use Unification Heuristics
| * | | | Improve formatting of a message in [Arguments].Gravatar Maxime Dénès2016-11-07
| | | | |
| * | | | Fix #5181: [Arguments] no longer correctly checks the length of arguments listsGravatar Maxime Dénès2016-11-07
| | | | |
| * | | | Fix #5182: "Arguments names must be distinct." is bogus and underinformativeGravatar Maxime Dénès2016-11-07
| | | | |
| * | | | Not using style tags when translating/beautifying a file.Gravatar Hugo Herbelin2016-11-05
| | | | |
| * | | | Quick fix of tactic parsing while Load-ing in coqide.Gravatar Hugo Herbelin2016-11-04
| | | | | | | | | | | | | | | | | | | | Note that this is still broken when loading files containing C-zar scripts.
| * | | | Add documentation for [Set Warnings] and the -w option.Gravatar Cyprien Mangin2016-11-04
| | | | |
| | | * | Lets Hints/Instances take an optional patternGravatar Matthieu Sozeau2016-11-03
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In addition to a priority, cleanup the interfaces for passing this information as well. The pattern, if given, takes priority over the inferred one. We only allow Existing Instances gr ... gr | pri. for now, without pattern, as before. Make the API compatible to 8.5 as well.
| * | | | Fix various shortcomings of the warnings infrastructure.Gravatar Maxime Dénès2016-11-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The flags are now interpreted from left to right, without any other precedence rule. The previous one did not make much sense in interactive mode. - Set Warnings and Set Warnings Append are now synonyms, and have the "append" semantics, which is the most natural one for warnings. - Warnings on unknown warnings are now printed only once (previously the would be repeated on further calls to Set Warnings, sections closing, module requiring...). - Warning status strings are normalized, so that e.g. "+foo,-foo" is reduced to "-foo" (if foo exists, "" otherwise).