diff options
author | Alain Frisch <alain@frisch.fr> | 2010-09-10 08:08:15 +0000 |
---|---|---|
committer | Alain Frisch <alain@frisch.fr> | 2010-09-10 08:08:15 +0000 |
commit | 3d8524c4893f968f7176e5ae796588b9a212b270 (patch) | |
tree | ad435d26b3f256861ea40e33e53406268380635c | |
parent | 24ac9812d3e2364d55365ef92066b1b4ffa2fec9 (diff) | |
download | ocaml-fstclassmod_parametrized.tar.gz |
Fix pretty-printing bug.fstclassmod_parametrized
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/fstclassmod_parametrized@10678 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
-rw-r--r-- | typing/oprint.ml | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/typing/oprint.ml b/typing/oprint.ml index 38626e80b6..c2a0b07b13 100644 --- a/typing/oprint.ml +++ b/typing/oprint.ml @@ -219,17 +219,18 @@ and print_simple_out_type ppf = List.iter2 (fun s t -> let sep = if !first then (first := false; "with") else "and" in - match t with - | Otyp_poly (sl, t) -> - fprintf ppf " %s type " sep; - begin match sl with - | [] -> () - | [x] -> fprintf ppf "'%s " x - | l -> fprintf ppf "(%a) " pr_vars l - end; - fprintf ppf "%s = %a" s print_out_type t - | _ -> - assert false + let sl, t = + match t with + | Otyp_poly (sl, t) -> sl, t + | _ -> [], t + in + fprintf ppf " %s type " sep; + begin match sl with + | [] -> () + | [x] -> fprintf ppf "'%s " x + | l -> fprintf ppf "(%a) " pr_vars l + end; + fprintf ppf "%s = %a" s print_out_type t ) n tyl; fprintf ppf ")@]" |