module GHC.Tc.Types.Rank (Rank(..)) where
import GHC.Base (Bool)
import GHC.Utils.Outputable (Outputable, (<+>), parens, ppr, text)
data Rank = ArbitraryRank
| LimitedRank
Bool
Rank
| MonoTypeRankZero
| MonoTypeTyConArg
| MonoTypeSynArg
| MonoTypeConstraint
| MustBeMonoType
instance Outputable Rank where
ppr :: Rank -> SDoc
ppr Rank
ArbitraryRank = String -> SDoc
text String
"ArbitraryRank"
ppr (LimitedRank Bool
top_forall_ok Rank
r)
= String -> SDoc
text String
"LimitedRank" SDoc -> SDoc -> SDoc
<+> Bool -> SDoc
forall a. Outputable a => a -> SDoc
ppr Bool
top_forall_ok
SDoc -> SDoc -> SDoc
<+> SDoc -> SDoc
parens (Rank -> SDoc
forall a. Outputable a => a -> SDoc
ppr Rank
r)
ppr Rank
MonoTypeRankZero = String -> SDoc
text String
"MonoTypeRankZero"
ppr Rank
MonoTypeTyConArg = String -> SDoc
text String
"MonoTypeTyConArg"
ppr Rank
MonoTypeSynArg = String -> SDoc
text String
"MonoTypeSynArg"
ppr Rank
MonoTypeConstraint = String -> SDoc
text String
"MonoTypeConstraint"
ppr Rank
MustBeMonoType = String -> SDoc
text String
"MustBeMonoType"