[MLton] front-end functor bug
Fri, 6 Feb 2004 17:37:20 -0800
> If I compile with -stop tc -warn-match false (ie., elabOnly), the
> errors are not reported.
> If I eliminate (e), the errors are not reported.
> What is truly confusing is the fact that the line numbers of the errors
> correspond to (a) and (b), when I can verify that it is the elaboration
> of (e) that is really causing the problems.
The body of a functor is elaborated when the functor is defined. If
-warn-match is true, then the body is re-elaborated at each
application of the functor. If there were no bugs in MLton, then the
re-elaborations would always succeed -- that is what the elaboration
at the functor definition is supposed to prove. However, there is
some bug that is causing the re-elaboration to fail. Thus you see the
error in the functor body, and you only get the error if the functor
is called and you are compiling with -warn-match true.
Now, as to the bug, I'm not sure yet.