summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2018-10-19 17:18:52 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2018-10-19 17:18:52 -0400
commit31b7eea8489d84ae3abdb068aaf15a6fcdb02124 (patch)
tree836543309d28a6a48abab7199e33c38e36b89cd2
parented803fdc31115945a105626faab6bd302785f0e7 (diff)
More telegraphic error text for clashing URL prefixes (closes #111)
-rw-r--r--src/tag.sml2
-rw-r--r--tests/dupTag.ur21
2 files changed, 22 insertions, 1 deletions
diff --git a/src/tag.sml b/src/tag.sml
index 94e5d44f..3040c36c 100644
--- a/src/tag.sml
+++ b/src/tag.sml
@@ -124,7 +124,7 @@ fun exp uf env (e, s) =
()
else
ErrorMsg.errorAt loc
- ("Duplicate HTTP tag "
+ ("Duplicate URL prefix "
^ s);
if ek = ek' then
()
diff --git a/tests/dupTag.ur b/tests/dupTag.ur
new file mode 100644
index 00000000..cee35df1
--- /dev/null
+++ b/tests/dupTag.ur
@@ -0,0 +1,21 @@
+structure S = struct
+ fun one () =
+ let
+ fun save r = return <xml/>
+ in
+ return <xml><body><form><submit action={save}/></form></body></xml>
+ end
+ fun two () =
+ let
+ fun save r = return <xml/>
+ in
+ return <xml><body><form><submit action={save}/></form></body></xml>
+ end
+end
+
+fun main () : transaction page = return <xml>
+ <body>
+ <a link={S.one()}>one</a>
+ <a link={S.two()}>two</a>
+ </body>
+ </xml>