[MLton] overloading

Matthew Fluet fluet@cs.cornell.edu
Thu, 22 Jan 2004 15:57:28 -0500 (EST)

I notice in the commitlog:

sweeks      04/01/17 12:43:21

  Modified:    basis-library/libs/basis-2002/top-level overloads.sml
               mlton/elaborate elaborate-core.fun
               regression overloading.sml
  Added:       regression/fail constant-too-big.sml
  Allow overloading of / on Real32.real and Real64.real.

  Put in hack to make sure that / is resolved before other constants.

This was shortly after I read Tom Murphy's 2004 bugs message with the
grammar bugs on infix{,r}.  When I was looking at the changes to
elaborate-core.fun, I find it a little disturbing that the constant "/"
appears there.  I'm wondering if a more principled approach might be to
extend the _overload syntax to
 _overload [n] id : ty as longid [and longid]*
where the the digit would indicate a priority.  Then we just (stable) sort
the overloads by priority and resolve.