[MLton] Constant folding vector expressions
    Vesa Karvonen 
    vesa.a.j.k at gmail.com
       
    Mon Sep 17 01:09:12 PDT 2007
    
    
  
On 9/17/07, skaller <skaller at users.sourceforge.net> wrote:
[...]
> So I do all the integer constant folding with infinite
> precision integers by specification,
That is similar to what MLton is doing.  See [mlton/atoms/]word-x.fun
and word-x.sig.
> even if the results would not agree with a run time calculation.
This shouldn't happen with MLton.  MLton knows the word sizes at
compile-time and performs constant folding with the correct size
(using IntInf mod 2^size arithmetic).
> But it seems this is the very issue you raise here.
Depends on what you mean.  MLton definitely knows the size of Int.int
while compiling.  I just don't (yet) know where to get it.  (The cint
size just happens to be correct on my machine.)
-Vesa Karvonen
    
    
More information about the MLton
mailing list