(* $Id$ *)
+open Printf
+
exception Drop
exception IncludedFileNotCompiled of string (* file name *)
exception Macro of
GrafiteAst.loc *
(Cic.context -> GrafiteTypes.status * Cic.term GrafiteAst.macro)
+exception ReadOnlyUri of string
type options = {
do_heavy_checks: bool ;
GrafiteTypes.add_moo_content [cmd] status,[]
| GrafiteAst.Include (loc, baseuri) ->
let moopath = LibraryMisc.obj_file_of_baseuri ~basedir ~baseuri in
- let metadatapath= LibraryMisc.metadata_file_of_baseuri ~basedir ~baseuri in
if not (Sys.file_exists moopath) then
raise (IncludedFileNotCompiled moopath);
let status = eval_from_moo.efm_go status moopath in
let v = Http_getter_misc.strip_trailing_slash value in
try
ignore (String.index v ' ');
- raise (GrafiteTypes.Command_error "baseuri can't contain spaces")
+ GrafiteTypes.command_error "baseuri can't contain spaces"
with Not_found -> v
in
+ if Http_getter_storage.is_read_only value then begin
+ HLog.error (sprintf "uri %s belongs to a read-only repository" value);
+ raise (ReadOnlyUri value)
+ end;
if not (GrafiteMisc.is_empty value) && opts.clean_baseuri then begin
- HLog.warn ("baseuri " ^ value ^ " is not empty");
+ HLog.message ("baseuri " ^ value ^ " is not empty");
HLog.message ("cleaning baseuri " ^ value);
LibraryClean.clean_baseuris ~basedir [value];
end;
"\nPlease use a variant."));
end;
assert (metasenv = metasenv');
- let goalno =
- match metasenv' with (goalno,_,_)::_ -> goalno | _ -> assert false
- in
let initial_proof = (Some uri, metasenv, bo, ty) in
let initial_stack = Continuationals.Stack.of_metasenv metasenv in
{ status with GrafiteTypes.proof_status =
* http://helm.cs.unibo.it/
*)
+(* $Id$ *)
+
exception Option_error of string * string
exception Statement_error of string
exception Command_error of string
+val command_error: string -> 'a (** @raise Command_error *)
+
type incomplete_proof = {
proof: ProofEngineTypes.proof;
stack: Continuationals.Stack.t;