Browse Source

Fix indent

Leo 8 years ago
parent
commit
7ed7985240
4 changed files with 35 additions and 34 deletions
  1. 8 7
      src/command_def.ml
  2. 13 13
      src/file_com.ml
  3. 13 13
      src/id_parsing.ml
  4. 1 1
      src/test/id_parsing_t.ml

+ 8 - 7
src/command_def.ml

@@ -150,7 +150,7 @@ let reset =
        match ( num, cmd ) with
        | ( num, None ) | ( num, Some [] ) -> Tmp_file.reset2num ~rc num
        | ( num, Some cmd_list ) ->
-           List.iter ~f:(fun cmd -> Tmp_file.reset_cmd ~rc num cmd) cmd_list
+         List.iter ~f:(fun cmd -> Tmp_file.reset_cmd ~rc num cmd) cmd_list
     )
 ;;
 let reset_all =
@@ -228,7 +228,7 @@ let delete =
        let rc = Lazy.force rc in
        iter_seq
          ~f:(fun num_cmd ->
-           Remove_command.run ~rc num_cmd) cmd_seq)
+              Remove_command.run ~rc num_cmd) cmd_seq)
 ;;
 
 (* To display current state *)
@@ -259,11 +259,12 @@ let edit =
     (fun { rc } cmd_seq () ->
        let rc = Lazy.force rc in
        iter_seq cmd_seq ~f:(fun n ->
-       let position =
-         Option.value n
-           ~default:(List.length (rc.Settings_t.progs) - 1)
-       in
-       Edit_command.run ~rc position))
+              let position =
+                Option.value n
+                  ~default:(List.length (rc.Settings_t.progs) - 1)
+              in
+              Edit_command.run ~rc position)
+    )
 ;;
 
 (* To display informations about the licence *)

+ 13 - 13
src/file_com.ml

@@ -44,19 +44,19 @@ type t = Settings_v.rc_file;;
 (* Message to display on first use, i.e. on initialisation of rc file *)
 let welcome_msg =
   sprintf
-  "Nice to meet you! Here is some tips to get started with OcLaunch.\n\
-   Use 'help' subcommand to get help (it works both after the name of the \
-   software and with another subcommand). For instance run\n\
-   `oclaunch help add`\n\
-   For further help, see https://oclaunch.eu.org. Report any bug at %s\
-   \n\
-   \n\
-   Feedback is welcome at feedback@oclaunch.eu.org.\n\
-   To get remind for new stable versions, subscribe to our low-traffic mailing \
-   list: announce@oclaunch.eu.org. \
-   More here: https://lnch.ml/ml\n\
-   See you soon! To keep in touch: https://lnch.ml/kt\n"
-   Bug.url
+    "Nice to meet you! Here is some tips to get started with OcLaunch.\n\
+     Use 'help' subcommand to get help (it works both after the name of the \
+     software and with another subcommand). For instance run\n\
+     `oclaunch help add`\n\
+     For further help, see https://oclaunch.eu.org. Report any bug at %s\
+     \n\
+     \n\
+     Feedback is welcome at feedback@oclaunch.eu.org.\n\
+     To get remind for new stable versions, subscribe to our low-traffic mailing \
+     list: announce@oclaunch.eu.org. \
+     More here: https://lnch.ml/ml\n\
+     See you soon! To keep in touch: https://lnch.ml/kt\n"
+    Bug.url
 ;;
 
 (* Function to write the rc file *)

+ 13 - 13
src/id_parsing.ml

@@ -75,11 +75,11 @@ let atomise human_ids =
 let deinter = function
   | Unique a -> [Unique a]
   | Between (a,b) ->
-      (* Two use cases to preserve order *)
-      if a < b
-      (* Note that (a-b+1) is the length of interval [a;b] *)
-      then List.init (b-a+1) ~f:(fun i -> Unique (a + i))
-      else List.init (a-b+1) ~f:(fun i -> Unique (a - i))
+    (* Two use cases to preserve order *)
+    if a < b
+    (* Note that (a-b+1) is the length of interval [a;b] *)
+    then List.init (b-a+1) ~f:(fun i -> Unique (a + i))
+    else List.init (a-b+1) ~f:(fun i -> Unique (a - i))
 ;;
 
 (* Transform string (separated) as follow:
@@ -96,7 +96,7 @@ let list_from_human human =
   |> List.concat
   (* Return final list of int *)
   |> List.map ~f:(function
-    Unique a -> a | _ -> assert false)
+           Unique a -> a | _ -> assert false)
   |> Tools.spy1_list ~f:Int.to_string
 ;;
 
@@ -108,15 +108,15 @@ let id_sequence =
 (* With id sequences, we get None or Some [] from command line instructions and
  * we get Some list in other cases. With this function, we iterate (over a list
  * of ids) call of function having the following behavior:
-   * - Default value when nothing is given (None)
-   * - Execute things one by one *)
+ * - Default value when nothing is given (None)
+ * - Execute things one by one *)
 let helper ~f = function
   | None | Some [] ->
-      Messages.debug "Nothing given, default behavior";
-      (f None)
+    Messages.debug "Nothing given, default behavior";
+    (f None)
   | Some li ->
-      Messages.debug "Working with the following arguments:";
-      Tools.spy1_list ~f:Int.to_string li |> ignore;
-      List.iter ~f:(fun element -> f (Some element)) li
+    Messages.debug "Working with the following arguments:";
+    Tools.spy1_list ~f:Int.to_string li |> ignore;
+    List.iter ~f:(fun element -> f (Some element)) li
 ;;
 

+ 1 - 1
src/test/id_parsing_t.ml

@@ -56,7 +56,7 @@ let ll_data = [
   ( "1,3,5", [1;3;5], "Canonical case: list of unique" );
   ( "1-3,5,10-12,23", [1;2;3;5;10;11;12;23], "Canonical case: both" );
   ( "0-30", [0; 1; 2; 3; 4; 5; 6; 7; 8; 9; 10; 11; 12; 13; 14; 15; 16; 17; 18;
-  19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30], "Long interval" );
+             19; 20; 21; 22; 23; 24; 25; 26; 27; 28; 29; 30], "Long interval" );
   ( "1-3", [1;2;3], "With errors" );
   ( "1-3", [1;2;3], "With double" );
   ( "24-24", [24], "Interval a-a" );