Commit 8834d482 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

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
parent 6e0e0b0e
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment