src/Pure/ML-Systems/proper_int.ML
changeset 45030 9cf265a192f6
parent 43948 8f5add916a99
child 45067 d5156aa8556d
equal deleted inserted replaced
45029:63144ea111f7 45030:9cf265a192f6
   224   fun inputN (a, b) = TextIO.inputN (a, dest_int b);
   224   fun inputN (a, b) = TextIO.inputN (a, dest_int b);
   225   fun canInput (a, b) = Option.map mk_int (TextIO.canInput (a, dest_int b));
   225   fun canInput (a, b) = Option.map mk_int (TextIO.canInput (a, dest_int b));
   226 end;
   226 end;
   227 
   227 
   228 
   228 
       
   229 (* BinIO *)
       
   230 
       
   231 structure BinIO =
       
   232 struct
       
   233   open BinIO;
       
   234   fun inputN (a, b) = BinIO.inputN (a, dest_int b);
       
   235   fun canInput (a, b) = Option.map mk_int (BinIO.canInput (a, dest_int b));
       
   236 end;
       
   237 
       
   238 
   229 (* Time *)
   239 (* Time *)
   230 
   240 
   231 structure Time =
   241 structure Time =
   232 struct
   242 struct
   233   open Time;
   243   open Time;
   234   fun fmt a b = Time.fmt (dest_int a) b;
   244   fun fmt a b = Time.fmt (dest_int a) b;
   235 end;
   245 end;
   236 
   246 
       
   247 
       
   248 (* Sockets *)
       
   249 
       
   250 structure INetSock =
       
   251 struct
       
   252   open INetSock;
       
   253   fun toAddr (a, b) = INetSock.toAddr (a, dest_int b);
       
   254   fun fromAddr adr = let val (a, b) = INetSock.fromAddr adr in (a, mk_int b) end;
       
   255 end;
       
   256