Commits

james woodyatt committed c3fce62

[Iom_reactor] ocaml-3.12 is more vigilant at type checking.

Comments (0)

Files changed (2)

 d673174367d73c0653bd4da7f1fc7b989187b628 iom-0_3
 f2ed231a1f31b9065ad0d7ff404945a317fb164c iom-0_0
 378e6bc0810fd540ebd171c7bf87e9e8cde1eb3a oni-1.00rc1
+cf4424678594c28e155678e0b07d26c795643cab oni-1.00rc2
+cf4424678594c28e155678e0b07d26c795643cab oni-1.00rc2
+5a5ec43d29b7e0bdb54dd687e29b75b17a5f9c28 oni-1.00rc2
+7c63e8712dd0398e9cc2fc6641737bb3c1e13087 oni-1.00rc3
+fc9c9dc47f24b509f537648ec147922a24b9788d oni-1.00rc4
+43661829ad49df75e886f2d1a0c2a4b15397ea73 oni-1.00rc5
+fb25e3a1bb091121939338d331a52ffda1fd8b54 oni-1.00rc6

iom/iom_reactor.ml

     object(self:'self)
         inherit Iom_gadget.start as super
         inherit Iom_gadget.next
-    	constraint 'control = [> Iom_stream.stop ]
+        constraint 'control = [> Iom_stream.stop ]
         constraint 'self = unit Iom_gadget.t #Nx_poll.event
-
+        
         val mutable started_ = false
-
+        
         method private stop: 'a. 'a Iom_gadget.t = Iom_gadget.abort
-    		
-    	method private control = function
+        
+        method private control = function
             | `Stop -> self#stop
             | _ -> self#next
-    	
-    	method private guard = controlRx#get self#control
+        
+        method private guard = controlRx#get self#control
         
         method start =
             if started_ then
     object(self:'self)
         inherit ['control] core controlRx as super
         constraint 'control = [> Iom_stream.flowcontrol ]
-
+        
         val mutable source_ = false
         
         method virtual private source: 'source option
-
+        
         method private service p =
             let eopt = self#source in
             match eopt, source_ with
                 Nx_poll.Working (p, Iom_gadget.start (sourceTx#put event))
             | Some event, false ->
                 Nx_poll.Final (Iom_gadget.start (sourceTx#put event))
-
+        
         method private stop =
             if source_ then self#unload;
             super#stop
-
-    	method private ready =
+        
+        method private ready =
             if not source_ then Iom_gadget.poll self kernel;
             source_ <- true;
             self#next
         
-    	method private wait =
+        method private wait =
             if source_ then begin
                 self#unload;
                 source_ <- false;
             end;
             self#next
-    		
-    	method private control = function
-    		| #Iom_stream.ready -> self#ready
-    		| #Iom_stream.wait -> self#wait
+            
+        method private control = function
+            | #Iom_stream.ready -> self#ready
+            | #Iom_stream.wait -> self#wait
             | c -> super#control c
     end
 
     inherit [unit Iom_gadget.t] Nx_poll.time ?t0 dt
     constraint 'time = [> time ]
     
-    method private source = Some (`Time epoch_)
-
+    method private source = Some (`Time epoch_ : 'time)
+    
     method private ready =
         epoch_ <- Cf_tai64n.add (Cf_tai64n.now ()) dt;
         super#ready
     object(self:'self)
         inherit ['control, 'fragment] source ~k pad as source
         inherit [unit Iom_gadget.t] Nx_poll.file rwx fd as poll
-
+        
         constraint 'fragment = #Iom_octet_stream.fragment
         constraint 'notify = [> Iom_stream.failed ]
-
+        
         val mutable buffer_ = ""
         val mutable cursor_ = 0
         val mutable more_ = Iom_stream.More
                 end
                 else
                     Lazy.force cons_ ()
-
+        
         method private service p =
             assert source_;
             try
             with
             | x ->
                 self#fail x
-
+        
         initializer
             let rec f () =
                 if 
     object(self:'self)
         inherit ['control] core controlRx as core
         inherit [unit Iom_gadget.t] Nx_poll.file `W fd as poll
-
+        
         constraint 'fragment = #Iom_octet_stream.fragment
         constraint 'notify = [> Iom_stream.flownotify ]
         
         val mutable buffer_ = Cf_deque.nil
         val mutable more_ = Iom_stream.More
-
+        
         method private stop =
             self#unload;
             core#stop
-
+        
         method private fail: 'a. exn -> 'a Iom_gadget.t = fun x ->
             notifyTx#put (`Failed x) >>= fun () ->
             self#stop
-    
+        
         method private complete = notifyTx#put `Wait
-
+        
         method private octets buf pos len = Unix.write fd buf pos len
         
         method private consume =
             with
             | x ->
                 Nx_poll.Final (self#fail x)
-    	
-    	method private guard =
-    		controlRx#get self#control >>= fun ()  ->
+        
+        method private guard =
+            controlRx#get self#control >>= fun ()  ->
             fragmentRx#get self#receive
-
+        
         method start =
             try
                 let start = core#start in