diff options
author | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2022-01-21 13:05:08 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-01-27 02:40:11 -0500 |
commit | 0573aeab1381680fe86a13960a7fcdb98a69aa58 (patch) | |
tree | d60f85209a8f16b13bc3c5a5003d528f39344e3b | |
parent | f4ce41863c729f6b993b5e5dd3da69ebc3623327 (diff) | |
download | haskell-0573aeab1381680fe86a13960a7fcdb98a69aa58.tar.gz |
Add an Outputable instance for RecTcChecker
-rw-r--r-- | compiler/GHC/Core/TyCon/RecWalk.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/GHC/Core/TyCon/RecWalk.hs b/compiler/GHC/Core/TyCon/RecWalk.hs index a472cf65bb..95363393a2 100644 --- a/compiler/GHC/Core/TyCon/RecWalk.hs +++ b/compiler/GHC/Core/TyCon/RecWalk.hs @@ -20,6 +20,7 @@ import GHC.Prelude import GHC.Core.TyCon import GHC.Core.TyCon.Env +import GHC.Utils.Outputable {- ************************************************************************ @@ -72,6 +73,9 @@ data RecTcChecker = RC !Int (TyConEnv Int) -- The upper bound, and the number of times -- we have encountered each TyCon +instance Outputable RecTcChecker where + ppr (RC n env) = text "RC:" <> int n <+> ppr env + -- | Initialise a 'RecTcChecker' with 'defaultRecTcMaxBound'. initRecTc :: RecTcChecker initRecTc = RC defaultRecTcMaxBound emptyTyConEnv |