Move ambient environment defaults into Env.env
[hcoop/domtool2.git] / src / order.sml
index b58c9f7..117a0ea 100644 (file)
@@ -1,5 +1,6 @@
 (* HCoop Domtool (http://hcoop.sourceforge.net/)
  * Copyright (c) 2006, Adam Chlipala
+ * Copyright (c) 2014 Clinton Ebadi <clinton@unknownlamer.org>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License
@@ -134,6 +135,11 @@ fun declNeeded G (d, _, _) =
                                   NONE => expNeeded G e
                                 | SOME t => unionCTE ((typNeeded G t, SS.empty),
                                                       expNeeded G e))
+      | DEnv (name, to, e) => (Env.bindInitialDynEnvVal G (name, dt, (Ast.ESkip, ErrorMsg.dummyLoc)),
+                              case to of
+                                  NONE => expNeeded G e
+                                | SOME t => unionCTE ((typNeeded G t, SS.empty),
+                                                      expNeeded G e))
       | DContext name => (Env.bindContext G name, empty)
 
 fun fileSig (_, ds, eo) =