Commits

Anonymous committed eb44737

Fix bug in implementation of signed

Comments (0)

Files changed (1)

Data/Attoparsec/Char8.hs

 -- character.
 signed :: Num a => Parser a -> Parser a
 {-# SPECIALISE signed :: Parser Int -> Parser Int #-}
-signed p = (negate <$> char8 '-' *> p)
+signed p = (negate <$> (char8 '-' *> p))
        <|> (char8 '+' *> p)
        <|> p