diff options
author | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2003-01-16 21:13:16 +0000 |
---|---|---|
committer | herbelin <herbelin@85f007b7-540e-0410-9357-904b9bb8a0f7> | 2003-01-16 21:13:16 +0000 |
commit | 5b4e169dada3cc5c9fd88b797291cfffb9518da2 (patch) | |
tree | 02cf1870d8574a59f0e34b931ca2d54d7852f452 /parsing | |
parent | 0c52732d2b89604b9ba0f1b1b2643111bde47c0d (diff) |
Bugs affichage
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@3517 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'parsing')
-rw-r--r-- | parsing/termast.ml | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/parsing/termast.ml b/parsing/termast.ml index 698536786..f1ce602fb 100644 --- a/parsing/termast.ml +++ b/parsing/termast.ml @@ -224,16 +224,25 @@ let rec ast_of_raw = function let asteqns = List.map ast_of_eqn eqns in ope(tag,pred::asttomatch::asteqns) + | ROrderedCase (_,LetStyle,typopt,tm,[|bv|]) -> + let nvar' = function Anonymous -> nvar wildcard | Name id -> nvar id in + let rec f l = function + | RLambda (_,na,RHole _,c) -> f (nvar' na :: l) c + | RLetIn (_,na,RHole _,c) -> f (nvar' na :: l) c + | c -> List.rev l, ast_of_raw c in + let l,c = f [] bv in + let eqn = ope ("EQN", [c;ope ("PATTCONSTRUCT",(nvar wildcard)::l)]) in + ope ("FORCELET",[(ast_of_rawopt typopt);(ast_of_raw tm);eqn]) + | ROrderedCase (_,st,typopt,tm,bv) -> let tag = match st with | IfStyle -> "FORCEIF" - | LetStyle -> "FORCELET" - | RegularStyle -> "CASES" - | MatchStyle -> "MATCH" + | RegularStyle -> "CASE" + | MatchStyle | LetStyle -> "MATCH" in (* warning "Old Case syntax"; *) - ope("CASE",(ast_of_rawopt typopt) + ope(tag,(ast_of_rawopt typopt) ::(ast_of_raw tm) ::(Array.to_list (Array.map ast_of_raw bv))) | RRec (_,fk,idv,tyv,bv) -> |