haskell / haskell/haskell-language-server
Unable to format/highlight code: unterminated quasiquotation at end of input
- Dominant language
- Haskell
- Stars
- 3k
- Forks
- 455
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 11
Description
### Environment
```
haskell-language-server version: 2.4.0.0 (GHC: 9.0.2) (PATH: C:\tools\haskell\ghcup\bin\haskell-language-server-9.0.2~2.4.0.0.exe)
Tool versions found on the $PATH
cabal: 3.6.2.1
stack: 2.11.1
ghc: 9.4.7
```
Everything is installed from ghcup on Windows.
I am using the VSCode plugin.
### Steps to reproduce
I have this simple script in primes.hs
```haskell
sieve = sx [2..]
where
sx (p:xs) = p : sx [x|x <- xs, x `mod` p > 0]
main = do
print (take 10000 sieve)
```
### Expected behaviour

No errors, correct syntax highlighting,
### Actual behaviour

Syntax highlighting doesn't seem to work correctly.
And this error on trying to format the code in Visual Studio code
```
Error condition, please check your setup and/or the [issue tracker](https://github.com/haskell/haskell-language-server/issues): ormolu: Internal Error: ormoluCmd: OrmoluParsingFailed (RealSrcSpan SrcSpanMultiLine "C:\\...\\primes.hs" 3 27 7 1 Nothing) "[GHC-21231] unterminated quasiquotation at end of input"
```
### Debug Information
Unsure if this is supposed to belong here, but I'm opening this issue.
Adding spaces between `x|x` seems to resolve the issue.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.