aboutsummaryrefslogtreecommitdiff
path: root/user-contrib
AgeCommit message (Collapse)Author
2020-03-01[parser] lk_int -> lk_natMaxime Dénès
2020-03-01Refactor lookaheads using DSLMaxime Dénès
2020-03-01Move lookahead combinators to PcoqMaxime Dénès
They were in Ltac2, but they are of general interest
2020-02-25Merge PR #11498: [exn] Forbid raising in exn printers, make them return Pp.t ↵Pierre-Marie Pédrot
option Reviewed-by: ppedrot
2020-02-25Merge PR #11489: [exn] remove `raise` taking optional exception information ↵Pierre-Marie Pédrot
argument Reviewed-by: ppedrot
2020-02-25Merge PR #11655: [parsing] Track need to reinit by typingPierre-Marie Pédrot
Reviewed-by: ppedrot
2020-02-24Merge PR #11560: Fix #11549: Ltac2 is incompatible with $.Tej Chajed
Reviewed-by: tchajed
2020-02-24[exn] remove `raise` taking optional exception information argumentEmilio Jesus Gallego Arias
This was redundant with `iraise`; exceptions in the logic monad now are forced to attach `info` to `Proofview.NonLogical.raise`
2020-02-24[exn] Forbid raising in exn printers, make them return Pp.t optionEmilio Jesus Gallego Arias
Raising inside exception printers is quite tricky as the order of registration for printers will indeed depend on the linking order. We thus forbid this, and make our API closer to the upstream `Printexn` by having printers return an option type.
2020-02-21[parsing] Track need to reinit by typingEmilio Jesus Gallego Arias
This PR is in preparation of #9067 (together with #11647) . Before this PR, `grammar_extend` always took an optional `reinit` argument, even if it was never set to `Some ...`. Indeed, there is a single case where reinit is needed; we track it now by using a different extension rule constructor.
2020-02-19Fix #11549: Ltac2 is incompatible with $.Pierre-Marie Pédrot
We use the same kind of trick as the one we used for &IDENT, namely check that no space appear between the dollar sign and the identifier.
2020-02-19Fix #11552: Ltac2 breaks query commands during proofs.Pierre-Marie Pédrot
Actually, callers of the Pvernac.register_proof_mode function have to manually register the parsing of vernacular queries themselves. This probably qualifies as an oversight from myself.
2020-02-14Annotate Ltac2 match macro variables with their type.Pierre-Marie Pédrot
This prevents some warnings to be dropped when the variables are not used at the right type. See #11603 for a motivation.
2020-02-12Remove Goptions.opt_name fieldGaëtan Gilbert
The standard use is to repeat the option keywords in lowercase, which is basically useless. En passant add doc entry for Dump Arith.
2020-02-09Merge PR #11518: Fix #11515: Ltac2 rewrite on wildcard.Gaëtan Gilbert
Reviewed-by: SkySkimmer
2020-02-08Resolve #10342 : [Ltac2] Add array libraryMichael Soegtrop
2020-02-04Fix #11515: Ltac2 rewrite on wildcard.Pierre-Marie Pédrot
There was an evar leak due to an evarmap not being threaded correctly when computing open terms.
2019-11-14Rename non-unique local nonterminalsJim Fehrle
2019-11-07Merge PR #11049: Prevent redefinition of Ltac2 types and constructors inside ↵Pierre-Marie Pédrot
a module Reviewed-by: ppedrot
2019-11-06Swap parsing precedence of `::` and `,` ; Fix #10116Kenji Maillard
2019-11-04Prevent double definition of Ltac2 constructors inside a module; Fix #11046Kenji Maillard
2019-11-04Prevent redefinition of Ltac2 types; fix #10097Kenji Maillard
2019-11-01Merge PR #9867: Add primitive floats (binary64 floating-point numbers)Maxime Dénès
Ack-by: SkySkimmer Reviewed-by: Zimmi48 Ack-by: ejgallego Reviewed-by: maximedenes Ack-by: proux01 Ack-by: silene Ack-by: vbgl
2019-11-01enforcing Ltac2 cosntructors name are uppercase in open typesKenji Maillard
2019-11-01Add primitive floats to Ltac2Pierre Roux
2019-11-01Add primitive float computation in Coq kernelGuillaume Bertholon
Beware of 0. = -0. issue for primitive floats The IEEE 754 declares that 0. and -0. are treated equal but we cannot say that this is true with Leibniz equality. Therefore we must patch the equality and the total comparison inside the kernel to prevent inconsistency.
2019-10-31enforcing Ltac2 constructor name are uppercasedKenji Maillard
2019-10-29Fix #10615: Notation substitution for Ltac2 terms.Pierre-Marie Pédrot
We implement a new type of "preterms" that represent untyped ASTs, corresponding to glob_expr in the ML implementations. Ltac2 quotations inside notations are provided with such preterms, and have to pretype them in order to do anything of relevance with them.
2019-10-18Allow to pass Ltac1 values to Ltac2 quotations.Pierre-Marie Pédrot
This is the dual of #10344.
2019-10-07chmod -x some filesJason Gross
They probably don't need to be executable
2019-09-24Fix #10783: use binder_annot in Ltac2.Constr.Unsafe.kindGaëtan Gilbert
2019-08-06[parsing] unify checks for contiguity of tokens in Ltac2 and G_primEnrico Tassi
2019-07-29Fix #10088: Incompatibility with ssreflect's ampersand syntactic sugar.Pierre-Marie Pédrot
2019-07-29Tentatively providing a localization function to ad-hoc camlp5 parsers.Pierre-Marie Pédrot
2019-07-11[proof] Minor cleanup in proof.mlEmilio Jesus Gallego Arias
2019-07-08[api] Deprecate GlobRef constructors.Emilio Jesus Gallego Arias
Not pretty, but it had to be done some day, as `Globnames` seems to be on the way out. I have taken the opportunity to reduce the number of `open` in the codebase. The qualified style would indeed allow us to use a bit nicer names `GlobRef.Inductive` instead of `IndRef`, etc... once we have the tooling to do large-scale refactoring that could be tried.
2019-07-07[error] Remove special error printing pre-processingEmilio Jesus Gallego Arias
We remove the special error printing pre-processing in favor of just calling the standard printers. Error printing has been a bit complex for a while due to an incomplete migration to a new printing scheme based on registering exception printers; this PR should alleviate that by completing the registration approach. After this cleanup, it should not be ever necessary for normal functions to worry a lot about catching errors and re-raising them, unless they have some very special needs. This change also allows to consolidate the `explainErr` and `himsg` modules into one, removing the need to export the error printing functions. Ideally we would make the contents of `himsg` more localized, but this can be done in a gradual way.
2019-06-25Give a functional type to Ltac1 quotations with a context.Pierre-Marie Pédrot
This looks more principled, and doesn't require as much tinkering with the typing implementation.
2019-06-25Adding the ability to transfer Ltac2 variables to Ltac1 quotations.Pierre-Marie Pédrot
2019-06-25Merge PR #10219: [Ltac2] Add util files for Bool, List, OptionPierre-Marie Pédrot
Ack-by: JasonGross Ack-by: MSoegtropIMC Ack-by: SkySkimmer Ack-by: Zimmi48 Reviewed-by: ppedrot
2019-06-19Removed backtracking and default variants of various functions and added ↵Michael Soegtrop
option combinators
2019-06-18Removed "b" from function names in Bool.vMichael Soegtrop
Changed year in headers
2019-06-18[errors] remove "is_handled" logic, turn unhandled into anomaliesEmilio Jesus Gallego Arias
We place the check for unhandled exceptions in the `is_anomaly` function, and consider all the exceptions non-handled by the printers always anomalies. This reworks the solution implemented in ea3909466eaaf86ff212c0a002e5df11e4a979f5 , in particular `allow_uncaught` cannot be used anymore, all exceptions must install a printer. In order to pass the test-suite CI we also had to register some printers, that were not registered for no reason, forcing clients to call a post-processing step on errors.
2019-06-17Update headers of files that were stuck on older headers.Théo Zimmermann
Most of these files were introduced after #6543 but used older headers copied from somewhere else.
2019-06-16Merge PR #10381: Fix #10090: Ltac1 destruct and Ltac2 destruct should do the ↵Emilio Jesus Gallego Arias
same thing. Reviewed-by: ejgallego
2019-06-16Fix #10090: Ltac1 destruct and Ltac2 destruct should do the same thing.Pierre-Marie Pédrot
The ML wrapper was wrongly calling induction instead of destruct.
2019-06-16Merge PR #10345: Fix #10339: Anomaly in Ltac2.Emilio Jesus Gallego Arias
Reviewed-by: ejgallego
2019-06-16- added OCaml copyright header to List.v (if for no other reason than out of ↵Michael Soegtrop
courtesy) - index errors (negative or out of bounds) generally throw (panic) - hd, last, find backtrack, because here backtracking can actually be useful added a _throw variant to these functions which panics This emaphasizes the difference between backtracking and throwing exceptions, which doesn't exist in OCaml. - simplified the implementation of for_all2 and exist2 (ok, that is a matter of taste ...) - added assertions which combine a boolean match with a throw. This makes the code more readable and makes it easier to have more specific error messages. - added a lastn function - gave Out_of_bounds a message argument (there is no good reason why invalid_argument has one and this not) All other exceptions without message argument are quite specific to certain functions (like Not_Found)
2019-06-11STM: encode in static types that vernac_when is only used when VtSideffGaëtan Gilbert
The stm.ml changes show that for the other classifications either the vernac_when was ignored, or there was an assert on it forcing it to be Now or Later depending on the vernac_type. One may also note that the classification used in top_printers `VtQuery,VtNow` would have failed those asserts...
2019-06-09[proof] Uniformize Proof_global APIEmilio Jesus Gallego Arias
We rename modify to map [more in line with the rest of the system] and make the endline function specific, as it is only used in one case.