Commit d4a1d6ab authored by POTTIER Francois's avatar POTTIER Francois

Modified [Printer] so as to support anonymous type variables.

parent c7f8e4fb
......@@ -79,7 +79,7 @@ and typedef = {
(* Type parameters. This is a list of type variable names,
without the leading quote, which will be added by the
pretty-printer. *)
pretty-printer. Can also be "_". *)
typeparams: string list;
(* Data constructors. *)
......@@ -127,7 +127,7 @@ and typ =
(* Textual Objective Caml type. *)
| TypTextual of Stretch.ocamltype
(* Type variable, without its leading quote. *)
(* Type variable, without its leading quote. Can also be "_". *)
| TypVar of string
(* Application of an algebraic data type constructor. *)
......
......@@ -455,8 +455,11 @@ and pat2 f = function
and pat f p =
pat2 f p
and typevar f v =
fprintf f "'%s" v
and typevar f = function
| "_" ->
fprintf f "_"
| v ->
fprintf f "'%s" v
and typ0 f = function
| TypTextual (Stretch.Declared ocamltype) ->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment