Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure to parse lines without indentation in do block. #442

Open
jezen opened this issue Jan 12, 2023 · 0 comments
Open

Failure to parse lines without indentation in do block. #442

jezen opened this issue Jan 12, 2023 · 0 comments

Comments

@jezen
Copy link

jezen commented Jan 12, 2023

It's common to write SQL queries with Esqueleto without indent lines under a do, like this:

getJohns =
  select $ do
  people <- from $ table @Person
  where_ (people ^. PersonName ==. val "John")
  pure people

This style more closely resembles what you might write in plain SQL.

Running stylish-haskell on this fails however, with something like the following error message:

<string>:22:9: error:
    parse error on input `<-'
    Perhaps this statement should be within a 'do' block?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant