Mercurial > urweb
diff src/cjr_print.sml @ 470:7cb418e9714f
Tree demo works
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 06 Nov 2008 18:49:38 -0500 |
parents | 4efab85405be |
children | 20fab0e96217 |
line wrap: on
line diff
--- a/src/cjr_print.sml Thu Nov 06 17:09:53 2008 -0500 +++ b/src/cjr_print.sml Thu Nov 06 18:49:38 2008 -0500 @@ -70,13 +70,14 @@ fun p_typ' par env (t, loc) = case t of - TFun (t1, t2) => parenIf par (box [p_typ' true env t2, + TFun (t1, t2) => parenIf par (box [string "(", + p_typ' true env t2, space, string "(*)", space, string "(", p_typ env t1, - string ")"]) + string "))"]) | TRecord i => box [string "struct", space, string "__uws_", @@ -1151,6 +1152,10 @@ p_exp env initial, string ";", newline, + case prepared of + NONE => box [string "printf(\"Executing: %s\\n\", query);", + newline] + | _ => box [], string "PGresult *res = ", case prepared of NONE => string "PQexecParams(conn, query, 0, NULL, NULL, NULL, NULL, 0);"