Mercurial > urweb
comparison lib/ur/string.ur @ 1304:f0afe61a6f8b
Tweaking unification fix to apply to demo/more
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Sun, 10 Oct 2010 15:37:14 -0400 |
parents | 56bd4a4f6e66 |
children | 3913cbfd72e9 |
comparison
equal
deleted
inserted
replaced
1303:c7b9a33c26c8 | 1304:f0afe61a6f8b |
---|---|
55 mp' (i - 1) (str (f (sub s i)) ^ acc) | 55 mp' (i - 1) (str (f (sub s i)) ^ acc) |
56 in | 56 in |
57 mp' (length s - 1) "" | 57 mp' (length s - 1) "" |
58 end | 58 end |
59 | 59 |
60 fun newlines [ctx] [[Body] ~ ctx] s : xml ([Body] ++ ctx) [] [] = | 60 fun newlines [ctx] [[Body] ~ ctx] (s : string) : xml ([Body] ++ ctx) [] [] = |
61 case split s #"\n" of | 61 case split s #"\n" of |
62 None => cdata s | 62 None => cdata s |
63 | Some (s1, s2) => <xml>{[s1]}<br/>{newlines s2}</xml> | 63 | Some (s1, s2) => <xml>{[s1]}<br/>{newlines s2}</xml> |
64 | 64 |
65 fun isPrefix {Full = f, Prefix = p} = | 65 fun isPrefix {Full = f, Prefix = p} = |