JustusAdam/language-haskell

Happy variables not highlighted

sheaf opened this issue · 0 comments

sheaf commented

We currently aren't highlighting Happy variables specially:

foo :: { Foo }
    : foo { $1 }

fooBar :: { (Foo, Bar) }
       : foo bar { ($1, $2) }

The first case can be handled straightforwardly by adding a rule for Haskell blocks within Happy that fires before including the rest of the Haskell rules. The second case, however, is problematic, as the Haskell grammar recursively imports itself to handle highlighting inside parentheses (and other nested contexts). So there doesn't seem to be any clear way of handling the variables there. It seemed better, then, to not include any special handling of Happy variables whatsoever, for the sake of consistency.