lspitzner / brittany

haskell source code formatter
GNU Affero General Public License v3.0
688 stars 72 forks source link

Brittany fails on import list containing Type Operators / Infix Constructor #191

Closed fendor closed 5 years ago

fendor commented 5 years ago

Brittany version: brittany 0.11.0.0 pulled from NixOS.

Also haskell-ide-engine from one of the latest commits has the same problem. E.g. can not format the code containing the import with (:.)(..). Haven't tested it from source, though. Too many build problems related to NixOS.

Example

import Data.Array.Repa ((:.)(..))

Expected:

import          Data.Array.Repa      ((:.)(..))

or something like that.

Actual:

Loaded package environment from /home/user/Documents/haskell/project/.ghc.environment.x86_64-linux-8.4.3
Loaded package environment from /home/user/Documents/haskell/project/.ghc.environment.x86_64-linux-8.4.3
ERROR: brittany pretty printer returned syntactically invalid result.

I hope, it is not a duplicate, I am sorry if it is, but I couldnt find a similar issue so far.

matt-noonan commented 5 years ago

This appears to be the same issue as #170, and is now resolved.