Mercurial > urweb
comparison src/prim.sml @ 567:1901db85acb4
Start of JsComp
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sat, 20 Dec 2008 14:19:21 -0500 |
parents | ffa18975e661 |
children | 66463006f893 |
comparison
equal
deleted
inserted
replaced
566:a152905c3c3b | 567:1901db85acb4 |
---|---|
51 if Real64.compare (n, Real64.fromInt 0) = LESS then | 51 if Real64.compare (n, Real64.fromInt 0) = LESS then |
52 "-" ^ Real64.toString (Real64.~ n) | 52 "-" ^ Real64.toString (Real64.~ n) |
53 else | 53 else |
54 Real64.toString n | 54 Real64.toString n |
55 | 55 |
56 fun toString t = | |
57 case t of | |
58 Int n => int2s n | |
59 | Float n => float2s n | |
60 | String s => s | |
61 | |
56 fun p_t_GCC t = | 62 fun p_t_GCC t = |
57 case t of | 63 case t of |
58 Int n => string (int2s n) | 64 Int n => string (int2s n) |
59 | Float n => string (float2s n) | 65 | Float n => string (float2s n) |
60 | String s => box [string "\"", string (String.toString s), string "\""] | 66 | String s => box [string "\"", string (String.toString s), string "\""] |