@@ -37,11 +37,17 @@ compressSeparators [] = []
37compressSeparators str
37compressSeparators str
38 | isPrefixOf "\"" str = head str : retainConstants compressSeparators "\"" (drop 1 str)
38 | isPrefixOf "\"" str = head str : retainConstants compressSeparators "\"" (drop 1 str)
39 | isPrefixOf "'" str = head str : retainConstants compressSeparators "'" (drop 1 str)
39 | isPrefixOf "'" str = head str : retainConstants compressSeparators "'" (drop 1 str)
40− | otherwise =
40+ | isPrefixOf " " str = compressSeparators (drop 1 str)
41− replaceAll "; *}" (const "}") $
41+ | isPrefixOf " {" str = compressSeparators (drop 1 str)
42− replaceAll " *([{};]) *" (take 1 . dropWhile isSpace) $
42+ | isPrefixOf " }" str = compressSeparators (drop 1 str)
43− replaceAll ";+" (const ";") str
43+ | isPrefixOf " ;" str = compressSeparators (drop 1 str)
44− where
44+ | isPrefixOf ";;" str = compressSeparators (drop 1 str)
45+ | isPrefixOf "{ " str = compressSeparators (head str : (drop 2 str))
46+ | isPrefixOf "} " str = compressSeparators (head str : (drop 2 str))
47+ | isPrefixOf "; " str = compressSeparators (head str : (drop 2 str))
48+ | isPrefixOf ";}" str = '}' : compressSeparators (drop 2 str)
49+ | otherwise = head str : compressSeparators (drop 1 str)
46--------------------------------------------------------------------------------
52--------------------------------------------------------------------------------
47-- | Compresses all whitespace.
53-- | Compresses all whitespace.