string :: String -> LParser String
string str = ParseEither go
  where
    go (Token s : ts) | s == str = Right (s, ts)
    go s = Left ("expected token: " ++ str, s)
string :: String -> LParser String
string str = ParseEither go
  where
    go (Token s : ts) | s == str = Right (s, ts)
    go s = Left ("expected token: " ++ str, s)
string str = ParseEither go
  where
    go (Token s : ts) | s == str = Right (s, ts)
    go s = Left ("expected token: " ++ str, s)