aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/demo.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-03 12:24:39 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-03 12:24:39 -0400
commitd8de44ce7c70fc8ce462e764223e413a9a6ea6b6 (patch)
treebbd4fa663e5c412c295510f3cc6c75afa5191e48 /src/demo.sml
parentebbae2ae752fe3b0774207920c7510853ffcbdcf (diff)
url demo
Diffstat (limited to 'src/demo.sml')
-rw-r--r--src/demo.sml31
1 files changed, 30 insertions, 1 deletions
diff --git a/src/demo.sml b/src/demo.sml
index 55ff5bb8..fb4158a4 100644
--- a/src/demo.sml
+++ b/src/demo.sml
@@ -104,7 +104,7 @@ fun make {prefix, dirname, guided} =
clientOnly = [],
serverOnly = [],
jsFuncs = [],
- rewrites = [],
+ rewrites = #rewrites combined @ #rewrites urp,
filterUrl = #filterUrl combined @ #filterUrl urp,
filterMime = #filterMime combined @ #filterMime urp
}
@@ -372,6 +372,35 @@ fun make {prefix, dirname, guided} =
TextIO.output (outf, "prefix ");
TextIO.output (outf, prefix);
TextIO.output (outf, "\n");
+ app (fn rule =>
+ (TextIO.output (outf, "rewrite ");
+ TextIO.output (outf, case #pkind rule of
+ Settings.Any => "any"
+ | Settings.Url => "url"
+ | Settings.Table => "table"
+ | Settings.Sequence => "sequence"
+ | Settings.View => "view"
+ | Settings.Relation => "relation"
+ | Settings.Cookie => "cookie"
+ | Settings.Style => "style");
+ TextIO.output (outf, " ");
+ TextIO.output (outf, #from rule);
+ case #kind rule of
+ Settings.Exact => ()
+ | Settings.Prefix => TextIO.output (outf, "*");
+ TextIO.output (outf, " ");
+ TextIO.output (outf, #to rule);
+ TextIO.output (outf, "\n"))) (#rewrites combined);
+ app (fn rule =>
+ (TextIO.output (outf, case #action rule of
+ Settings.Allow => "allow"
+ | Settings.Deny => "deny");
+ TextIO.output (outf, " url ");
+ TextIO.output (outf, #pattern rule);
+ case #kind rule of
+ Settings.Exact => ()
+ | Settings.Prefix => TextIO.output (outf, "*");
+ TextIO.output (outf, "\n"))) (#filterUrl combined);
TextIO.output (outf, "\n");
app (fn s =>