# HG changeset patch # User clasohm # Date 791120690 -3600 # Node ID 27675591cc50e1621ae4f666e07305b5ef7deb79 # Parent 7c82ab7602b4e0c3a3f040085170179f8fd9b16d added reference variable ambiguity_level to control ambiguity warnings diff -r 7c82ab7602b4 -r 27675591cc50 src/Pure/sign.ML --- a/src/Pure/sign.ML Wed Jan 25 04:00:27 1995 +0100 +++ b/src/Pure/sign.ML Thu Jan 26 12:44:50 1995 +0100 @@ -64,6 +64,7 @@ val pure: sg val const_of_class: class -> string val class_of_const: string -> class + val ambiguity_level: int ref end end; @@ -244,6 +245,8 @@ (** infer_types **) (*exception ERROR*) +val ambiguity_level = ref 1; + fun infer_types sg types sorts print_msg (ts, T) = let val Sg {tsig, ...} = sg; @@ -294,7 +297,7 @@ else error msg; val (idx, infrd_t, tye) = process_terms ts (None, None, None) "" 0; - in if print_msg andalso length ts > 1 then + in if print_msg andalso length ts > !ambiguity_level then writeln "Fortunately, only one parse tree is type correct.\n\ \It helps (speed!) if you disambiguate your grammar or your input." else ();