diff options
author | 2004-12-24 11:25:18 +0000 | |
---|---|---|
committer | 2004-12-24 11:25:18 +0000 | |
commit | 355671c60fa075b64f64e175bada909a4ce759ac (patch) | |
tree | e2ade8e51a0e377dac068c43d469951274513f89 /interp | |
parent | 13517a671562062b32fbe90106098854faa46525 (diff) |
Passage d'une bibliothèque de grands entiers naturels vers une bibliothèques de grands entiers relatifs munis des 4 opérations de base
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@6499 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'interp')
-rw-r--r-- | interp/constrextern.ml | 4 | ||||
-rw-r--r-- | interp/constrintern.ml | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/interp/constrextern.ml b/interp/constrextern.ml index 0467c3d7d..d77faf6bf 100644 --- a/interp/constrextern.ml +++ b/interp/constrextern.ml @@ -1199,7 +1199,7 @@ let make_notation loc ntn l = then expand_curly_brackets (fun n l -> CNotation (loc,n,l)) ntn l else match ntn,l with (* Special case to avoid writing "- 3" for e.g. (Zopp 3) *) - | "- _", [CNumeral(_,Bignat.POS p)] -> + | "- _", [CNumeral(_,p)] when Bigint.is_strictly_pos p -> CNotation (loc,ntn,[CNotation(loc,"( _ )",l)]) | _ -> CNotation (loc,ntn,l) @@ -1208,7 +1208,7 @@ let make_pat_notation loc ntn l = then expand_curly_brackets (fun n l -> CPatNotation (loc,n,l)) ntn l else match ntn,l with (* Special case to avoid writing "- 3" for e.g. (Zopp 3) *) - | "- _", [CPatNumeral(_,Bignat.POS p)] -> + | "- _", [CPatNumeral(_,p)] when Bigint.is_strictly_pos p -> CPatNotation (loc,ntn,[CPatNotation(loc,"( _ )",l)]) | _ -> CPatNotation (loc,ntn,l) diff --git a/interp/constrintern.ml b/interp/constrintern.ml index 35162a563..9cddcb121 100644 --- a/interp/constrintern.ml +++ b/interp/constrintern.ml @@ -570,10 +570,10 @@ let rec intern_cases_pattern scopes (ids,subst as aliases) tmp_scope = function let pl' = List.map (fun (subst,pl) -> (subst, PatCstr (loc,c,pl0@pl,alias_of aliases))) pll in ids',pl' - | CPatNotation (loc,"- _",[CPatNumeral(_,Bignat.POS p)]) -> + | CPatNotation (loc,"- _",[CPatNumeral(_,p)]) when Bigint.is_strictly_pos p-> let scopes = option_cons tmp_scope scopes in (ids, - [subst, Symbols.interp_numeral_as_pattern loc (Bignat.NEG p) + [subst, Symbols.interp_numeral_as_pattern loc (Bigint.neg p) (alias_of aliases) scopes]) | CPatNotation (_,"( _ )",[a]) -> intern_cases_pattern scopes aliases tmp_scope a @@ -851,9 +851,9 @@ let internalise sigma env allow_soapp lvar c = | CLetIn (loc,(_,na),c1,c2) -> RLetIn (loc, na, intern (reset_tmp_scope env) c1, intern (push_name_env lvar env na) c2) - | CNotation (loc,"- _",[CNumeral(_,Bignat.POS p)]) -> + | CNotation (loc,"- _",[CNumeral(_,p)]) when Bigint.is_strictly_pos p -> let scopes = option_cons tmp_scope scopes in - Symbols.interp_numeral loc (Bignat.NEG p) scopes + Symbols.interp_numeral loc (Bigint.neg p) scopes | CNotation (_,"( _ )",[a]) -> intern env a | CNotation (loc,ntn,args) -> intern_notation intern env loc ntn args |