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


-- TODO: create a type class that generalises Parser and Parser'
cla
int' :: Parser' Int
int' =
  (satisfy' (=='-') >> digits'(-)) A.<|> digits' (+)
  where
    digits' f =
      many' (satisfy' C.isDigit) >>= maybe (E.throwError NumericOverflow) return . toInt f


-- TODO: create a type class that generalises Parser and Parser'
int' =
  (satisfy' (=='-') >> digits'(-)) A.<|> digits' (+)
  where
    digits' f =
      many' (satisfy' C.isDigit) >>= maybe (E.throwError NumericOverflow) return . toInt f


-- TODO: create a type class that generalises Parser and Parser'