From 230df59a100ea7f1b8b74297fe28dcb567a283c6 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 2 Sep 2008 14:59:27 -0400 Subject: Switch base types to 64-bit versions --- src/prim.sml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/prim.sml') 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 -- cgit v1.2.3