1 (* Copyright (C
) 2009 Matthew Fluet
.
2 * Copyright (C
) 1999-2006 Henry Cejtin
, Matthew Fluet
, Suresh
3 * Jagannathan
, and Stephen Weeks
.
4 * Copyright (C
) 1997-2000 NEC Research Institute
.
6 * MLton is released under a BSD
-style license
.
7 * See the file MLton
-LICENSE for details
.
10 functor FixIntInf(PIntInf
: sig include INT_INF
end) : INT_INF
=
14 structure FIntInf
= FixInt(struct open PIntInf
end)
19 (* SML
/NJ doesn
't properly shift IntInf
.int values
. *)
26 val p
= pow2 (Pervasive
.Word.>> (w
, 0wx1
))
29 if 0wx1
= Pervasive
.Word.andb (0wx1
, w
)
34 val ~
>> = fn (a
, b
) => a
div (pow2 b
)
38 structure IntInf
= FixIntInf(struct open Pervasive
.IntInf
end)