haskell / haskell/vscode-haskell-syntax-highlighting
Happy variables not highlighted
- Dominant language
- Haskell
- Stars
- 109
- Forks
- 51
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 2
Description
We currently aren't highlighting Happy variables specially:
```haskell
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.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Haskell grammar rules for Happy blocks described in the issue, especially the recursive imports used for nested contexts. Use the two supplied examples to compare highlighting of top-level and nested variables, and consider the work complete only when the chosen behavior is consistent; no files or tests are named.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell, vscode
- Domain
- developer-experience, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100