summaryrefslogtreecommitdiff
path: root/src/prim.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-09-02 14:59:27 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-09-02 14:59:27 -0400
commit230df59a100ea7f1b8b74297fe28dcb567a283c6 (patch)
treefb9626bebff56bdea99791711814807c9f0dd06f /src/prim.sml
parent2a572eeba9d521400872e6588b3f709818a5d412 (diff)
Switch base types to 64-bit versions
Diffstat (limited to 'src/prim.sml')
-rw-r--r--src/prim.sml18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/prim.sml b/src/prim.sml
index 3e8506a9..8c0e03f7 100644
--- a/src/prim.sml
+++ b/src/prim.sml
@@ -41,6 +41,24 @@ fun p_t t =
| Float n => string (Real64.toString n)
| String s => box [string "\"", string (String.toString s), string "\""]
+fun int2s n =
+ if Int64.compare (n, Int64.fromInt 0) = LESS then
+ "-" ^ Int64.toString (Int64.~ n) ^ "LL"
+ else
+ Int64.toString n ^ "LL"
+
+fun float2s n =
+ if Real64.compare (n, Real64.fromInt 0) = LESS then
+ "-" ^ Real64.toString (Real64.~ n) ^ "L"
+ else
+ Real64.toString n ^ "L"
+
+fun p_t_GCC t =
+ case t of
+ Int n => string (int2s n)
+ | Float n => string (float2s n)
+ | String s => box [string "\"", string (String.toString s), string "\""]
+
fun equal x =
case x of
(Int n1, Int n2) => n1 = n2