2 (* Copyright Jeremy Yallop 2007.
3 This file is free software, distributed under the MIT license.
4 See the file COPYING for details.
7 (** Primitive instanecs for bounded **)
8 module Bounded
= struct
9 module type Bounded
= sig
15 module Bounded_integer
(B
: sig type t
18 end) : Bounded
with type a
= B.t
=
21 let min_bound = B.min_int
22 let max_bound = B.max_int
24 module Bounded_int32
= Bounded_integer
(Int32
)
25 module Bounded_int64
= Bounded_integer
(Int64
)
26 module Bounded_nativeint
= Bounded_integer
(Nativeint
)
27 module Bounded_int
= struct
29 let min_bound = Pervasives.min_int
30 let max_bound = Pervasives.max_int
32 module Bounded_bool
= struct
37 module Bounded_char
= struct
39 let min_bound = Char.chr
0
40 let max_bound = Char.chr
0xff (* Is this guaranteed? *)
42 module Bounded_unit
= struct
49 type open_flag
= Pervasives.open_flag
=
61 type fpclass
= Pervasives.fpclass
=