diff --git a/src/Util.hs b/src/Util.hs index 979636bd..7cf7e306 100644 --- a/src/Util.hs +++ b/src/Util.hs @@ -71,11 +71,13 @@ gitCheckIgnoreFeedback err normalizeTypeSignatures :: String -> String normalizeTypeSignatures = normalize . concatMap replace where + normalize :: [Char] -> [Char] normalize = \case - '\n' : ' ' : ' ' : xs -> normalizeTypeSignatures (' ' : dropWhile (== ' ') xs) - x : xs -> x : normalizeTypeSignatures xs + '\n' : ' ' : ' ' : xs -> normalize (' ' : dropWhile (== ' ') xs) + x : xs -> x : normalize xs [] -> [] + replace :: Char -> [Char] replace c = case c of '\8759' -> "::" '\8594' -> "->"