Commit d7f5453a authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2006-04-24 16:47:52 by afrisch] New subtyping algo

Original author: afrisch
Date: 2006-04-24 16:47:52+00:00
parent a7737870
......@@ -107,7 +107,8 @@ let rec print_exn ppf = function
Format.fprintf ppf "but its inferred type is:@.%a@."
print_norm s;
Format.fprintf ppf "which is not a subtype, as shown by the sample:@.%a@."
print_sample (Sample.get (Types.diff s t))
(* print_sample (Sample.get (Types.diff s t)) *)
Types.Witness.print_witness (Types.witness (Types.diff s t))
| Typer.NonExhaustive t ->
Format.fprintf ppf "This pattern matching is not exhaustive@.";
Format.fprintf ppf "Residual type:@.%a@."
......@@ -192,7 +193,7 @@ let debug ppf tenv cenv = function
let t = Types.descr (Typer.typ tenv t) in
Format.fprintf ppf "%a@." print_sample (Sample.get t);
Format.fprintf ppf "witness: %a@." Types.print_witness (Types.witness t);
Format.fprintf ppf "witness: %a@." Types.Witness.print_witness (Types.witness t);
with Not_found ->
Format.fprintf ppf "Empty type : no sample !@.")
| `Filter (t,p) ->
This diff is collapsed.
......@@ -276,10 +276,12 @@ sig
val to_string: t -> string
module Witness: sig
type witness
val print_witness: Format.formatter -> witness -> unit
val witness: t -> Witness.witness
type witness
val witness: t -> witness
val print_witness: Format.formatter -> witness -> unit
module Cache: sig
type 'a cache
Supports Markdown
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