From 73b3f4158297d0161e1d18c24ff9a4604f07c32c Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Sun, 10 Jan 2010 13:44:22 -0500 Subject: Reduce concatenations of the empty record; unpoly non-recursive functions --- lib/ur/string.ur | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'lib/ur/string.ur') 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) => {[s1]}
{newlines s2}
-- cgit v1.2.3