File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 11cabal-version : 2.2
22name : haskell-ci
3- version : 0.19.20250531
3+ version : 0.19.20250604
44synopsis : Haskell CI script generator
55description :
66 Script generator (@haskell-ci@) for
Original file line number Diff line number Diff line change @@ -64,7 +64,15 @@ newtype NoCommas = NoCommas String
6464 deriving anyclass (C.Newtype String )
6565
6666instance C. Parsec NoCommas where
67- parsec = NoCommas <$> liftA2 (:) (C. satisfy (not . isSpace)) (C. munch (/= ' ,' ))
67+ parsec = NoCommas . mergeSpaces <$> liftA2 (:) (C. satisfy (not . isSpace)) (C. munch (/= ' ,' ))
68+
69+ mergeSpaces :: String -> String
70+ mergeSpaces [] = []
71+ mergeSpaces (' ' : s) = ' ' : go s where
72+ go [] = []
73+ go (' ' : s') = go s'
74+ go (c : s') = c : mergeSpaces s'
75+ mergeSpaces (c : s) = c : mergeSpaces s
6876
6977instance C. Pretty NoCommas where
7078 pretty (NoCommas p) = PP. text p
You can’t perform that action at this time.
0 commit comments