diff options
| -rw-r--r-- | parsing/lexer.ml4 | 3 | ||||
| -rw-r--r-- | parsing/tok.ml | 4 | ||||
| -rw-r--r-- | parsing/tok.mli | 2 | ||||
| -rw-r--r-- | pretyping/glob_term.mli | 4 |
4 files changed, 11 insertions, 2 deletions
diff --git a/parsing/lexer.ml4 b/parsing/lexer.ml4 index 46dd516be8..61ff69ba7f 100644 --- a/parsing/lexer.ml4 +++ b/parsing/lexer.ml4 @@ -94,6 +94,9 @@ module Error = struct | UnsupportedUnicode x -> Printf.sprintf "Unsupported Unicode character (0x%x)" x) + (* Require to fix the Camlp4 signature *) + let print ppf x = Pp.pp_with ppf (Pp.str (to_string x)) + end open Error diff --git a/parsing/tok.ml b/parsing/tok.ml index 69fcca98d7..52d56c4dd6 100644 --- a/parsing/tok.ml +++ b/parsing/tok.ml @@ -45,6 +45,10 @@ let match_keyword kwd = function | KEYWORD kwd' when kwd = kwd' -> true | _ -> false +(* Needed to fix Camlp4 signature. + Cannot use Pp because of silly Tox -> Compat -> Pp dependency *) +let print ppf tok = Format.pp_print_string ppf (to_string tok) + (** For camlp5, conversion from/to [Plexing.pattern], and a match function analoguous to [Plexing.default_match] *) diff --git a/parsing/tok.mli b/parsing/tok.mli index d3c178b5a3..7c685a67ce 100644 --- a/parsing/tok.mli +++ b/parsing/tok.mli @@ -21,6 +21,8 @@ type t = val extract_string : t -> string val to_string : t -> string +(* Needed to fit Camlp4 signature *) +val print : Format.formatter -> t -> unit val match_keyword : string -> t -> bool (** for camlp5 *) val of_pattern : string*string -> t diff --git a/pretyping/glob_term.mli b/pretyping/glob_term.mli index a4feac3586..fca66fd28d 100644 --- a/pretyping/glob_term.mli +++ b/pretyping/glob_term.mli @@ -25,7 +25,7 @@ open Nametab locs here refers to the ident's location, not whole pat *) type cases_pattern = | PatVar of loc * name - | PatCstr of loc * constructor * cases_pattern list * name + | PatCstr of loc * constructor * cases_pattern list * name (** [PatCstr(p,C,l,x)] = "|'C' 'l' as 'x'" *) val cases_pattern_loc : cases_pattern -> loc @@ -90,7 +90,7 @@ and tomatch_tuple = (glob_constr * predicate_pattern) and tomatch_tuples = tomatch_tuple list and cases_clause = (loc * identifier list * cases_pattern list * glob_constr) -(** [(p,il,cl,t)] = "|'cl' as 'il' => 't'" *) +(** [(p,il,cl,t)] = "|'cl' => 't'" where FV(t) \subset il *) and cases_clauses = cases_clause list |
