haskell-suite / haskell-src-exts

Manipulating Haskell source: abstract syntax, lexer, parser, and pretty-printer
Other
193 stars 94 forks source link

Uninformative Parse error when QuasiQuotes Extension is not enabled #472

Open nineonine opened 1 year ago

nineonine commented 1 year ago

I was invoking parseFileWithComments and it would crash when parsing the module that contained quasi quotes:

authorizePayload :: ByteString
authorizePayload = [r|
  {"user": {"email": "foo@example.com", "password":"secret"}}
  |]

The parse error is "empty string"

image