mirror of
https://github.com/ilyakooo0/ormolu.git
synced 2024-10-27 11:41:17 +03:00
parent
0065a9baf6
commit
8d52d87d72
@ -1,3 +1,3 @@
|
||||
fun1 :: Def ('[Ref s (Stored Uint32), IBool] T.:-> IBool)
|
||||
fun1 :: Def ('[Ref s (Stored Uint32), IBool] 'T.:-> IBool)
|
||||
|
||||
fun2 :: Def ('[Ref s (Stored Uint32), IBool] :-> IBool)
|
||||
fun2 :: Def ('[Ref s (Stored Uint32), IBool] ':-> IBool)
|
||||
|
@ -49,7 +49,6 @@ p_ieWrappedName = \case
|
||||
p_rdrName :: Located RdrName -> R ()
|
||||
p_rdrName l@(L spn _) = located l $ \x -> do
|
||||
ids <- getAnns spn
|
||||
-- NOTE Right now we're mainly interested in backticks and parentheses.
|
||||
let backticksWrapper =
|
||||
if AnnBackquote `elem` ids
|
||||
then backticks
|
||||
@ -58,6 +57,12 @@ p_rdrName l@(L spn _) = located l $ \x -> do
|
||||
if AnnOpenP `elem` ids
|
||||
then parens
|
||||
else id
|
||||
singleQuoteWrapper =
|
||||
if AnnSimpleQuote `elem` ids
|
||||
then \y -> do
|
||||
txt "'"
|
||||
y
|
||||
else id
|
||||
(m, avoidParens) =
|
||||
case x of
|
||||
Unqual occName ->
|
||||
@ -80,9 +85,10 @@ p_rdrName l@(L spn _) = located l $ \x -> do
|
||||
( atom name
|
||||
, "$ghc-prim$GHC.Tuple$" `isPrefixOf` nameStableString name
|
||||
)
|
||||
m' = backticksWrapper (singleQuoteWrapper m)
|
||||
if avoidParens
|
||||
then m
|
||||
else parensWrapper (backticksWrapper m)
|
||||
then m'
|
||||
else parensWrapper m'
|
||||
|
||||
p_qualName :: ModuleName -> OccName -> R ()
|
||||
p_qualName mname occName = do
|
||||
|
Loading…
Reference in New Issue
Block a user