]> matita.cs.unibo.it Git - helm.git/commitdiff
1) interpretation of matches in patterns implemented
authorClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 23 May 2011 23:08:04 +0000 (23:08 +0000)
committerClaudio Sacerdoti Coen <claudio.sacerdoticoen@unibo.it>
Mon, 23 May 2011 23:08:04 +0000 (23:08 +0000)
2) missing exception added to matitaExcPp

matita/components/ng_disambiguation/nCicDisambiguate.ml
matita/matita/matitaExcPp.ml

index 8c58b33c2e4410191b1885edfc2c5448dc5a1000..d2fa70184dc87169ebc5feae4180271faf2fcf3a 100644 (file)
@@ -166,12 +166,12 @@ let interpretate_term_and_interpretate_term_option (status: #NCic.status)
                 raise (DisambiguateTypes.Invalid_choice 
                  (lazy (loc, "Syntax error: the left hand side of a "^
                    "branch pattern must be \"_\"")))
-           ) branches
+           ) branches in
+         let indtype_ref =
+          NReference.reference_of_string "cic:/fake_indty.ind(0,0,0)"
          in
-         (*
-          NCic.MutCase (ref, cic_outtype, cic_term,
-            (List.map do_branch branches))
-          *) ignore branches; assert false (* patterns not implemented yet *)
+          NCic.Match (indtype_ref, cic_outtype, cic_term,
+           (List.map do_branch branches))
         else
          let indtype_ref =
           match indty_ident with
index 5ecea5dc85af80a7058da057170fc92f53f01c47..5134f403964195b9739ba6d22b4afa42dee1188f 100644 (file)
@@ -169,6 +169,8 @@ let rec to_string =
      None, "NCicUnification uncertain: " ^ Lazy.force msg
   | DisambiguateChoices.Choice_not_found msg ->
      None, ("Disambiguation choice not found: " ^ Lazy.force msg)
+  | DisambiguateTypes.Invalid_choice msg ->
+     None, ("Invalid choice: " ^ snd (Lazy.force msg))
   | MatitaEngine.EnrichedWithStatus (exn,_) ->
      None, snd(to_string exn)
   | NTacStatus.Error (msg,None) ->