open DisambiguateTypes
-let alias_of_domain_and_codomain_items domain_item (dsc,_) =
+let alias_of_domain_and_desc domain_item dsc =
match domain_item with
Id id -> LexiconAst.Ident_alias (id, dsc)
| Symbol (symb, i) -> LexiconAst.Symbol_alias (symb, i, dsc)
let aliases_of_environment env =
Environment.fold
(fun domain_item codomain_item acc ->
- alias_of_domain_and_codomain_items domain_item codomain_item::acc
+ alias_of_domain_and_desc domain_item (fst codomain_item)::acc
) env []
-let aliases_of_domain_and_codomain_items_list l =
- List.fold_left
- (fun acc (domain_item,codomain_item) ->
- alias_of_domain_and_codomain_items domain_item codomain_item::acc
- ) [] l
-
let pp_environment env =
let aliases = aliases_of_environment env in
let strings =
* http://helm.cs.unibo.it/
*)
-val aliases_of_domain_and_codomain_items_list:
- (DisambiguateTypes.domain_item *
- Cic.term DisambiguateTypes.codomain_item) list ->
- LexiconAst.alias_spec list
+val alias_of_domain_and_desc:
+ DisambiguateTypes.domain_item -> string -> LexiconAst.alias_spec
val pp_environment: Cic.term DisambiguateTypes.environment -> string
("" ::
List.map
(fun k,desc ->
- let id = DisambiguateTypes.string_of_domain_item k in
- LexiconAstPp.pp_alias (LexiconAst.Ident_alias (id,desc)))
+ let alias = DisambiguatePp.alias_of_domain_and_desc k desc in
+ LexiconAstPp.pp_alias alias)
diff) ^ "\n"
in
source_buffer#insert