@@ -14,7 +14,7 @@ import Bag (bagToList)
1414import BasicTypes
1515import Control.Monad
1616import Data.Bool (bool)
17−import Data.Char (isAlphaNum)
17+import Data.Char (isPunctuation)
1818import Data.Data hiding (Infix, Prefix)
1919import Data.List (intersperse, sortOn)
2020import Data.Text (Text)
@@ -810,7 +810,7 @@ p_hsBracket = \case
810810 -- turn makes it impossible to detect if there are parentheses around
811811 -- it, etc. So we have to add parentheses manually assuming they are
812812 -- necessary for all operators.
813− let isOperator = not (any isAlphaNum (showOutputable name))
813+ let isOperator = any isPunctuation (showOutputable name)
814814 wrapper = if isOperator then parens else id
815815 wrapper $ p_rdrName (noLoc name)
816816 TExpBr NoExt expr -> do