int :: Parser Int
int =
  (satisfy (=='-') >> digits (-)) A.<|> digits (+)
  where
    digits f =
      many (satisfy C.isDigit) >>= maybe (E.throwError NumericOverflow) return . toInt f
int :: Parser Int
int =
  (satisfy (=='-') >> digits (-)) A.<|> digits (+)
  where
    digits f =
      many (satisfy C.isDigit) >>= maybe (E.throwError NumericOverflow) return . toInt f
int =
  (satisfy (=='-') >> digits (-)) A.<|> digits (+)
  where
    digits f =
      many (satisfy C.isDigit) >>= maybe (E.throwError NumericOverflow) return . toInt f