diff options
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/GHC/Utils/Outputable.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/compiler/GHC/Utils/Outputable.hs b/compiler/GHC/Utils/Outputable.hs index 032c8502f8..841e67f75b 100644 --- a/compiler/GHC/Utils/Outputable.hs +++ b/compiler/GHC/Utils/Outputable.hs @@ -112,6 +112,7 @@ import {-# SOURCE #-} GHC.Types.Name.Occurrence( OccName ) import GHC.Utils.BufHandle (BufHandle) import GHC.Data.FastString +import GHC.Data.ShortText (ShortText) import qualified GHC.Utils.Ppr as Pretty import qualified GHC.Utils.Ppr.Colour as Col import GHC.Utils.Ppr ( Doc, Mode(..) ) @@ -642,6 +643,7 @@ empty :: SDoc char :: Char -> SDoc text :: String -> SDoc ftext :: FastString -> SDoc +stext :: ShortText -> SDoc ptext :: PtrString -> SDoc ztext :: FastZString -> SDoc int :: Int -> SDoc @@ -661,6 +663,8 @@ text s = docToSDoc $ Pretty.text s {-# INLINE CONLIKE ftext #-} ftext s = docToSDoc $ Pretty.ftext s +{-# INLINE CONLIKE stext #-} +stext s = docToSDoc $ Pretty.stext s {-# INLINE CONLIKE ptext #-} ptext s = docToSDoc $ Pretty.ptext s {-# INLINE CONLIKE ztext #-} @@ -1019,6 +1023,9 @@ instance Outputable FastString where deriving newtype instance Outputable NonDetFastString deriving newtype instance Outputable LexicalFastString +instance Outputable ShortText where + ppr s = stext s + instance (Outputable key, Outputable elt) => Outputable (M.Map key elt) where ppr m = ppr (M.toList m) |