From e013138f0ca0db7ecc164f7d52816287f696d265 Mon Sep 17 00:00:00 2001 From: aarne Date: Fri, 7 Dec 2007 10:23:18 +0000 Subject: refresh compilation phase in the new format --- src/GF/Infra/CompactPrint.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/GF/Infra/CompactPrint.hs') diff --git a/src/GF/Infra/CompactPrint.hs b/src/GF/Infra/CompactPrint.hs index 5625041cd..7b37679ee 100644 --- a/src/GF/Infra/CompactPrint.hs +++ b/src/GF/Infra/CompactPrint.hs @@ -5,7 +5,9 @@ compactPrint = compactPrintCustom keywordGF (const False) compactPrintGFCC = compactPrintCustom (const False) keywordGFCC -compactPrintCustom pre post = tail . concat . map (spaceIf pre post) . words +compactPrintCustom pre post = dps . concat . map (spaceIf pre post) . words + +dps = dropWhile isSpace spaceIf pre post w = case w of _ | pre w -> "\n" ++ w -- cgit v1.2.3