summaryrefslogtreecommitdiff
path: root/compiler/GHC/Utils/Outputable.hs
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-08-20 17:30:51 +0200
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-08-23 14:12:53 +0200
commit8b86509270227dbc61f0700c7d9261a4c7672361 (patch)
tree8f95fd86fa1c052f12aefa7a1038519910ffafeb /compiler/GHC/Utils/Outputable.hs
parent3f50154591ada9064351ccec4adfe6df53ca2439 (diff)
downloadhaskell-8b86509270227dbc61f0700c7d9261a4c7672361.tar.gz
Do not print synonyms in :i (->), :i Type (#18594)
This adds a new printing flag `sdocPrintTypeAbbreviations` that is used specifically to avoid ghci printing 'type (->) = (->)' and 'type Type = Type'.
Diffstat (limited to 'compiler/GHC/Utils/Outputable.hs')
-rw-r--r--compiler/GHC/Utils/Outputable.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/GHC/Utils/Outputable.hs b/compiler/GHC/Utils/Outputable.hs
index 1875d8faf9..23bceff20a 100644
--- a/compiler/GHC/Utils/Outputable.hs
+++ b/compiler/GHC/Utils/Outputable.hs
@@ -344,6 +344,7 @@ data SDocContext = SDC
, sdocStarIsType :: !Bool
, sdocLinearTypes :: !Bool
, sdocImpredicativeTypes :: !Bool
+ , sdocPrintTypeAbbreviations :: !Bool
, sdocDynFlags :: DynFlags -- TODO: remove
}
@@ -390,6 +391,7 @@ defaultSDocContext = SDC
, sdocStarIsType = False
, sdocImpredicativeTypes = False
, sdocLinearTypes = False
+ , sdocPrintTypeAbbreviations = True
, sdocDynFlags = error "defaultSDocContext: DynFlags not available"
}