summaryrefslogtreecommitdiff
path: root/parser.fun
diff options
context:
space:
mode:
Diffstat (limited to 'parser.fun')
-rw-r--r--parser.fun11
1 files changed, 5 insertions, 6 deletions
diff --git a/parser.fun b/parser.fun
index 754aab6..0d2c774 100644
--- a/parser.fun
+++ b/parser.fun
@@ -272,9 +272,8 @@ functor Parser(structure Tree: TREE; structure P: PPC;
strlits: int list
}
- val intCompare = fn a => fn b => Int.compare (a, b)
- val lookup = fn z => Tree.lookup intCompare z
- val lookup2 = fn z => Tree.lookup2 intCompare z
+ val lookup = fn z => Tree.lookup compare z
+ val lookup2 = fn z => Tree.lookup2 compare z
fun updateCtx (Ctx ctx) = fn z =>
let
@@ -2621,7 +2620,7 @@ functor Parser(structure Tree: TREE; structure P: PPC;
=
let
val newBufId = D.length types
- val (_, aggrTypeNames) = Tree.insert intCompare aggrTypeNames id newBufId
+ val (_, aggrTypeNames) = Tree.insert compare aggrTypeNames id newBufId
val status = if isSome body then "complete" else "incomplete"
@@ -3347,7 +3346,7 @@ functor Parser(structure Tree: TREE; structure P: PPC;
val () = D.push localVars
({ name = id, pos, t, onStack = not $ isScalar t })
- val (_, scope) = Tree.insert intCompare scope id varId
+ val (_, scope) = Tree.insert compare scope id varId
in
(varId, id, updateCtx (Ctx ctx)
u#localScopes (fn scs => scope :: tl scs) %)
@@ -3844,7 +3843,7 @@ functor Parser(structure Tree: TREE; structure P: PPC;
=
let
val localVar = { name = id, pos, t, onStack = false }
- val (_, scope) = Tree.insert intCompare scope id curVarId
+ val (_, scope) = Tree.insert compare scope id curVarId
in
D.push localVars localVar;
createLocalVars scope (curVarId + 1) ts params