diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2017-08-28 13:27:14 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2017-08-29 09:33:26 +0100 |
commit | 8834d482614b3c4b9dd57202134a518b1771ed99 (patch) | |
tree | 80681d231b680d05ca7c88d929b28fc9a58ecd9e /compiler | |
parent | 6e0e0b0e2758910113ce98358b53ea5e9c58651f (diff) | |
download | haskell-8834d482614b3c4b9dd57202134a518b1771ed99.tar.gz |
Better debug-printing for Outputable TyConBinder
Anon and Required were printed the same :-(. This is only for
debug printing, so I switched to a slightly more verbose and
explicit format
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/types/TyCon.hs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/types/TyCon.hs b/compiler/types/TyCon.hs index 63e199c93e..6a4ff72896 100644 --- a/compiler/types/TyCon.hs +++ b/compiler/types/TyCon.hs @@ -385,6 +385,7 @@ See also: -} type TyConBinder = TyVarBndr TyVar TyConBndrVis + -- See also Note [TyBinder] in TyCoRep data TyConBndrVis = NamedTCB ArgFlag @@ -547,10 +548,10 @@ They fit together like so: -} instance Outputable tv => Outputable (TyVarBndr tv TyConBndrVis) where - ppr (TvBndr v AnonTCB) = ppr v - ppr (TvBndr v (NamedTCB Required)) = ppr v - ppr (TvBndr v (NamedTCB Specified)) = char '@' <> ppr v - ppr (TvBndr v (NamedTCB Inferred)) = braces (ppr v) + ppr (TvBndr v AnonTCB) = text "anon" <+> parens (ppr v) + ppr (TvBndr v (NamedTCB Required)) = text "req" <+> parens (ppr v) + ppr (TvBndr v (NamedTCB Specified)) = text "spec" <+> parens (ppr v) + ppr (TvBndr v (NamedTCB Inferred)) = text "inf" <+> parens (ppr v) instance Binary TyConBndrVis where put_ bh AnonTCB = putByte bh 0 |