]> matita.cs.unibo.it Git - helm.git/commitdiff
Syntax of patterns changed (and not documented yet).
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 26 Oct 2007 12:37:21 +0000 (12:37 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Fri, 26 Oct 2007 12:37:21 +0000 (12:37 +0000)
It is now:
 match p with [ _ => p | ... | _ => p ]
(use lambda-abstractions for dummy arguments). Hmmm...

helm/software/components/cic_disambiguation/disambiguate.ml

index 1fea419215f3a0fddf12441585bc753fab6b8794..dbdb1530f8bd46c6f000b707df82652391633832 100644 (file)
@@ -247,6 +247,14 @@ let interpretate_term ?(create_dummy_ids=false) ~(context: Cic.name list) ~env ~
                 raise (Invalid_choice (Some loc, lazy "The type of the term to be matched is not (co)inductive!")))
         in
         let branches =
+         if create_dummy_ids then
+          List.map
+           (function
+               Ast.Wildcard,term -> ("wildcard",None,[]), term
+             | Ast.Pattern _,_ ->
+                raise (Invalid_choice (Some loc, lazy "Syntax error: the left hand side of a branch patterns must be \"_\""))
+           ) branches
+         else
          match fst(CicEnvironment.get_obj CicUniv.empty_ugraph indtype_uri) with
             Cic.InductiveDefinition (il,_,leftsno,_) ->
              let _,_,_,cl =