diff options
| author | Rose Hogenson <rosehogenson@posteo.net> | 2025-05-16 16:43:49 -0700 |
|---|---|---|
| committer | Rose Hogenson <rosehogenson@posteo.net> | 2025-05-16 16:46:51 -0700 |
| commit | ff12ef4eea67453c1a6c1fa4614b74adf7c3caca (patch) | |
| tree | 64911f7bb622075ce740c5ac4d1559295845f7d1 /elab.sml | |
| parent | 907ade52d0703e95b2e29bd8933b1f57a3ba3e09 (diff) | |
| download | sml-ff12ef4eea67453c1a6c1fa4614b74adf7c3caca.tar.zst | |
Fix spelling in GenSym
Diffstat (limited to 'elab.sml')
| -rw-r--r-- | elab.sml | 22 |
1 files changed, 11 insertions, 11 deletions
@@ -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 |
