diff options
author | Adam Chlipala <adamc@hcoop.net> | 2010-01-10 13:44:22 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2010-01-10 13:44:22 -0500 |
commit | bdcf695651fbeff603d6f1c061b410c0cb733dcb (patch) | |
tree | 3519220c69228ad1cd9aba3c3e1096daf7eb1a58 /lib/ur/string.ur | |
parent | b9fd5b30dab83e12206e4b260e1ea775da7cedde (diff) |
Reduce concatenations of the empty record; unpoly non-recursive functions
Diffstat (limited to 'lib/ur/string.ur')
-rw-r--r-- | lib/ur/string.ur | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ur/string.ur b/lib/ur/string.ur index 41ec666d..4025cf68 100644 --- a/lib/ur/string.ur +++ b/lib/ur/string.ur @@ -37,3 +37,8 @@ fun all f s = in al 0 end + +fun newlines [ctx] [[Body] ~ ctx] s : xml ([Body] ++ ctx) [] [] = + case split s #"\n" of + None => cdata s + | Some (s1, s2) => <xml>{[s1]}<br/>{newlines s2}</xml> |