X-Git-Url: https://git.hcoop.net/hcoop/domtool2.git/blobdiff_plain/a3698041b3521c3cb17b3546ecdc08ba101c788a..8e965b2da49aab1faef95b25471513498ceca895:/src/eval.sml diff --git a/src/eval.sml b/src/eval.sml index c05d781..7aa8053 100644 --- a/src/eval.sml +++ b/src/eval.sml @@ -14,7 +14,7 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -*) + *) (* Execution of Domtool programs reduced to primitive actions *) @@ -30,6 +30,11 @@ fun lookup (evs, ev) = ^ ev ^ " that type-checking has guaranteed") | SOME v => v +fun printEvs (name, evs) = + (print ("Environment " ^ name ^ "\n"); + SM.appi (fn (name, i) => Print.preface (name, Print.p_exp i)) evs; + print "\n") + val conjoin : Env.env_vars * Env.env_vars -> Env.env_vars = SM.unionWith #2 @@ -90,7 +95,7 @@ fun exec evs e = val evs'' = exec' evs e2 in cleanup (); - conjoin (conjoin (evs, evs'), evs'') + evs' end end @@ -103,9 +108,10 @@ fun exec evs e = | SOME action => action (evs, args) end + val _ = Env.pre () val evs' = exec' evs e in - () + Env.post () end end