Describe the bug
Ormolu formats ( #<| ) as (#<|) when -XUnboxedSums or -XUnboxedTuples is set, thus the formatted code generates a parser error. I think it applies to any operator starting with #.
To Reproduce
Format the following file with --unsafe (else it fails).
{-# LANGUAGE UnboxedTuples #-}
module Foo (( #<| )) where
( #<| ) :: Int -> Int -> Int
( #<| ) = (+)
The generated code does not compile.
Expected behavior
Ormolu should keep the spaces to be valid code, i.e. ( #<| ) should be unchanged.
Environment
OS name + version: Linux (openSUSE Tumbleweed 20230828)
Version of the code: ormolu 0.7.1.0 using ghc-lib-parser 9.6.2.20230523
Describe the bug Ormolu formats
( #<| )
as(#<|)
when-XUnboxedSums
or-XUnboxedTuples
is set, thus the formatted code generates a parser error. I think it applies to any operator starting with#
.To Reproduce
Format the following file with
--unsafe
(else it fails).The generated code does not compile.
Expected behavior Ormolu should keep the spaces to be valid code, i.e.
( #<| )
should be unchanged.Environment