lspitzner / brittany

haskell source code formatter
GNU Affero General Public License v3.0
690 stars 72 forks source link

Newlines in QuasiQuotes break parsing #193

Closed dredozubov closed 5 years ago

dredozubov commented 5 years ago

If I try to process this piece of code with brittany:

  preview _head <$> pgQuery [sqlExp|
    SELECT
      foo
    FROM boo
    WHERE id = zoo
    LIMIT 1|]

I get a

ERROR: encountered unknown syntactical constructs:
HsSpliceE{}

However it parses this code:

  preview _head <$> pgQuery [sqlExp| SELECT foo FROM boo WHERE id = zoo LIMIT 1|]
eborden commented 5 years ago

This is a known issue, documented here: https://github.com/lspitzner/brittany/issues/90