summaryrefslogtreecommitdiff
path: root/src/cjr_print.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-11-06 18:49:38 -0500
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-11-06 18:49:38 -0500
commitdd4d718ac9f0a9862ebef19beb568bbedcc85848 (patch)
tree89c4891d29fe4c10e81ed23ad7747b2a7d115064 /src/cjr_print.sml
parent36952b2e49afdb4ba8024eb6372992e4b5d8df7a (diff)
Tree demo works
Diffstat (limited to 'src/cjr_print.sml')
-rw-r--r--src/cjr_print.sml9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cjr_print.sml b/src/cjr_print.sml
index b6c32e24..2485e317 100644
--- a/src/cjr_print.sml
+++ b/src/cjr_print.sml
@@ -70,13 +70,14 @@ fun isUnboxable (t : typ) =
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 @@ fun p_exp' par env (e, loc) =
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);"