src/Pure/Syntax/printer.ML
changeset 14783 e7f7ed4c06f2
parent 14696 e862cc138e9c
child 14837 827c68f8267c
equal deleted inserted replaced
14782:d6ce35a1c386 14783:e7f7ed4c06f2
    63 
    63 
    64 (* simple_ast_of *)
    64 (* simple_ast_of *)
    65 
    65 
    66 fun simple_ast_of (Const (c, _)) = Ast.Constant c
    66 fun simple_ast_of (Const (c, _)) = Ast.Constant c
    67   | simple_ast_of (Free (x, _)) = Ast.Variable x
    67   | simple_ast_of (Free (x, _)) = Ast.Variable x
    68   | simple_ast_of (Var (xi, _)) = Ast.Variable (Lexicon.string_of_vname xi)
    68   | simple_ast_of (Var (xi, _)) = Ast.Variable (Term.string_of_vname xi)
    69   | simple_ast_of (t as _ $ _) =
    69   | simple_ast_of (t as _ $ _) =
    70       let val (f, args) = strip_comb t in
    70       let val (f, args) = strip_comb t in
    71         Ast.mk_appl (simple_ast_of f) (map simple_ast_of args)
    71         Ast.mk_appl (simple_ast_of f) (map simple_ast_of args)
    72       end
    72       end
    73   | simple_ast_of (Bound i) = Ast.Variable ("B." ^ string_of_int i)
    73   | simple_ast_of (Bound i) = Ast.Variable ("B." ^ string_of_int i)