[MLton-user] Mutual recursion?
    Wesley W. Terpstra 
    wesley at terpstra.ca
       
    Mon Jun 29 13:21:45 PDT 2009
    
    
  
I have a program where the follow compiles
fun a z = aggregate tuple2 word32 word32 $ z
fun b z = aggregate tuple3 a word32 word32 $ z
fun c z = aggregate tuple2 a b $ z
but the following gives a sequence of gigantic type errors, starting
at line 'and c z =':
fun a z = aggregate tuple2 word32 word32 $ z
and b z = aggregate tuple3 a word32 word32 $ z
and c z = aggregate tuple2 a b $ z
Could someone perhaps explain to me why switching 'fun' for 'and' can
lead to problems? I always thought that ML would treat it more-or-less
the same if I wasn't using mutual recursion.
    
    
More information about the MLton-user
mailing list