Domains example
[hcoop/domtool2.git] / src / print.sml
index 4acf9f1..4b497bd 100644 (file)
@@ -59,8 +59,8 @@ fun p_typ' pn (t, _) =
       | TAction (p, r1, r2) =>
        parenIf pn [p_predBoxed p, space 1, p_record r1, space 1,
                    string "=>", space 1, p_record r2]
-      | TNested (p1, p2) =>
-       parenIf pn [p_pred' false p1, space 1, string "=>", space 1, p_pred' false p2]
+      | TNested (p, t) =>
+       parenIf pn [p_pred' false p, space 1, string "=>", space 1, p_typ' false t]
 
       | TError => string "<error>"
       | TUnif (_, ref (SOME t)) => p_typ' pn t
@@ -111,12 +111,11 @@ fun p_exp (e, _) =
       | ESeq es => dBox (valOf (foldr (fn (e, NONE) => SOME [p_exp e]
                                        | (e, SOME ds) => SOME (dBox [p_exp e, string ";", space 1] :: ds))
                                      NONE es))
-      | ELocal (ESeq [e1, e2], _) => dBox [string "let", space 1,
-                                          p_exp e1, space 1,
-                                          string "in", space 1,
-                                          p_exp e2, space 1,
-                                          string "end"]
-      | ELocal e => dBox [string "local(", space 1, p_exp e, string ")"]
+      | ELocal (e1, e2) => dBox [string "let", space 1,
+                                p_exp e1, space 1,
+                                string "in", space 1,
+                                p_exp e2, space 1,
+                                string "end"]
       | EWith (e1, (ESkip, _)) => dBox [p_exp e1, space 1, string "with", space 1, string "end"]
       | EWith (e1, e2) => dBox [p_exp e1, space 1, string "with", p_exp e2, space 1, string "end"]