+nnumber_notation.cmi:
disambiguateChoices.cmi:
nCicDisambiguate.cmi:
-nnumber_notation.cmi:
grafiteDisambiguate.cmi:
+nnumber_notation.cmo: nnumber_notation.cmi
+nnumber_notation.cmx: nnumber_notation.cmi
disambiguateChoices.cmo: disambiguateChoices.cmi
disambiguateChoices.cmx: disambiguateChoices.cmi
nCicDisambiguate.cmo: nCicDisambiguate.cmi
nCicDisambiguate.cmx: nCicDisambiguate.cmi
-nnumber_notation.cmo: disambiguateChoices.cmi nnumber_notation.cmi
-nnumber_notation.cmx: disambiguateChoices.cmx nnumber_notation.cmi
grafiteDisambiguate.cmo: nCicDisambiguate.cmi disambiguateChoices.cmi \
grafiteDisambiguate.cmi
grafiteDisambiguate.cmx: nCicDisambiguate.cmx disambiguateChoices.cmx \
PREDICATES =
INTERFACE_FILES = \
+ nnumber_notation.mli \
disambiguateChoices.mli \
nCicDisambiguate.mli \
- nnumber_notation.mli \
grafiteDisambiguate.mli \
$(NULL)
IMPLEMENTATION_FILES = \
exception Choice_not_found of string Lazy.t
-let nnum_choices = ref []
-
-let nadd_num_choice choice = nnum_choices := choice :: !nnum_choices
-
let has_description dsc = (fun x -> fst x = dsc)
let nlookup_num_by_dsc dsc =
- try
- List.find (has_description dsc) !nnum_choices
- with Not_found -> raise (Choice_not_found (lazy ("Num with dsc " ^ dsc)))
+ if dsc <> "natural number" then
+ raise (Choice_not_found (lazy ("Num with dsc " ^ dsc)))
+ else
+ "natural number", `Num_interp Nnumber_notation.ninterp_natural_number
let mk_choice ~mk_appl ~mk_implicit ~term_of_nref (dsc, args, appl_pattern)=
dsc,
(** raised by lookup_XXXX below *)
exception Choice_not_found of string Lazy.t
- (** register a new number choice *)
-val nadd_num_choice: NCic.term codomain_item -> unit
-
(** {2 Choices lookup}
* for user defined aliases *)
if mode = GrafiteAst.WithoutPreferences then
status
else
- (* MATITA 1.0
- let new_commands =
- List.map
- (fun _,alias -> GrafiteAst.Alias (HExtlib.dummy_floc, alias)) new_aliases
- in *)
let aliases =
List.fold_left (fun acc (d,c) -> DisambiguateTypes.Environment.add d c acc)
status#disambiguate_db.aliases new_aliases in
| None -> error "no default natural numbers"
in
*)
- let nat_URI = NUri.uri_of_string "cic:/matita/ng/arithmetics/nat/nat.ind" in
+ let nat_URI = NUri.uri_of_string "cic:/matita/arithmetics/nat/nat.ind" in
let o () =
NCic.Const
(NReference.reference_of_spec nat_URI (NReference.Con (0,1,0))) in
(NReference.reference_of_spec nat_URI (NReference.Con (0,2,0)));
t] in
build_nat o s num
-
-let _ =
- DisambiguateChoices.nadd_num_choice
- ("nnatural number", `Num_interp ninterp_natural_number);
-;;
(* $Id: number_notation.ml 9771 2009-05-14 13:43:55Z fguidi $ *)
-(* Works by side-effects only *)
+val ninterp_natural_number: string -> NCic.term