summaryrefslogtreecommitdiffstats
path: root/elab.sml
diff options
context:
space:
mode:
Diffstat (limited to 'elab.sml')
-rw-r--r--elab.sml22
1 files changed, 11 insertions, 11 deletions
diff --git a/elab.sml b/elab.sml
index 84b99a9..60760cd 100644
--- a/elab.sml
+++ b/elab.sml
@@ -52,7 +52,7 @@ struct
val (_, vars, types) =
foldl
(fn ((name, _), (i, vars, types)) =>
- (i + 1, StringMap.insert name (Gensym.new ()) vars, StringMap.insert name (i, nCons) types))
+ (i + 1, StringMap.insert name (GenSym.new ()) vars, StringMap.insert name (i, nCons) types))
(0, #vars env, #types env)
cons
in Env { vars = vars, types = types, structTypes = #structTypes env }
@@ -271,7 +271,7 @@ struct
val env =
foldl
(fn ((name, _), env) =>
- bindVar name (Gensym.new ()) env)
+ bindVar name (GenSym.new ()) env)
env
bindings
in
@@ -290,7 +290,7 @@ struct
val actions = actionVector env expr arms
val actionFns =
map
- (fn a => (Gensym.new (), Gensym.new (), a))
+ (fn a => (GenSym.new (), GenSym.new (), a))
actions
val smallActions =
map
@@ -341,7 +341,7 @@ struct
List.mapPartial
(fn (_, (_, NONE)) => NONE
| (i, (name, _)) =>
- let val v = Gensym.new ()
+ let val v = GenSym.new ()
in SOME (lookupVar name env, v, Syntax.LRecord [Syntax.LInt i, Syntax.LVar v])
end)
(enumerate cons)
@@ -361,7 +361,7 @@ struct
elab env (Syntax.ECase (v, [(pat, Syntax.ELet (decls, body))]))
| Syntax.ELet (Syntax.DValRec (Syntax.PVar name, f as Syntax.ELambda _) :: decls, body) =>
let
- val n = Gensym.new ()
+ val n = GenSym.new ()
val env = bindVar name n env
val (arg, fnBody) =
case elab env f of
@@ -378,10 +378,10 @@ struct
in if not (List.all (fn (ps, _) => length ps = nPats) cases)
then raise Fail "clauses do not all have same number of patterns"
else let
- val n = Gensym.new ()
- val temps = List.tabulate (nPats, fn _ => Gensym.new ())
+ val n = GenSym.new ()
+ val temps = List.tabulate (nPats, fn _ => GenSym.new ())
val env = bindVar name n env
- val t = Gensym.new ()
+ val t = GenSym.new ()
val innerCase = elabCase env (Syntax.LVar t) (map (fn (ps, b) => (Syntax.PTuple ps, b)) cases)
in
Syntax.LFix
@@ -401,17 +401,17 @@ struct
let
val names = structBoundVars structDecls
val tuple = elab env (Syntax.ELet (structDecls, Syntax.ETuple (map (fn n => Syntax.EIdent [n]) names)))
- val v = Gensym.new ()
+ val v = GenSym.new ()
val env = bindStructType name structDecls env
val env = bindVar name v env
in Syntax.LApp (Syntax.LFn (v, elab env (Syntax.ELet (decls, body))), tuple)
end
| Syntax.ELambda body =>
- let val v = Gensym.new ()
+ let val v = GenSym.new ()
in Syntax.LFn (v, elabCase env (Syntax.LVar v) [body])
end
| Syntax.ECase (expr, arms) =>
- let val v = Gensym.new ()
+ let val v = GenSym.new ()
in Syntax.LApp (Syntax.LFn (v, elabCase env (Syntax.LVar v) arms), elab env expr)
end