src/HOL/ex/Antiquote.thy
author wenzelm
Mon, 24 Aug 1998 18:17:25 +0200
changeset 5368 7c8d1c7c876d
child 8559 fd3753188232
permissions -rw-r--r--
added Antiquote example;

(*  Title:      HOL/ex/Antiquote.thy
    ID:         $Id$
    Author:     Markus Wenzel, TU Muenchen

Simple quote / antiquote example.
*)

Antiquote = Arith +

syntax
  "_Expr" :: "'a => 'a"				("EXPR _" [1000] 999)

constdefs
  var :: "'a => ('a => nat) => nat"		("VAR _" [1000] 999)
  "var x env == env x"

  Expr :: "'a => 'a"
	(*"(('a => nat) => nat) => (('a => nat) => nat)"*)
  "Expr == (%x. x)"

end


ML

val parse_translation = [Syntax.quote_antiquote_tr "_Expr" "var" "Expr"];
val print_translation = [Syntax.quote_antiquote_tr' "_Expr" "var" "Expr"];