]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/components/grafite_parser/grafiteParser.ml
short notation for "coercion"
[helm.git] / matita / components / grafite_parser / grafiteParser.ml
index 480c2de4892e23f10c31dee4a80bca28ce2d0359..c1b059991db9e8b21093f531b2413ff4c802841a 100644 (file)
@@ -250,13 +250,8 @@ EXTEND
    [ IDENT "demod"
    | IDENT "fast_paramod"
    | IDENT "paramod"
-   | IDENT "depth"
    | IDENT "width"
    | IDENT "size"
-   | IDENT "timeout"
-   | IDENT "library"
-   | IDENT "type"
-   | IDENT "all"
    ]
 ];
   auto_params: [
@@ -550,12 +545,12 @@ EXTEND
         G.UnificationHint (loc, t, n)
     | IDENT "coercion"; name = IDENT;
         compose = OPT [ IDENT "nocomposites" -> () ];
-        SYMBOL ":"; ty = term; 
+        spec = OPT [ SYMBOL ":"; ty = term; 
         SYMBOL <:unicode<def>>; t = term; "on"; 
         id = [ IDENT | PIDENT ]; SYMBOL ":"; source = term;
-        "to"; target = term ->
+        "to"; target = term -> t,ty,(id,source),target ] ->
           let compose = compose = None in
-          G.NCoercion(loc,name,compose,t,ty,(id,source),target)     
+          G.NCoercion(loc,name,compose,spec)
     | IDENT "record" ; (params,name,ty,fields) = record_spec ->
         G.NObj (loc, N.Record (params,name,ty,fields))
     | IDENT "copy" ; s = IDENT; IDENT "from"; u = URI; "with";