let load_notation ~include_paths fname =
let ic = open_in fname in
let lexbuf = Ulexing.from_utf8_channel ic in
- let status = ref LexiconSync.init in
+ let status = ref LexiconEngine.initial_status in
try
while true do
status := fst (GrafiteParser.parse_statement ~include_paths lexbuf !status)
let parse_environment ~include_paths str =
let lexbuf = Ulexing.from_utf8_string str in
- let status = ref LexiconSync.init in
+ let status = ref LexiconEngine.initial_status in
try
while true do
status := fst (GrafiteParser.parse_statement ~include_paths lexbuf !status)
metadata: LibraryNoDb.metadata list;
}
+let initial_status = {
+ aliases = DisambiguateTypes.Environment.empty;
+ multi_aliases = DisambiguateTypes.Environment.empty;
+ lexicon_content_rev = [];
+ notation_ids = [];
+ metadata = [];
+}
+
let add_lexicon_content cmds status =
let content = status.lexicon_content_rev in
let content' =
metadata: LibraryNoDb.metadata list;
}
+val initial_status: status
+
val eval_command : status -> LexiconAst.command -> status
val set_proof_aliases:
status ->
(DisambiguateTypes.Environment.key * DisambiguateTypes.codomain_item) list ->
status
+
in
List.iter CicNotation.remove_notation notation_to_remove
-let init =
- {
- LexiconEngine.aliases = DisambiguateTypes.Environment.empty;
- multi_aliases = DisambiguateTypes.Environment.empty;
- lexicon_content_rev = [];
- notation_ids = [];
- metadata = [];
- }
from:LexiconEngine.status -> LexiconEngine.status ->
(DisambiguateTypes.domain_item * DisambiguateTypes.codomain_item) list
-val init: LexiconEngine.status