diff options
author | Adam Chlipala <adam@chlipala.net> | 2014-12-24 12:35:20 -0500 |
---|---|---|
committer | Adam Chlipala <adam@chlipala.net> | 2014-12-24 12:35:20 -0500 |
commit | 80e5288d76eaf9fa4ac264e34fd1299d8e4c0642 (patch) | |
tree | 92f1284d28e319a9a70fad17ba197160ee9da0ce /src/settings.sml | |
parent | d30a5ee04dd437f969fca7ad2b3faee7ed324562 (diff) |
Broaden handling of wildcard rewrites
Diffstat (limited to 'src/settings.sml')
-rw-r--r-- | src/settings.sml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/settings.sml b/src/settings.sml index eb350c95..fafb38c5 100644 --- a/src/settings.sml +++ b/src/settings.sml @@ -378,6 +378,22 @@ type rule = { action : action, kind : pattern_kind, pattern : string } 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) = |