Open georgefst opened 3 years ago
Thanks for the bug report.
I'm not 100% sure how to proceed, because single line comments are allowed inside {-# LANGUAGE #-}
pragmas, for instance. Do we need special logic for OPTIONS_GHC
pragmas specifically?
single line comments are allowed inside
{-# LANGUAGE #-}
pragmas
Eugh, you're right. Seems they're even allowed with OPTIONS_GHC
in some cases. I don't know how GHC knows it's not a comment in this case - maybe because -optF
has to take an argument.
What’s worse, a line comment inside an OPTIONS pragma also negates the closing #-}, so the rest of the file becomes mis-highlighted.
NB: if you special-logic the OPTIONS pragma, please allow anything starting with OPTIONS_, because some Haskell-derived languages like Mu would benefit from this as well.
In
{-# OPTIONS_GHC -F -pgmF tasty-discover -optF --tree-display #-}
, the--
is recognised as a comment, and so (at least with my current theme), the remainder of the line is greyed out.I guess we shouldn't be looking for the single-line comment syntax while we're already inside a multi-line comment.