As examples bellow, Text.Shakespeare.Base.parseDeref does not behave naturally when an expression including infix operator and trailing spaces.
-- Without trailing spaces, it parses as expected
>>> runParserT parseDeref () "" " a + b"
Identity (Right (DerefBranch (DerefBranch (DerefIdent (Ident "+")) (DerefIdent (Ident "a"))) (DerefIdent (Ident "b"))))
-- With trailing spaces, it ignores charactors after infix operator
>>> runParserT parseDeref () "" "a + b "
Identity (Right (DerefIdent (Ident "a")))
>>> runParserT parseDeref () "" " a + b "
Identity (Right (DerefIdent (Ident "a")))
-- It works well without infix operators even if it has trailing spaces.
>>> runParserT parseDeref () "" " (+) a b "
Identity (Right (DerefBranch (DerefBranch (DerefIdent (Ident "+")) (DerefIdent (Ident "a"))) (DerefIdent (Ident "b"))))
Is this behaviour in the specifications?
As examples bellow,
Text.Shakespeare.Base.parseDerefdoes not behave naturally when an expression including infix operator and trailing spaces.Is this behaviour in the specifications?