further tuning
authorChristian Urban <urbanc@in.tum.de>
Mon, 15 Feb 2010 16:50:11 +0100
changeset 1152 fbaebf08c1bd
parent 1151 2c84860c19d2
child 1154 368ec514aa34
child 1155 5650924c69ed
further tuning
Quot/quotient_typ.ML
--- a/Quot/quotient_typ.ML	Mon Feb 15 16:37:48 2010 +0100
+++ b/Quot/quotient_typ.ML	Mon Feb 15 16:50:11 2010 +0100
@@ -276,14 +276,11 @@
     (* new parsing with proper declaration *)
     val rty = Syntax.read_typ lthy rty_str
     val lthy1 = Variable.declare_typ rty lthy
-    val pre_rel = Syntax.parse_term lthy1 rel_str
-    val pre_rel' = Syntax.type_constraint (rty --> rty --> @{typ bool}) pre_rel
-    val rel = Syntax.check_term lthy1 pre_rel'
+    val rel = 
+          Syntax.parse_term lthy1 rel_str
+          |> Syntax.type_constraint (rty --> rty --> @{typ bool}) 
+          |> Syntax.check_term lthy1 
     val lthy2 = Variable.declare_term rel lthy1
-
-    (* old parsing *)
-    (* val rty = Syntax.read_typ lthy rty_str
-       val rel = Syntax.read_term lthy rel_str *)
   in
     (((vs, qty_name, mx), (rty, rel)), lthy2)
   end
@@ -293,11 +290,14 @@
   quotient_type spec' lthy'
 end
 
+local
+  structure P = OuterParse;
+in
+
 val quotspec_parser =
-    OuterParse.and_list1
-     ((OuterParse.type_args -- OuterParse.binding) --
-        OuterParse.opt_infix -- (OuterParse.$$$ "=" |-- OuterParse.typ) --
-         (OuterParse.$$$ "/" |-- OuterParse.term))
+    P.and_list1 ((P.type_args -- P.binding) -- P.opt_infix -- 
+       (P.$$$ "=" |-- P.typ) -- (P.$$$ "/" |-- P.term))
+end
 
 val _ = OuterKeyword.keyword "/"