Fix parenthesized operator printing

pull/1/head
Lennart Spitzner 2016-08-06 14:03:45 +02:00
parent a1c153f0c5
commit 705286be0a
1 changed files with 1 additions and 1 deletions

View File

@ -193,7 +193,7 @@ lrdrNameToTextAnn ast@(L _ n) = do
return $ case Map.lookup (ExactPrint.Types.mkAnnKey ast) anns of
Nothing -> t
Just (ExactPrint.Types.Ann _ _ _ aks _ _) -> case n of
Exact{} -> t
Exact{} | t == Text.pack "()" -> t
_ | any (hasUni AnnBackquote) aks -> Text.pack "`" <> t <> Text.pack "`"
_ | any (hasUni AnnOpenP) aks -> Text.pack "(" <> t <> Text.pack ")"
_ | otherwise -> t