comparison src/monoize.sml @ 2256:6f2ea4ed573a

Pure caching sort of works.
author Ziv Scully <ziv@mit.edu>
date Sun, 27 Sep 2015 03:52:14 -0400
parents 8428c534913a
children f81f1930c5d6
comparison
equal deleted inserted replaced
2255:8428c534913a 2256:6f2ea4ed573a
4482 case ds' of 4482 case ds' of
4483 [(L'.DDatatype dts, loc)] => 4483 [(L'.DDatatype dts, loc)] =>
4484 (L'.DDatatype (dts @ !pvarDefs), loc) :: Fm.decls fm @ ds 4484 (L'.DDatatype (dts @ !pvarDefs), loc) :: Fm.decls fm @ ds
4485 | _ => 4485 | _ =>
4486 ds' @ Fm.decls fm @ (L'.DDatatype (!pvarDefs), loc) :: ds))) 4486 ds' @ Fm.decls fm @ (L'.DDatatype (!pvarDefs), loc) :: ds)))
4487 (env, Fm.empty mname, []) file 4487 (env, Fm.empty mname, []) file
4488 val monoFile = (rev ds, [])
4488 in 4489 in
4489 pvars := RM.empty; 4490 pvars := RM.empty;
4490 pvarDefs := []; 4491 pvarDefs := [];
4491 pvarOldDefs := []; 4492 pvarOldDefs := [];
4492 Fm.canonical := fm; 4493 MonoFooify.canonicalFm := Fm.empty (MonoUtil.File.maxName monoFile);
4493 (rev ds, []) 4494 monoFile
4494 end 4495 end
4495 4496
4496 end 4497 end