aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
Commit message (Collapse)AuthorAge
* [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] Debug feeder is not needed anymore.Gravatar Emilio Jesus Gallego Arias2017-03-21
| | | | -> Candidate to be merge with the main feedback commit.
* [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.
* [feedback] Allow to remove feedback listeners.Gravatar Emilio Jesus Gallego Arias2017-03-21
|
* [pp] Remove redundant white spacing pp construct.Gravatar Emilio Jesus Gallego Arias2017-03-21
|
* [pp] Force well-formed boxes by construction.Gravatar Emilio Jesus Gallego Arias2017-03-21
| | | | We replace open/close box commands in favor of the create box ones.
* [pp] Force well-tagged docs by construction.Gravatar Emilio Jesus Gallego Arias2017-03-21
| | | | We replace open/close tag commands by a well-balanced "tag" wrapper.
* [pp] Implement n-ary glue.Gravatar Emilio Jesus Gallego Arias2017-03-21
|
* [pp] Make pp public to allow serialization.Gravatar Emilio Jesus Gallego Arias2017-03-21
|
* [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] Remove `Pp.stras`.Gravatar Emilio Jesus Gallego Arias2017-03-21
| | | | Mostly unused, we ought to limit spacing in the boxes themselves.
* [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.
* Merge PR#134: Enable `-safe-string`Gravatar Maxime Dénès2017-03-21
|\
| * [safe-string] lib/miscelaneaGravatar Emilio Jesus Gallego Arias2017-03-14
| | | | | | | | No functional change.js
| * [safe-string] lib/cUnixGravatar Emilio Jesus Gallego Arias2017-03-14
| | | | | | | | No functional change.
| * [safe_string] lib/cThreadGravatar Emilio Jesus Gallego Arias2017-03-14
| | | | | | | | No functional changes.
* | [future] Remove unused parameter greedy.Gravatar Emilio Jesus Gallego Arias2017-03-14
|/ | | | It was always set to `greedy:true`.
* Merge PR#189: Remove tabulation support from pretty-printing.Gravatar Maxime Dénès2017-02-20
|\
* | [unicode] Address comments in PR#314.Gravatar Emilio Jesus Gallego Arias2017-02-15
| |
* | [safe-string] Use `String.init` to build string.Gravatar Emilio Jesus Gallego Arias2017-02-14
| |
* | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2017-02-01
|\ \
* \ \ Merge PR#355: Remove unused feedback_content: GoalsGravatar Maxime Dénès2017-01-30
|\ \ \
| | * \ Merge PR#383: fix #5244: set printing width ignored when given enough spaceGravatar Maxime Dénès2017-01-24
| | |\ \
* | | \ \ Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2017-01-19
|\ \ \ \ \ | | |/ / / | |/| | |
| * | | | Fix race condition in STM DAG generation (in debug mode).Gravatar Maxime Dénès2017-01-13
| | | | | | | | | | | | | | | | | | | | The same file name for .dot graphs could be used by concurrent processes.
| * | | | Fix broken .aux machinery.Gravatar Guillaume Melquiond2017-01-13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Coq expects aux_file_name_for to give the aux file corresponding to the input file whichever its Coq-related extension, be it .v or .vo or .vio. Commit 3e6fa1c broke this contract when fixing bug #5183. As a consequence, depending on the execution path, Coq would try to save or load from either .foo.aux or .foo.vo.aux or .foo.vio.aux. This commit reverts 3e6fa1c and fixes bug #5183 much earlier in the call chain by not initializing hints when the input file does not end with .v. This also restores 8.5 behavior with respect to aux file naming.
* | | | | Avoid using the deprecated Scanf.fscanf function.Gravatar Maxime Dénès2017-01-09
| | | | |
* | | | | Merge remote-tracking branch 'github/pr/351' into trunkGravatar Maxime Dénès2016-12-19
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Was PR#351: Complete a truncated comment
* \ \ \ \ \ Merge remote-tracking branch 'github/pr/363' into trunkGravatar Maxime Dénès2016-12-19
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Was PR#363: lib/Unicodetable: Update.
| | | | | * | [pp] Set printing width for richpp formatter (bug #5244)Gravatar Emilio Jesus Gallego Arias2016-12-04
| | | | |/ / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Richpp output depends on printing width, thus its internal formatter should be seeded with the proper width value. While we are at it, we increase the default buffer size to a more sensible value.
* | | | | | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2016-11-30
|\ \ \ \ \ \ | | |_|/ / / | |/| | | |
| * | | | | Fix #5183 - Two CoqIDE crash errorsGravatar Maxime Dénès2016-11-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When opening a file without extension, an uncaught exception was occurring. Note that this fix is not complete, since the "Compile Buffer" command still fails. This is because of a limitation of coqc which appends the ".v" extension to its argument even if it already existed (and even if it doesn't exist with the extension!).
| * | | | | 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.
* | | | | | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2016-11-18
|\| | | | |
| | * | | | lib/Unicodetable: Update. This code has been generated from the latestGravatar Yann Régis-Gianas2016-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unicode tables using UUCD, an OCaml library to parse the official Unicode tables.
| * | | | | Fix bug in warnings: -w foo was silent when foo did not exist.Gravatar Maxime Dénès2016-11-14
| | | | | |
| | | | * | Remove unused feedback_content: GoalsGravatar CJ Bell2016-11-10
| |_|_|/ / |/| | | |
| | | * | Complete a truncated commentGravatar Arnaud Spiwack2016-11-08
| |_|/ / |/| | | | | | | | | | | | | | | Introduce by myself, I'm afraid, in #308. Noticed by PMP during the review, but I forgot to fix it before merge.
| * | | Removing a special treatment for empty lines in comments.Gravatar Hugo Herbelin2016-11-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This made the whole pp code complicated only for the purpose of the beautifier, while it is not clear when this was useful. Removing the code for simplicity, not excluding to later address beautifier issues when they show up.
| * | | Fix #4837: ./configure -local makes coqdep issue many warningsGravatar Maxime Dénès2016-11-04
| | | | | | | | | | | | | | | | | | | | | | | | We simply remove the warnings about paths mixing Win32 and Unix separators, since that situation does not seem problematic (c.f. discussion on the bug tracker).
| * | | Remove an OCaml 4.02 construct.Gravatar Maxime Dénès2016-11-03
| | | | | | | | | | | | | | | | | | | | This was not detected by running coq-contribs, so it probably means that we are not testing with the right version of OCaml.
| * | | 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).
* | | | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2016-10-29
|\| | |
| * | | Merge remote-tracking branch 'github/pr/319' into v8.6Gravatar Maxime Dénès2016-10-28
| |\ \ \ | | | | | | | | | | | | | | | Was PR#319: More error tagging, try to fix bug 5135
| * | | | STM: make ~valid state id non optional from APIsGravatar Enrico Tassi2016-10-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It used to be Stateid.initial by default. That is indeed a valid state id but very likely not the very best one (that would be the tip of the document).
* | | | | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2016-10-24
|\| | | |
| * | | | Error Resiliency: more conservative default (only curly braces)Gravatar Enrico Tassi2016-10-19
| | | | |
| | * | | [pp] Try to properly tag error messages in cError.Gravatar Emilio Jesus Gallego Arias2016-10-18
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to get proper coloring, we must tag the headers of error messages in `CError`. This should fix bug https://coq.inria.fr/bugs/show_bug.cgi?id=5135 However, note that this could interact badly with the richpp printing used by the IDE. At this level, we have no clue which tag we'd like to apply, as we know (and shouldn't) nothing about the top level backend. Thus, for now I've selected the console printer, hoping that the `Richpp` won't crash the IDE.
* | | | Merge branch 'v8.6'Gravatar Pierre-Marie Pédrot2016-10-18
|\| | |