summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adam@chlipala.net>2019-09-14 13:14:55 -0400
committerGravatar Adam Chlipala <adam@chlipala.net>2019-09-14 13:14:55 -0400
commit39cf1b0633fd95ff82815741c9c3d35a0f762cf2 (patch)
tree882edc236c75d6ccb52cb8cb791bdf17e11fc37d
parentb506e44ebbf80d98bb1a39d5566e7cdf53b3fc78 (diff)
More detailed error message for bad path kind spec (closes #178)
-rw-r--r--src/compiler.sml2
-rw-r--r--tests/badkind.ur1
-rw-r--r--tests/badkind.urp3
3 files changed, 5 insertions, 1 deletions
diff --git a/src/compiler.sml b/src/compiler.sml
index c00fe807..fab939f9 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -745,7 +745,7 @@ fun parseUrp' accLibs fname =
| "relation" => Settings.Relation
| "cookie" => Settings.Cookie
| "style" => Settings.Style
- | _ => (ErrorMsg.error "Bad path kind spec";
+ | _ => (ErrorMsg.error ("Bad path kind spec \"" ^ s ^ "\"");
Settings.Any)
fun parsePattern s =
diff --git a/tests/badkind.ur b/tests/badkind.ur
new file mode 100644
index 00000000..600f7a35
--- /dev/null
+++ b/tests/badkind.ur
@@ -0,0 +1 @@
+fun main () : transaction page = <xml>ahoy!</xml>
diff --git a/tests/badkind.urp b/tests/badkind.urp
new file mode 100644
index 00000000..934e4928
--- /dev/null
+++ b/tests/badkind.urp
@@ -0,0 +1,3 @@
+rewrite Badkind/main /
+
+badkind