summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/prim.sml6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/prim.sml b/src/prim.sml
index d4471143..96880487 100644
--- a/src/prim.sml
+++ b/src/prim.sml
@@ -55,11 +55,7 @@ fun int2s' n =
else
Int64.toString n
-fun float2s n =
- if Real64.compare (n, Real64.fromInt 0) = LESS then
- "-" ^ Real64.toString (Real64.~ n)
- else
- Real64.toString n
+val float2s = String.translate (fn #"~" => "-" | ch => str ch) o Real64.toString
fun toString t =
case t of