new SML/NJ

Matthew Fluet fluet@CS.Cornell.EDU
Thu, 8 Feb 2001 17:58:34 -0500 (EST)


> I see that version 110.32 of SML/NJ is out, and it claims to have a `full
> implementation of IntInf'.  I would love to switch from 110.9.1, which is
> pretty much what we are all using to this since I am constantly being pimped
> while writing code by the fact that the overloading in 110.9.1 doesn't work
> for IntInf.int things (+, literals, etc.).  

I installed a copy of 110.32 last weekend and played with the IntInf a
little bit.  The performance is nothing compared to MLton with gmp.  Also,
they haven't worked out all of the overloading:

Standard ML of New Jersey v110.32 [FLINT v1.5], December 22, 2000
- val x : IntInf.int = 1;
[autoloading]
[autoloading done]
stdIn:1.1-1.23 Error: pattern and expression in val dec don't agree
[literal]
  pattern:    IntInf.int
  expression:    int
  in declaration:
    x : IntInf.int = 1

So, you have to write factorial like:

local
  open IntInf
  val ii0 = IntInf.fromInt 0
  val ii1 = IntInf.fromInt 1
in
  fun fact n = if n = ii0
		 then ii1
		 else n * (fact (n - ii1))
end

Even better, you get the comforting warning

stdIn:6.21 Warning: calling polyEqual
val fact = fn : IntInf.int -> IntInf.int

But, I guess it's progress.

> On the other hand, I remember
> Stephen had some problems with new incompatibilities in versions of SML/NJ
> after 110.9.1.  Could you (Stephen) give it a shot and see if it is acceptable
> to you?

I don't know if Steve had something else in mind, but I know that CM has
changed a bit since 109.1.  I suspect the major work would be tracking
down all the necessary changes to sources.cm's.  But, on the other hand,
I've been itching to try out the new "compile servers" on a dual-processor
machine.