@@ -17,7 +17,7 @@ import ProjectM36.Relation
1717import ProjectM36.DataFrame
1818
1919#if MIN_VERSION_megaparsec(6,0,0)
20−import Text.Megaparsec.Char
20+import Text.Megaparsec.Char
2121import qualified Text.Megaparsec.Char.Lexer as Lex
2222import Text.Megaparsec
2323import Data.Void
@@ -82,14 +82,9 @@ type ParseStr = Text
8282type ParseStr = String
8383#endif
8484
85+-- consumes only horizontal spaces
8586spaceConsumer :: Parser ()
86−spaceConsumer = Lex.space (void sc) (Lex.skipLineComment "--") (Lex.skipBlockComment "{-" "-}")
87− where
88− sc = takeWhile1P (Just "horizontal whitespace") isHSpace'
89−
90−--backported from megaparsec 9
91−isHSpace' :: Char -> Bool
92−isHSpace' x = isSpace x && x /= '\n' && x /= '\r'
87+spaceConsumer = Lex.space space1 (Lex.skipLineComment "--") (Lex.skipBlockComment "{-" "-}")
9388
9489opChar :: Parser Char
9590opChar = oneOf (":!#$%&*+./<=>?\\^|-~" :: String)-- remove "@" so it can be used as attribute marker without spaces
@@ -245,6 +240,6 @@ colonOp opStr = do
245240hex :: Parser Text
246241hex = takeWhileP (Just "hexadecimal")
247242 (\c ->
248− (c >= '0' && c <= '9')
243+ isDigit c
249244 || (c >= 'a' && c <= 'f'))
250245