aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-03-21[ide] richpp clenaupEmilio Jesus Gallego Arias
We remove the "abstraction breaking" primitives and reduce the file to the used fragment.
2017-03-21[pp] Debug feeder is not needed anymore.Emilio Jesus Gallego Arias
-> Candidate to be merge with the main feedback commit.
2017-03-21[pp] Remove richpp from fake_ide.Emilio Jesus Gallego Arias
2017-03-21[pp] Make feedback the only logging mechanism.Emilio Jesus Gallego Arias
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.
2017-03-21[error] Move back fatal_error to toplevelEmilio Jesus Gallego Arias
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.
2017-03-21[feedback] Allow to remove feedback listeners.Emilio Jesus Gallego Arias
2017-03-21[pp] Remove redundant white spacing pp construct.Emilio Jesus Gallego Arias
2017-03-21[pp] Force well-formed boxes by construction.Emilio Jesus Gallego Arias
We replace open/close box commands in favor of the create box ones.
2017-03-21[pp] Force well-tagged docs by construction.Emilio Jesus Gallego Arias
We replace open/close tag commands by a well-balanced "tag" wrapper.
2017-03-21[pp] Implement n-ary glue.Emilio Jesus Gallego Arias
2017-03-21[pp] Make pp public to allow serialization.Emilio Jesus Gallego Arias
2017-03-21[pp] Prepare for serialization, remove opaque glue.Emilio Jesus Gallego Arias
We also remove flushing operations `msg_with`, now the flushing responsibility belong to the owner of the formatter.
2017-03-21[pp] Remove `Pp.stras`.Emilio Jesus Gallego Arias
Mostly unused, we ought to limit spacing in the boxes themselves.
2017-03-21[pp] Replace `Pp.Tag` by `Ppstyle.tag` = `string list`Emilio Jesus Gallego Arias
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.
2017-03-21[pp] Remove unused printing tagging infrastructure.Emilio Jesus Gallego Arias
Applications of it were not clear/unproven, it made printers more complex (as they needed to be functors) and as it lacked examples it confused some people. The printers now tag unconditionally, it is up to the backends to interpreted the tags. Tagging (and indeed the notion of rich document) should be reworked in a follow-up patch, so they are in sync, but this is a first step. Tested, test-suite passes. Notes: - We remove the `Richprinter` module. It was only used in the `annotate` IDE protocol call, its output was identical to the normal printer (or even inconsistent if taggers were not kept manually in sync). - Note that Richpp didn't need a single change. In particular, its main API entry point `Richpp.rich_pp` is not used by anyone.
2017-03-21[ide] ide_slave doesnt't need to capture stdoutEmilio Jesus Gallego Arias
The miscellaneous `msg_*` cleanup patches have finally enforced this invariant.
2017-03-21[ide] Use "log via feedback".Emilio Jesus Gallego Arias
We remove the custom logger handler in ide_slave, and handle everything via feedback. This is an experimental patch but it seems to bring quite a bit of cleanup and a more uniform handling to messaging.
2017-03-21Merge PR#134: Enable `-safe-string`Maxime Dénès
2017-03-21trivial: fix commentMatej Kosik
2017-03-20[misc] Remove warnings about String.setEmilio Jesus Gallego Arias
The `a.[i] <- x` notation is deprecated and we were getting a couple of warnings.
2017-03-20Merge PR#479: [future] Remove unused parameter greedy.Maxime Dénès
2017-03-19Merge PR#487: Add a forgotten (?) line to "theories/Logic/vo.itarget".Maxime Dénès
2017-03-19Add a forgotten (?) line to "theories/Logic/vo.itarget".Matej Kosik
The "theories/Logic/PropExtensionalityFacts.v" file was: - compiled - used in several places but not actually installed. This commit fixes that.
2017-03-17Merge PR#428: Report missing tactic arguments in error messageMaxime Dénès
2017-03-17Merge PR#437: Improve unification debug trace.Maxime Dénès
2017-03-17Merge PR#445: TACTIC EXTEND now takes an optional level as argument.Maxime Dénès
2017-03-17Merge PR#442: Allow interactive editing of Coq.Init.LogicMaxime Dénès
2017-03-17Merge PR#451: Add η principles for sigma typesMaxime Dénès
2017-03-15Attempt to improve error message when "apply in" fail.Hugo Herbelin
- Adding a better location in the "apply" on the fly pattern. - Printing statement of lemma and of hypothesis. Was suggested by discussion at wish report #5390.
2017-03-15Merge PR#267: Proposal for an update of the recommended style in programming ↵Maxime Dénès
Coq.
2017-03-14[safe-string] Enable -safe-string !Emilio Jesus Gallego Arias
We now build Coq with `-safe-string`, which enforces functional use of the `string` datatype. Coq was pretty safe in these regard so only a few tweaks were needed. - coq_makefile: build plugins with -safe-string too. - `names.ml`: we remove `String.copy` uses, as they are not needed.
2017-03-14[safe-string] toolsEmilio Jesus Gallego Arias
No functional changes.
2017-03-14[safe-string] ideEmilio Jesus Gallego Arias
No functional change, one extra copy introduced but it seems hard to avoid.
2017-03-14[safe-string] plugins/extractionEmilio Jesus Gallego Arias
No functional change.
2017-03-14[safe-string] ltac/profile_ltacEmilio Jesus Gallego Arias
No functional change, one extra copy introduced but it seems hard to avoid.
2017-03-14[safe_string] toplevel/vernacEmilio Jesus Gallego Arias
No functional changes, only a minor copy on a deprecated output option.
2017-03-14[safe_string] toplevel/coqloopEmilio Jesus Gallego Arias
No functional change, even if we could optimize `blanch_utf8_string` a bit more by using `String.init`.
2017-03-14[safe-string] parsing/cLexerEmilio Jesus Gallego Arias
No functional change.
2017-03-14[safe_string] interp/dumpglobEmilio Jesus Gallego Arias
No functional change.
2017-03-14[safe_string] library/nameopsEmilio Jesus Gallego Arias
We add a more convenient API to create identifiers from mutable strings. We cannot solve the `String.copy` deprecation problem until we enable `-safe-string`.
2017-03-14[safe_string] kernel/cemitcodesEmilio Jesus Gallego Arias
The `emitcodes` string type was used in both a functional and an imperative way, so we have to handle it with care in order to preserve the previous optimizations and semantics.
2017-03-14Merge PR#444: Simplifying a statement in Hurkens.v + a case study for eautoMaxime Dénès
2017-03-14Report missing tactic arguments in error messageTej Chajed
Augments "A fully applied tactic is expected" with the list of missing arguments to the tactic. Addresses [bug 5344](https://coq.inria.fr/bugs/show_bug.cgi?id=5344).
2017-03-14[safe-string] kernel/nativevaluesEmilio Jesus Gallego Arias
No functional change.
2017-03-14[safe_string] kernel/term_typingEmilio Jesus Gallego Arias
No functional change, we create the new string beforehand and `id_of_string` will become a noop with `-safe-string`.
2017-03-14[safe-string] lib/miscelaneaEmilio Jesus Gallego Arias
No functional change.js
2017-03-14[safe-string] lib/cUnixEmilio Jesus Gallego Arias
No functional change.
2017-03-14[safe_string] lib/cThreadEmilio Jesus Gallego Arias
No functional changes.
2017-03-14Merge PR#438: Fix V7 syntax in refman.Maxime Dénès
2017-03-14Merge PR#412: Remove outdated comment from 2002.Maxime Dénès