@@ -9,7 +9,7 @@ module ICConf : Lin.Spec = struct
9
9
let cleanup = In_channel. close
10
10
11
11
open Lin
12
- let int ,int64 = nat_small,nat64_small
12
+ let int ,int64 ,bytes = nat_small,nat64_small,bytes_small
13
13
14
14
let api = [
15
15
(* Only one t is tested, so skip stdin and opening functions *)
@@ -29,9 +29,8 @@ module ICConf : Lin.Spec = struct
29
29
val_ " In_channel.input_char" In_channel. input_char (t @-> returning_or_exc (option char )) ;
30
30
val_ " In_channel.input_byte" In_channel. input_byte (t @-> returning_or_exc (option int )) ;
31
31
val_ " In_channel.input_line" In_channel. input_line (t @-> returning_or_exc (option string )) ;
32
- (* bytes not yet supported by the Lin library *)
33
- (* val_ "In_channel.input" In_channel.input (t @-> bytes @-> int @-> int @-> returning int) ; *)
34
- (* val_ "In_channel.really_input" In_channel.really_input (t @-> bytes @-> int @-> int @-> returning (option unit)) ; *)
32
+ val_ " In_channel.input" In_channel. input (t @-> bytes @-> int @-> int @-> returning_or_exc int ) ;
33
+ val_ " In_channel.really_input" In_channel. really_input (t @-> bytes @-> int @-> int @-> returning_or_exc (option unit )) ;
35
34
val_ " In_channel.really_input_string" In_channel. really_input_string (t @-> int @-> returning_or_exc (option string )) ;
36
35
(* input_all generates counter-examples that are impossibly long *)
37
36
(* val_ "In_channel.input_all" In_channel.input_all (t @-> returning_or_exc string) ; *)
@@ -53,7 +52,7 @@ module OCConf : Lin.Spec = struct
53
52
let lift f (_ , chan ) = f chan
54
53
55
54
open Lin
56
- let int ,int64 ,string = nat_small,nat64_small,string_small
55
+ let int ,int64 ,string ,bytes = nat_small,nat64_small,string_small,bytes_small
57
56
let api = [
58
57
(* Only one t is tested, so skip stdout, stderr and opening functions *)
59
58
@@ -76,10 +75,8 @@ module OCConf : Lin.Spec = struct
76
75
val_ " Out_channel.output_char" (lift Out_channel. output_char) (t @-> char @-> returning_or_exc unit ) ;
77
76
val_ " Out_channel.output_byte" (lift Out_channel. output_byte) (t @-> int @-> returning_or_exc unit ) ;
78
77
val_ " Out_channel.output_string" (lift Out_channel. output_string) (t @-> string @-> returning_or_exc unit ) ;
79
-
80
- (* val_ "Out_channel.output_bytes" Out_channel.output_bytes (t @-> bytes @-> returning unit) ; *)
81
- (* val_ "Out_channel.output" Out_channel.output (t @-> bytes @-> int @-> int @-> returning unit) ; *)
82
-
78
+ val_ " Out_channel.output_bytes" (lift Out_channel. output_bytes) (t @-> bytes @-> returning_or_exc unit ) ;
79
+ val_ " Out_channel.output" (lift Out_channel. output) (t @-> bytes @-> int @-> int @-> returning_or_exc unit ) ;
83
80
val_ " Out_channel.output_substring" (lift Out_channel. output_substring) (t @-> string @-> int @-> int @-> returning_or_exc unit ) ;
84
81
val_ " Out_channel.set_binary_mode" (lift Out_channel. set_binary_mode) (t @-> bool @-> returning_or_exc unit ) ;
85
82
val_ " Out_channel.set_buffered" (lift Out_channel. set_buffered) (t @-> bool @-> returning_or_exc unit ) ;
0 commit comments