int_ :: LParser Int
int_ = ParseEither step
  where
    step ts0@(Token s : ts) =
      case reads s of
        (i, "") : _ -> Right (i, ts)
        _ -> Left (msg, ts0)
    step s = Left (msg, s)
    msg = "expected integer"
int_ :: LParser Int
int_ = ParseEither step
  where
    step ts0@(Token s : ts) =
      case reads s of
        (i, "") : _ -> Right (i, ts)
        _ -> Left (msg, ts0)
    step s = Left (msg, s)
    msg = "expected integer"
int_ = ParseEither step
  where
    step ts0@(Token s : ts) =
      case reads s of
        (i, "") : _ -> Right (i, ts)
        _ -> Left (msg, ts0)
    step s = Left (msg, s)
    msg = "expected integer"