X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2FgTopLevel%2FtermEditor.ml;h=e7b50c2662efadad81dcfb91615bc6cb505d200b;hb=4566aebfc281e0ad37da2f0f60155d5d9185a7f2;hp=ca5cca601e615c6daf96b5bdcaff3f525852e1d3;hpb=12809955a4a6c693072f5b924603165f83cc382e;p=helm.git diff --git a/helm/gTopLevel/termEditor.ml b/helm/gTopLevel/termEditor.ml index ca5cca601..e7b50c266 100644 --- a/helm/gTopLevel/termEditor.ml +++ b/helm/gTopLevel/termEditor.ml @@ -48,20 +48,22 @@ class type term_editor = method reset : unit (* The input of set_term is unquoted *) method set_term : string -> unit - method environment : DisambiguatingParser.Environment.t ref + method environment : DisambiguatingParser.EnvironmentP3.t ref end -module Make(C:Disambiguate_types.Callbacks) = +module Make(C:DisambiguateTypes.Callbacks) = struct module Disambiguate' = DisambiguatingParser.Make(C);; - class term_editor_impl mqi_handle ?packing ?width ?height + class term_editor_impl ~(dbh:Dbi.connection) ?packing ?width ?height ?isnotempty_callback ?share_environment_with () : term_editor = let environment = match share_environment_with with - None -> ref DisambiguatingParser.Environment.empty + None -> ref + (DisambiguatingParser.EnvironmentP3.of_string + DisambiguatingParser.EnvironmentP3.empty) | Some obj -> obj#environment in let input = GText.view ~editable:true ?width ?height ?packing () in @@ -97,8 +99,12 @@ module Make(C:Disambiguate_types.Callbacks) = ) context in let environment',metasenv,expr = - Disambiguate'.disambiguate_term mqi_handle context metasenv + match + Disambiguate'.disambiguate_term ~dbh context metasenv (input#buffer#get_text ()) !environment + with + [environment',metasenv,expr] -> environment',metasenv,expr + | _ -> assert false in environment := environment'; (metasenv, expr)