Skip to content

Parsing broken on quasi quotes #323

Closed
@s9gf4ult

Description

@s9gf4ult

for example, if I enter something like this

func = do 
    r <- withPG $ \con -> query con [sql|
select codes.user_id, aps.client_id
from authorization_codes as codes inner join applications as aps on codes.application_id = aps.id
where codes.access_token = ? and (codes.expires > now() or codes.expires is null)|]
                             [token]
    doSomething -- Indentation broken from this line with "parser error" message
    doMore

quasi quotes must be considered as strings, but they are considered as usual Haskell code. Maybe you can suggest how to solve it? I hope it is not very hard to solve this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions