diff options
author | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2022-01-21 13:05:08 +0000 |
---|---|---|
committer | Simon Peyton Jones <simon.peytonjones@gmail.com> | 2022-01-26 12:13:09 +0000 |
commit | fd60fc0ef17e6aff0a2c860c2578fa4e0a158b46 (patch) | |
tree | 2504a08a7cf8d076387377724437b1dd90c110f5 | |
parent | c20abcb2e559ff5405d2006edf25ab4af801ff6a (diff) | |
download | haskell-wip/T20921.tar.gz |
Add an Outputable instance for RecTcCheckerwip/T20921
-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 |