diff src/prim.sml @ 582:66463006f893

Source containing an int
author Adam Chlipala <adamc@hcoop.net>
date Thu, 01 Jan 2009 10:08:22 -0500
parents 1901db85acb4
children 395a5d450cc0
line wrap: on
line diff
--- a/src/prim.sml	Tue Dec 30 16:11:29 2008 -0500
+++ b/src/prim.sml	Thu Jan 01 10:08:22 2009 -0500
@@ -47,6 +47,12 @@
     else
         Int64.toString n ^ "LL"
 
+fun int2s' n =
+    if Int64.compare (n, Int64.fromInt 0) = LESS then
+        "-" ^ Int64.toString (Int64.~ n)
+    else
+        Int64.toString n
+
 fun float2s n =
     if Real64.compare (n, Real64.fromInt 0) = LESS then
         "-" ^ Real64.toString (Real64.~ n)
@@ -55,7 +61,7 @@
 
 fun toString t =
     case t of
-        Int n => int2s n
+        Int n => int2s' n
       | Float n => float2s n
       | String s => s