summaryrefslogtreecommitdiff
path: root/src/monoize.sml
diff options
context:
space:
mode:
authorGravatar Ziv Scully <ziv@mit.edu>2015-09-30 00:33:52 -0400
committerGravatar Ziv Scully <ziv@mit.edu>2015-09-30 00:33:52 -0400
commit36cb6a55281f753774e491cce3178eb8c927983e (patch)
treee6b85d904b4e70406e2e2c2deab62ddd527a1bfe /src/monoize.sml
parent3c2143723af4a52064386104d2105137a77bd761 (diff)
Fix SQL-parsing and declaration-ordering bugs.
Diffstat (limited to 'src/monoize.sml')
-rw-r--r--src/monoize.sml16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/monoize.sml b/src/monoize.sml
index 4208f594..2e87a70b 100644
--- a/src/monoize.sml
+++ b/src/monoize.sml
@@ -4344,12 +4344,14 @@ fun monoize env file =
val (nullable, notNullable) = calcClientish xts
fun cond (x, v) =
- (L'.EStrcat (str (Settings.mangleSql x
- ^ (case v of
- Client => ""
- | Channel => " >> 32")
- ^ " = "),
- target), loc)
+ (L'.EStrcat ((L'.EStrcat (str ("(("
+ ^ Settings.mangleSql x
+ ^ (case v of
+ Client => ""
+ | Channel => " >> 32")
+ ^ ") = "),
+ target), loc),
+ str ")"), loc)
val e =
foldl (fn ((x, v), e) =>
@@ -4490,7 +4492,7 @@ fun monoize env file =
pvars := RM.empty;
pvarDefs := [];
pvarOldDefs := [];
- MonoFooify.canonicalFm := Fm.empty (MonoUtil.File.maxName monoFile);
+ MonoFooify.canonicalFm := Fm.empty (MonoUtil.File.maxName monoFile + 1);
monoFile
end