Source

ocaml-indent / args.ml

Diff from to
 let paths, debug, lines, showstate, cursor =
   let rev_paths = ref [] in
   let debug = ref false in
-  let lines = ref None in
+  let lines = ref Pos.Lines.WholeFile in
   let showstate = ref false in
   let cursor = ref None in
   Arg.parse [
                             int_of_string (String.sub s (pos+1) (String.length s - pos - 1))) in
         if start <= 0 || end_ <= 0 || start > end_ then
           failwith (Printf.sprintf "Wrong -lines specification: %s" s);
-        lines := Some (start, end_)
+        lines := Pos.Lines.Lines (start, end_)
       with
       | _ -> failwith (Printf.sprintf "Wrong -lines specification: %s" s)),
      "lines, ex. 10-12") ;
   begin match paths, !lines with
   | [], _ -> assert false
   | [_], _ -> ()
-  | _, Some _ -> failwith "Region can be specified with at most one file"
+  | _, Pos.Lines.Lines _ -> failwith "Region can be specified with at most one file"
   | _ -> ()
   end;
   paths, !debug, !lines, !showstate, !cursor