diff src/settings.sml @ 2096:6b7749da1ddc

Broaden handling of wildcard rewrites
author Adam Chlipala <adam@chlipala.net>
date Wed, 24 Dec 2014 12:35:20 -0500
parents ced78ef1c82f
children 9272476e2a1c
line wrap: on
line diff
--- a/src/settings.sml	Tue Dec 23 14:41:23 2014 -0500
+++ b/src/settings.sml	Wed Dec 24 12:35:20 2014 -0500
@@ -378,6 +378,22 @@
 datatype path_kind = Any | Url | Table | Sequence | View | Relation | Cookie | Style
 type rewrite = { pkind : path_kind, kind : pattern_kind, from : string, to : string, hyphenate : bool }
 
+fun pak2s pak =
+    case pak of
+        Exact => "Exact"
+      | Prefix => "Prefix"
+fun pk2s pk =
+    case pk of
+        Any => "Any"
+      | Url => "Url"
+      | Table => "Table"
+      | Sequence => "Sequence"
+      | View => "View"
+      | Relation => "Relation"
+      | Cookie => "Cookie"
+      | Style => "Style"
+fun r2s (r : rewrite) = pak2s (#kind r) ^ " " ^ pk2s (#pkind r) ^ ", from<" ^ #from r ^ ">, to<" ^ #to r ^ ">"
+
 val rewrites = ref ([] : rewrite list)
 
 fun subsume (pk1, pk2) =