mirror of
https://github.com/google/ormolu.git
synced 2024-11-27 13:13:23 +03:00
Fix printing of the rewrite rule names
This commit is contained in:
parent
a392aef71e
commit
f55021d89b
@ -27,3 +27,9 @@
|
||||
"concat" xs `concat` ys = augment (\c n -> foldr c n xs) ys
|
||||
"map/Double" fmap f xs = foldr (++) f xs
|
||||
#-}
|
||||
|
||||
{-# RULES
|
||||
"fb' >\\ (Request b' fb )" forall fb' b' fb.
|
||||
fb' >\\ (Request b' fb) =
|
||||
fb' b' >>= \b -> fb' >\\ fb b
|
||||
#-}
|
||||
|
@ -25,3 +25,9 @@
|
||||
"concat" xs `concat` ys = augment (\c n -> foldr c n xs) ys;
|
||||
"map/Double" fmap f xs = foldr (++) f xs
|
||||
#-}
|
||||
|
||||
{-# RULES
|
||||
"fb' >\\ (Request b' fb )" forall fb' b' fb .
|
||||
fb' >\\ (Request b' fb ) = fb' b' >>= \b -> fb' >\\ fb b;
|
||||
#-}
|
||||
|
||||
|
@ -9,14 +9,12 @@ where
|
||||
|
||||
import BasicTypes
|
||||
import Control.Monad
|
||||
import FastString (unpackFS)
|
||||
import GHC
|
||||
import Ormolu.Printer.Combinators
|
||||
import Ormolu.Printer.Meat.Common
|
||||
import Ormolu.Printer.Meat.Declaration.Signature
|
||||
import Ormolu.Printer.Meat.Declaration.Value
|
||||
import Ormolu.Utils
|
||||
import qualified Data.Text as T
|
||||
|
||||
p_ruleDecls :: RuleDecls GhcPs -> R ()
|
||||
p_ruleDecls = \case
|
||||
@ -43,10 +41,7 @@ p_ruleDecl = \case
|
||||
XRuleDecl NoExt -> notImplemented "XRuleDecl"
|
||||
|
||||
p_ruleName :: (SourceText, RuleName) -> R ()
|
||||
p_ruleName (_, name) = do
|
||||
txt "\""
|
||||
txt $ T.pack $ unpackFS $ name
|
||||
txt "\""
|
||||
p_ruleName (_, name) = atom $ HsString NoSourceText name
|
||||
|
||||
p_ruleBndrs :: [LRuleBndr GhcPs] -> R ()
|
||||
p_ruleBndrs [] = return ()
|
||||
|
Loading…
Reference in New Issue
Block a user