Open bravit opened 6 years ago
I don't think this is right as you can't write
{-# LANGUAGE RecordWildCard;, TemplateHaskell #-}
test.hs:1:30: error:
Cannot parse LANGUAGE pragma
Expecting comma-separated list of language options,
each starting with a capital letter
E.g. {-# LANGUAGE TemplateHaskell, GADTs #-}
|
1 | {-# LANGUAGE RecordWildCards;, TemplateHaskell #-}
| ^
Failed, no modules loaded.
Prelude> Leaving GHCi.
This is a bug in the lexer which I have not being able to fix, similar to all the other issues tagged with "layout" https://github.com/haskell-suite/haskell-src-exts/issues?q=is%3Aissue+is%3Aopen+label%3Alayout
The following code (multiline LANGUAGE pragma with lines started with non-whitespace characters) :
makes lexer to insert
;
in the beginning of every line. This can be fixed by workaround in the parser. The first attempt was made in #217, here I follow the same approach.