Browse Source

Clean up code

 - Add type in modules
Leo 10 years ago
parent
commit
26522487da
2 changed files with 7 additions and 1 deletions
  1. 3 0
      src/file_com.ml
  2. 4 1
      src/tmp_file.ml

+ 3 - 0
src/file_com.ml

@@ -38,6 +38,9 @@ open Core.Std;;
 
 (* Read settings and programs to launch from rc file *)
 
+(* Type of the values *)
+type t = Settings_v.rc_file;;
+
 (* Return the configuration file template *)
 let rc_template () =
   Settings_v.create_rc_file ~progs:[] ~settings:[]

+ 4 - 1
src/tmp_file.ml

@@ -36,6 +36,9 @@
 
 open Core.Std;;
 
+(* Type of the values *)
+type t = Tmp_biniou_t.tmp_file;;
+
 (* XXX Using and keyword because each function can call each other *)
 (* Function to read the tmp file *)
 let rec read () =
@@ -57,7 +60,7 @@ let rec read () =
         read ()
 
 (* Function to write the tmp file *)
-and write (tmp_file:Tmp_biniou_t.tmp_file) =
+and write (tmp_file:t) =
     (* Short name *)
     let name = Const.tmp_file in
     let biniou_tmp = Tmp_biniou_b.string_of_tmp_file tmp_file in