Add primitive action handlers
[hcoop/domtool2.git] / src / env.sig
index 795129a..f965ee2 100644 (file)
 
 signature ENV = sig
 
 
 signature ENV = sig
 
-    val registerType : string * (Ast.exp -> bool) -> unit
-    val typeRule : string -> (Ast.exp -> bool) option
+    type typeRule = Ast.exp -> bool
+    val registerType : string * typeRule -> unit
+    val typeRule : string -> typeRule option
+
+    type env_vars = Ast.exp Ast.StringMap.map
+    type action = env_vars * Ast.exp list -> env_vars
+    val registerAction : string * action -> unit
+    val action : string -> action option
+
+    val registerContainer : string * action * (unit -> unit) -> unit
+    val container : string -> (action * (unit -> unit)) option
+
+    val badArgs : string -> 'a
 
     type env
     val empty : env
 
     type env
     val empty : env