aboutsummaryrefslogtreecommitdiffhomepage
path: root/printing/ppconstr.ml
Commit message (Collapse)AuthorAge
...
* Merge branch 'v8.5' into v8.6Gravatar Pierre-Marie Pédrot2017-01-23
|\
| * Fixing a little bug in printing cofix with no arguments.Gravatar Hugo Herbelin2017-01-05
| |
* | [toplevel] Remove duplicate beautify flags.Gravatar Emilio Jesus Gallego Arias2016-10-17
| | | | | | | | | | | | | | | | Given the current style in flags.mli no reason to have a function. A deeper question is why a global flag is needed, in particular the use in `interp/constrextern.ml` seems strange, the condition in the lexer should be looked at and I'm not sure about `printing/`.
* | Moving Pp.comments to CLexer so that Pp is purer (no more side-effectGravatar Hugo Herbelin2016-10-09
| | | | | | | | | | done by the Ppcmd_comment token) and so that lexing/parsing side-effects are collected at the same place, i.e. in CLexer.
* | Fixing a beautifier bug pointed out by Emilio.Gravatar Hugo Herbelin2016-10-05
| |
* | Fix bug #4869, allow Prop, Set, and level names in constraints.Gravatar Matthieu Sozeau2016-09-29
| |
* | Fix tagging of notations.Gravatar Pierre-Marie Pédrot2016-08-29
| | | | | | | | We only tag the non-whitespace substrings, rather than the whole terminal token.
* | Complementing previous commit on fixes for printing binding patterns.Gravatar Hugo Herbelin2016-07-19
| |
* | Some extra fixes in printing patterns in binders.Gravatar Hugo Herbelin2016-07-19
| | | | | | | | | | | | | | | | | | | | - typo in notation_ops.ml - factorization of patterns in ppconstr.ml - update of test-suite - printing of cast of a binding pattern if in mode "printing all" The question of whether or not to print the type of a binding pattern by default seems open to me.
* | Taking into account binding patterns when agglutinating sequences of binders.Gravatar Hugo Herbelin2016-07-19
| | | | | | | | | | Supporting accordingly printing of sequences of binders including binding patterns.
* | Fixing missing parentheses in printing of patterns in binders.Gravatar Hugo Herbelin2016-07-19
| | | | | | | | (In agreement with Daniel.)
* | errors.ml renamed into cErrors.ml (avoid clash with an OCaml compiler-lib ↵Gravatar Pierre Letouzey2016-07-03
| | | | | | | | | | | | module) For the moment, there is an Error module in compilers-lib/ocamlbytecomp.cm(x)a
* | Adding ability to put any pattern in binders, prefixed by a quote.Gravatar Daniel de Rauglaudre2016-06-27
| | | | | | | | Cf CHANGES for details.
* | Fixing printing of Instance.Gravatar Hugo Herbelin2016-06-16
| |
* | Revert "A heuristic to add parentheses in the presence of rules such as"Gravatar Hugo Herbelin2016-04-27
| | | | | | | | This reverts commit dbe29599c2e9bf49368c7a92fe00259aa9cbbe15.
* | Revert "Temporary deactivate re-interpretation of terms in beautify."Gravatar Hugo Herbelin2016-04-27
| | | | | | | | This reverts commit 9e038688af8f7f054c1c2acdb2fe65d78cccdd81.
* | Revert "Fixing printing of Instance."Gravatar Hugo Herbelin2016-04-27
| | | | | | | | This reverts commit cbb917476e3920641352c108ec9ffaf6d1682217.
* | Fixing printing of Instance.Gravatar Hugo Herbelin2016-04-27
| |
* | Temporary deactivate re-interpretation of terms in beautify.Gravatar Hugo Herbelin2016-04-27
| |
* | A heuristic to add parentheses in the presence of rules such asGravatar Hugo Herbelin2016-04-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notation "## c" := (S c) (at level 0, c at level 100). which break the stratification of precedences. This works for the case of infix or suffix operators which occur in only one grammar rule, such as +, *, etc. This solves the "constr" part of #3709, even though this example is artificial. The fix is not complete. It puts extra parenthesese even when it is end of sentence, as in Notation "# c % d" := (c+d) (at level 3). Check fun x => # ## x % ## (x * 2). (* fun x : nat => # ## x % (## x * 2) *) The fix could be improved by not always using 100 for the printing level of "## c", but 100 only when not the end of the sentence. The fix does not solve the general problem with symbols occurring in more than one rule, as e.g. in: Notation "# c % d" := (c+d) (at level 1). Notation "## c" := (S c) (at level 0, c at level 5). Check fun x => # ## x % 0. (* Parentheses are necessary only if "0 % 0" is also parsable *) I don't see in this case what better approach to follow than restarting the parser to check reversibility of the printing.
* | Supporting "(@foo) args" in patterns, where "@foo" has no arguments.Gravatar Hugo Herbelin2016-03-13
| |
* | Merge branch 'v8.5'Gravatar Pierre-Marie Pédrot2016-01-21
|\|
| * Update copyright headers.Gravatar Maxime Dénès2016-01-20
| |
* | CLEANUP: removing unused fieldGravatar Matej Kosik2016-01-11
| | | | | | | | | | | | | | I have removed the second field of the "Constrexpr.CRecord" variant because once it was set to "None" it never changed to anything else. It was just carried and copied around.
* | Remove some unused functions.Gravatar Guillaume Melquiond2016-01-02
| | | | | | | | | | Note: they do not even seem to have a debugging purpose, so better remove them before they bitrot.
* | Do not compose "str" and "to_string" whenever possible.Gravatar Guillaume Melquiond2015-12-22
| | | | | | | | | | | | For instance, calling only Id.print is faster than calling both str and Id.to_string, since the latter performs a copy. It also makes the code a bit simpler to read.
* | CLEANUP: the definition of the "Constrexpr.case_expr" type was simplifiedGravatar Matej Kosik2015-12-18
|/
* Improving over printing of let-tuple (see #4447).Gravatar Hugo Herbelin2015-12-03
| | | | | | | | | | | | | For instance, #4447 is now printed: λ Ca Da : ℕAlg, let (ℕ, ℕ0) := (Ca, Da) in let (C, p) := ℕ in let (c₀, cs) := p in let (D, p0) := ℕ0 in let (d₀, ds) := p0 in {h : C → D & ((h c₀ = d₀) * (∀ c : C, h (cs c) = ds (h c)))%type} : ℕAlg → ℕAlg → Type
* Univs: add Strict Universe Declaration option (on by default)Gravatar Matthieu Sozeau2015-10-07
| | | | | | | | | This option disallows "declare at first use" semantics for universe variables (in @{}), forcing the declaration of _all_ universes appearing in a definition when introducing it with syntax Definition/Inductive foo@{i j k} .. The bound universes at the end of a definition/inductive must be exactly those ones, no extras allowed currently. Test-suite files using the old semantics just disable the option.
* Add a space in cast since cast binds loosely.Gravatar Gregory Malecha2015-06-24
| | | | | Fixes bug 3936 This closes #73
* Update headers.Gravatar Maxime Dénès2015-01-12
|
* Fixing printing of dirpathes in Ppconstr. It was reversed.Gravatar Pierre-Marie Pédrot2014-11-30
|
* Adding tag output to references in Ppconstr.Gravatar Pierre-Marie Pédrot2014-11-25
|
* Adding notation terminals to coqtop highlight.Gravatar Pierre-Marie Pédrot2014-11-17
|
* Fixing semantics of Ppconstr.print_hunks.Gravatar Pierre-Marie Pédrot2014-11-17
|
* Missing keywords in Ppconstr.Gravatar Pierre-Marie Pédrot2014-11-17
|
* Moving printing code for red_expr and may_eval to Pptactic.Gravatar Pierre-Marie Pédrot2014-11-17
|
* Default styles for printing tags.Gravatar Pierre-Marie Pédrot2014-11-17
| | | | They should be rather sensible, but de gustibus & coloribus...
* Enforcing a stronger difference between the two syntaxes "simplGravatar Hugo Herbelin2014-11-16
| | | | | | | | | | | | | | | | | | | | | | | | | | | reference" and "simpl pattern" in the code (maybe we should have merged them instead, but I finally decided to enforce their difference, even if some compatibility is to be preversed - the idea is that at some time "simpl reference" would only call a weak-head simpl (or eventually cbn), leading e.g. to reduce 2+n into S(1+n) rather than S(S(n)) which could be useful for better using induction hypotheses. In the process we also implement the following: - 'simpl "+"' is accepted to reduce all applicative subterms whose head symbol is written "+" (in the toplevel scope); idem for vm_compute and native_compute - 'simpl reference' works even if reference has maximally inserted implicit arguments (this solves the "simpl fst" incompatibility) - compatibility of ltac expressions referring to vm_compute and native_compute with functor application should now work (i.e. vm_compute and native_compute are now taken into account in tacsubst.ml) - for compatibility, "simpl eq" (assuming no maximal implicit args in eq) or "simpl @eq" to mean "simpl (eq _ _)" are still allowed. By the way, is "mul" on nat defined optimally? "3*n" simplifies to "n+(n+(n+0))". Are there some advantages of this compared to have it simplified to "n+n+n" (i.e. to "(n+n)+n").
* Additional style tags for constrs.Gravatar Pierre-Marie Pédrot2014-11-15
|
* Setting a keyword tag in Ppconstr.Gravatar Pierre-Marie Pédrot2014-11-15
|
* Plug the dynamic tags in the Richpp mechanism.Gravatar Pierre-Marie Pédrot2014-11-10
|
* lib/RichPp: Rename into Richpp.Gravatar Yann Régis-Gianas2014-11-05
| | | | | | printing/RichPrinter: Rename into Richprinter. printing/{ppvernac, ppconstr, pptactic}: Rename RichPp into Richpp. printing/Richprinter: Cosmetics.
* lib/Ppconstr: Cosmetics.Gravatar Regis-Gianas2014-11-04
|
* lib/Pp.tag: New.Gravatar Regis-Gianas2014-11-04
| | | | | A combinator to introduce tags. printing/{Ppconstr, Ppvernac}: Use it.
* printing/Ppannotation: Introduce a new annotation for keywords.Gravatar Regis-Gianas2014-11-04
| | | | printing/{Ppconstr, Ppvernac}: Use it.
* Ppannotation: New.Gravatar Regis-Gianas2014-11-04
| | | | | | | | | Define the annotations stored in semi-structured pretty-prints. Ppconstrsig: New. Contains the signature of a pretty-printer for ppconstr. Ppconstr: Export a new rich pretty-printer for constr_expr and co.
* printing/Ppconstr.Make:Gravatar Regis-Gianas2014-11-04
| | | | | | | | | | - Functorize Ppconstr with respect to a set of tagging functions. - These functions are meant to introduce tags to produce semistructured pretty printings. printing/Ppconstr: Preserve the previous behaviour of this module by instantiating Make with tagging functions that do nothing.
* printing/Ppconstr.print_hunks:Gravatar Regis-Gianas2014-11-04
| | | | | Make evaluation order explicit. (Do not rely anymore on ocaml evaluation order, which is unspecified.)
* printing/Ppconstr: Cosmetics.Gravatar Regis-Gianas2014-11-04
|