{{A filesystem path that you're allowed to write to.
The set of permitted values is generated from a set of roots by closing it
under the subdirectory relation.}}
+extern val end_in_slash : your_path -> your_path;
+{{Add a slash at the end of a path, if there isn't one already.}}
extern type readable_path;
{{Like [your_path], but also includes some paths that everyone is allowed to
script <- Script;
alias htdocs "/usr/share/moin/htdocs";
- scriptAlias prefix script
+ scriptAlias prefix (end_in_slash script)
end;
{{Add a MoinMoin wiki to a vhost.}}
val _ = Env.registerFunction ("mail_node_to_node",
fn [e] => SOME e
| _ => NONE)
+
+
open Ast
val dl = ErrorMsg.dummyLoc
+val _ = Env.registerFunction ("end_in_slash",
+ fn [(EString "", _)] => SOME (EString "/", dl)
+ | [(EString s, _)] =>
+ SOME (EString (if String.sub (s, size s - 1) = #"/" then
+ s
+ else
+ s ^ "/"), dl)
+ | _ => NONE)
+
+
val nsD = (EString Config.defaultNs, dl)
val serialD = (EVar "serialAuto", dl)
val refD = (EInt Config.defaultRefresh, dl)
in
case Env.action prim of
NONE => raise Fail "Unbound primitive action"
- | SOME action => action (evs, args)
+ | SOME action => action (evs, List.map (Reduce.reduceExp Env.empty) args)
end
fun exec evs e =