diff -r fdde440a9033 -r b070825579b8 src/Pure/Syntax/type_ext.ML --- a/src/Pure/Syntax/type_ext.ML Fri Dec 01 19:43:57 2000 +0100 +++ b/src/Pure/Syntax/type_ext.ML Fri Dec 01 19:44:15 2000 +0100 @@ -12,6 +12,7 @@ val raw_term_sorts: term -> (indexname * sort) list val typ_of_term: (indexname -> sort) -> term -> typ val term_of_typ: bool -> typ -> term + val no_brackets: unit -> bool end; signature TYPE_EXT = @@ -122,6 +123,15 @@ (** the type syntax **) +(* print mode *) + +val bracketsN = "brackets"; +val no_bracketsN = "no_brackets"; + +fun no_brackets () = + Library.find_first (equal bracketsN orf equal no_bracketsN) (! print_mode) = Some no_bracketsN; + + (* parse ast translations *) fun tapp_ast_tr (*"_tapp"*) [ty, f] = Ast.Appl [f, ty] @@ -144,10 +154,12 @@ Ast.Appl [Ast.Constant "_tappl", ty, Ast.fold_ast "_types" tys, f]; fun fun_ast_tr' (*"fun"*) asts = - (case Ast.unfold_ast_p "fun" (Ast.Appl (Ast.Constant "fun" :: asts)) of - (dom as _ :: _ :: _, cod) - => Ast.Appl [Ast.Constant "_bracket", Ast.fold_ast "_types" dom, cod] - | _ => raise Match); + if no_brackets () then raise Match + else + (case Ast.unfold_ast_p "fun" (Ast.Appl (Ast.Constant "fun" :: asts)) of + (dom as _ :: _ :: _, cod) + => Ast.Appl [Ast.Constant "_bracket", Ast.fold_ast "_types" dom, cod] + | _ => raise Match); (* type_ext *)