haskell / haskell/stylish-haskell

module_header formatting crashes on a qualified operator in the export list

Open
#374 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
1k
Forks
153
PR merge metrics
No merged PRs in 30d

Description

GHC parses it, but stylish crashes on it.

```
$ diff .stylish-haskell.yaml <(stylish-haskell --defaults | grep -Ev -e ' *#')
5d4
< - module_header: {}

$ cat Test.hs
module Test ((Test.<=)) where

(<=) :: a -> b -> c
(<=) = undefined

$ stylish-haskell Test.hs
Test.hs: RealSrcSpan SrcSpanOneLine "Test.hs" 2 7 14: parse error on input `Test.<='

$ stylish-haskell --version
stylish-haskell 0.12.2.0

$ ghc Test.hs
[1 of 1] Compiling Test ( Test.hs, Test.o )

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.10.4
```

FWIW, it also crashes if I set `ghc_lib_parser: true`. Thanks!

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.