You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 #-}
moduleFoo (( #<| )) 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