]> matita.cs.unibo.it Git - helm.git/commitdiff
New syntax (again) for let rec binders:
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 8 Jun 2005 16:19:14 +0000 (16:19 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Wed, 8 Jun 2005 16:19:14 +0000 (16:19 +0000)
let rec f x y (z,w:T) h (c:T) = ...

helm/ocaml/cic_disambiguation/cicTextualParser2.ml

index fda6d14e636eac74aefc6da73e0b6a22d7dda114..e267aff6a28ed9324c953f35d9f39aa535b45903 100644 (file)
@@ -175,9 +175,10 @@ EXTEND
     [ defs = LIST1 [
         name = IDENT;
         args = LIST1 [
-          PAREN "(" ; names = LIST1 IDENT SEP SYMBOL ",";
-          ty = OPT [ SYMBOL ":"; ty = term -> ty ] ; PAREN ")" ->
-            (names, ty)
+            PAREN "(" ; names = LIST1 IDENT SEP SYMBOL ",";
+            SYMBOL ":"; ty = term; PAREN ")" ->
+              (names, Some ty)
+          | name = IDENT -> [name],None
         ];
         index_name = OPT [ IDENT "on"; idx = IDENT -> idx ];
         ty = OPT [ SYMBOL ":" ; t = term -> t ];