]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/software/matita/matitaScript.ml
ncheck works in the current ctx
[helm.git] / helm / software / matita / matitaScript.ml
index 21450e5e796e7d74c8f7549e156f079799e80646..e191ee7b31d6c09a01795c2b824297c0dfb534e3 100644 (file)
@@ -377,10 +377,14 @@ let eval_nmacro include_paths (buffer : GText.buffer) guistuff grafite_status us
        [status, parsed_text], "", parsed_text_length
   | TA.NCheck (_,t) ->
       let status = script#grafite_status in
-      let ctx = [] in
+      let _,_,menv,subst,_ = status#obj in
+      let ctx = 
+        try let _,(_,ctx,_) = List.hd menv in ctx
+        with Failure "hd" -> []
+      in
       let m, s, status, t = 
         GrafiteDisambiguate.disambiguate_nterm 
-          None status [] [] ctx (parsed_text,parsed_text_length,
+          None status ctx menv subst (parsed_text,parsed_text_length,
             CicNotationPt.Cast (t,CicNotationPt.Implicit `JustOne))  
           (* XXX use the metasenv, if possible *)
       in