summaryrefslogtreecommitdiff
path: root/src
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
commit74b6027d504c62667f804dc3952d1c7773622a68 (patch)
treebbd4fa663e5c412c295510f3cc6c75afa5191e48 /src
parent9638ff0c1f7b2254186a089a0e883a6b9f04f2bd (diff)
url demo
Diffstat (limited to 'src')
-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 =>