Closed hebiyan closed 9 years ago
Unfortunately mosml's implementation of IntInf
is not standard compliant wrt eqtype of the IntInf.int
type.
However, you can compare IntInf.int
values by using either IntInf.eq
or IntInf.compare
:
- infix ==
val op == = IntInf.eq;
> infix 0 ==
val == = fn : int/1 * int/1 -> bool
- IntInf.fromInt 1 == IntInf.fromInt 1;
> val it = true : bool
I wrote this code in MacOS X 10.9.5 using mosml 2.10 installed from pkg file.
According to the basis library document (http://sml-family.org/Basis/int-inf.html#section:0), signature INT_INF includes INTEGER, and INTEGER has eqtype int. So, I should write like "IntInf.fromInt 1 = IntInf.fromInt 1" using comparison operators. Could you show me why IntInf is not eqtype, please?
Sorry for my poor english. Thank you.