@@ -57,10 +57,9 @@ struct
57
57
Array1. fill ba 0 ;
58
58
ba
59
59
60
- let cleanup _ = ()
60
+ let cleanup _ = ()
61
61
62
- let precond n _s = match n with
63
- | _ -> true
62
+ let precond _n _s = true
64
63
65
64
let run n ba = match n with
66
65
| Size_in_bytes -> Res (STM. int , Array1. size_in_bytes ba)
@@ -71,15 +70,15 @@ struct
71
70
| Fill n -> Res (result unit exn , protect (Array1. fill ba) n)
72
71
73
72
let postcond n (s :int list ) res = match n, res with
74
- | Size_in_bytes , Res ((Int,_ ),i ) -> i = 8 * (List. length s)
73
+ | Size_in_bytes , Res ((Int,_ ),r ) -> r = 8 * (List. length s)
75
74
| Get i , Res ((Result (Int,Exn),_ ), r ) ->
76
75
if i < 0 || i > = List. length s
77
- then r = Error (Invalid_argument " index out of bounds" )
78
- else r = Ok (List. nth s i)
76
+ then r = Error (Invalid_argument " index out of bounds" )
77
+ else r = Ok (List. nth s i)
79
78
| Set (i ,_ ), Res ((Result (Unit,Exn),_ ), r ) ->
80
79
if i < 0 || i > = List. length s
81
- then r = Error (Invalid_argument " index out of bounds" )
82
- else r = Ok ()
80
+ then r = Error (Invalid_argument " index out of bounds" )
81
+ else r = Ok ()
83
82
(* STM don't support bigarray type for the moment*)
84
83
(* | Sub (i,l), Res ((Result (Array Char,Exn),_), r) ->
85
84
if i < 0 || l < 0 || i+l > List.length s
0 commit comments