Browse Source

Rename constructor Error of Lock module

 + Error is used by core in Result module, renaming to avoid confusion.
Leo 8 years ago
parent
commit
8913f1aa0d
3 changed files with 5 additions and 5 deletions
  1. 1 1
      src/command_def.ml
  2. 3 3
      src/lock.ml
  3. 1 1
      src/lock.mli

+ 1 - 1
src/command_def.ml

@@ -394,7 +394,7 @@ let run ~version ~build_info () =
                Messages.warning "Removing lockfile, should be removed before. \
                                  It's a bug!"; remove ()
              | Free -> ()
-             | Error -> Messages.warning "Error with lockfile"
+             | Err -> Messages.warning "Error with lockfile"
            ));
 
   (* Display total running time, pretty printing is handled by Time module *)

+ 3 - 3
src/lock.ml

@@ -42,7 +42,7 @@ open Core.Std;;
 type lock_status =
     Locked
   | Free
-  | Error
+  | Err
 ;;
 (* Name of the lock file *)
 (* TODO Put it in Const *)
@@ -59,7 +59,7 @@ let status () =
   match Sys.file_exists lock_name with
     `Yes -> Locked
   | `No -> Free
-  | `Unknown -> Error
+  | `Unknown -> Err
 ;;
 
 (* Remove the lock file *)
@@ -85,7 +85,7 @@ let wait ?(until=10) ?(delay=1) () =
       else
         None
     | Free -> Some (lock ())
-    | Error -> failwith "Problem with lock file"
+    | Err -> failwith "Problem with lock file"
   in
   wait_loop 0
   |> (function

+ 1 - 1
src/lock.mli

@@ -35,7 +35,7 @@
 (******************************************************************************)
 
 
-type lock_status = Locked | Free | Error
+type lock_status = Locked | Free | Err
 val status : unit -> lock_status
 val wait : ?until:int -> ?delay:int -> unit -> unit
 val remove : unit -> unit