[MLton-commit] r5482

Matthew Fluet fluet at mlton.org
Thu Mar 29 08:16:28 PST 2007


Patch from Nicolas Bertolotti (PolySpace).

- evol-stub-mingw-error-message.patch

This patch updates the error message we get when a non-implemented function
is executed in order to include the name of the function. It makes it easier
to port to MinGW.


----------------------------------------------------------------------

U   mlton/trunk/basis-library/posix/error.sig
U   mlton/trunk/basis-library/posix/error.sml
U   mlton/trunk/basis-library/posix/stub-mingw.sml

----------------------------------------------------------------------

Modified: mlton/trunk/basis-library/posix/error.sig
===================================================================
--- mlton/trunk/basis-library/posix/error.sig	2007-03-29 16:09:59 UTC (rev 5481)
+++ mlton/trunk/basis-library/posix/error.sig	2007-03-29 16:16:27 UTC (rev 5482)
@@ -63,6 +63,7 @@
 
       val cleared: syserror
       val raiseSys: syserror -> 'a
+      val raiseSysWithMsg: syserror * string -> 'a
 
       structure SysCall :
          sig

Modified: mlton/trunk/basis-library/posix/error.sml
===================================================================
--- mlton/trunk/basis-library/posix/error.sml	2007-03-29 16:09:59 UTC (rev 5481)
+++ mlton/trunk/basis-library/posix/error.sml	2007-03-29 16:16:27 UTC (rev 5482)
@@ -221,6 +221,7 @@
          end
 
       fun raiseSys n = raise SysErr (errorMsg n, SOME n)
+      fun raiseSysWithMsg (n, msg) = raise SysErr ((errorMsg n) ^ ": " ^ msg)
 
       structure SysCall =
          struct

Modified: mlton/trunk/basis-library/posix/stub-mingw.sml
===================================================================
--- mlton/trunk/basis-library/posix/stub-mingw.sml	2007-03-29 16:09:59 UTC (rev 5481)
+++ mlton/trunk/basis-library/posix/stub-mingw.sml	2007-03-29 16:16:27 UTC (rev 5482)
@@ -15,7 +15,7 @@
                           then ()
                           else (PrimitiveFFI.Stdio.print msg
                                 ; PrimitiveFFI.Stdio.print "\n")
-                       ; Error.raiseSys Error.nosys)
+                       ; Error.raiseSysWithMsg (Error.nosys, msg))
          else f
 in
    structure PrimitiveFFI =




More information about the MLton-commit mailing list