]> matita.cs.unibo.it Git - helm.git/blobdiff - matita/matitaWiki.ml
List.ma: added function nth (with default value in case of failure)
[helm.git] / matita / matitaWiki.ml
index aea67623e5809c90938dcc0112a01b409d11bfe5..c7c5e8838c74defd6a6687aa0b6b938e866a39c5 100644 (file)
@@ -124,6 +124,10 @@ let outer_syntax_parser () =
              with
               Failure _ -> assert false
 ;;
+
+let include_paths =
+ lazy (Helm_registry.get_list Helm_registry.string "matita.includes")
+;;
   
 let rec interactive_loop () = 
   (* every loop is terminated by a terminator both on stdout and stderr *)
@@ -155,7 +159,7 @@ let rec interactive_loop () =
         let watch_statuses lexicon_status grafite_status =
          match grafite_status.GrafiteTypes.proof_status with
             GrafiteTypes.Incomplete_proof
-             {GrafiteTypes.proof = uri,metasenv,bo,ty,attrs ;
+             {GrafiteTypes.proof = uri,metasenv,_subst,bo,ty,attrs ;
               GrafiteTypes.stack = stack } ->
               let open_goals = Continuationals.Stack.open_goals stack in
               print_endline
@@ -166,13 +170,10 @@ let rec interactive_loop () =
                       (List.find (fun (j,_,_) -> j=i) metasenv)
                    ) open_goals))
           | _ -> ()
-        in
-        let include_paths =
-         Helm_registry.get_list Helm_registry.string "matita.includes"
         in
          run_script str 
            (MatitaEngine.eval_from_stream ~first_statement_only:true ~prompt:false
-           ~include_paths ~watch_statuses) ;
+           ~include_paths:(Lazy.force include_paths) ~watch_statuses) ;
          interactive_loop (Some (List.length !lexicon_status))
   with 
    | GrafiteEngine.Macro (floc,_) ->