diff options
author | Winston Hartnett <winstonhartnett@gmail.com> | 2022-06-16 19:24:43 -0500 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-06-20 12:32:23 -0400 |
commit | 262a9f93e84ffacd6540e72e941e3cc69cf87807 (patch) | |
tree | c9badc3bcf75c07bab6b797796f153a61d40ec5e /compiler/GHC/Hs | |
parent | e4e44d8d54518fa88318e9f5ebe109839f6c180a (diff) | |
download | haskell-262a9f93e84ffacd6540e72e941e3cc69cf87807.tar.gz |
Make Outputable instance for InlineSig print the InlineSpec
Fix ghc/ghc#21739
Squash fix ghc/ghc#21739
Diffstat (limited to 'compiler/GHC/Hs')
-rw-r--r-- | compiler/GHC/Hs/Binds.hs | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/GHC/Hs/Binds.hs b/compiler/GHC/Hs/Binds.hs index 3a22863537..686d9e6b25 100644 --- a/compiler/GHC/Hs/Binds.hs +++ b/compiler/GHC/Hs/Binds.hs @@ -724,8 +724,11 @@ ppr_sig (SpecSig _ var ty inl@(InlinePragma { inl_inline = spec })) NoUserInlinePrag -> "{-# " ++ extractSpecPragName (inl_src inl) _ -> "{-# " ++ extractSpecPragName (inl_src inl) ++ "_INLINE" ppr_sig (InlineSig _ var inl) - = pragSrcBrackets (inlinePragmaSource inl) "{-# INLINE" (pprInline inl - <+> pprPrefixOcc (unLoc var)) + = ppr_pfx <+> pprInline inl <+> pprPrefixOcc (unLoc var) <+> text "#-}" + where + ppr_pfx = case inlinePragmaSource inl of + SourceText src -> text src + NoSourceText -> text "{-#" <+> inlinePragmaName (inl_inline inl) ppr_sig (SpecInstSig _ src ty) = pragSrcBrackets src "{-# pragma" (text "instance" <+> ppr ty) ppr_sig (MinimalSig _ src bf) |