+ | ImplicOrigin SDoc -- An implication constraint
+ | EqOrigin -- A type equality
+
+instance Outputable InstOrigin where
+ ppr (OccurrenceOf name) = hsep [ptext SLIT("a use of"), quotes (ppr name)]
+ ppr (IPOccOrigin name) = hsep [ptext SLIT("a use of implicit parameter"), quotes (ppr name)]
+ ppr (IPBindOrigin name) = hsep [ptext SLIT("a binding for implicit parameter"), quotes (ppr name)]
+ ppr RecordUpdOrigin = ptext SLIT("a record update")
+ ppr (LiteralOrigin lit) = hsep [ptext SLIT("the literal"), quotes (ppr lit)]
+ ppr (ArithSeqOrigin seq) = hsep [ptext SLIT("the arithmetic sequence"), quotes (ppr seq)]
+ ppr (PArrSeqOrigin seq) = hsep [ptext SLIT("the parallel array sequence"), quotes (ppr seq)]
+ ppr InstSigOrigin = ptext SLIT("instantiating a type signature")
+ ppr InstScOrigin = ptext SLIT("the superclasses of an instance declaration")
+ ppr DerivOrigin = ptext SLIT("the 'deriving' clause of a data type declaration")
+ ppr StandAloneDerivOrigin = ptext SLIT("a 'deriving' declaration")
+ ppr DefaultOrigin = ptext SLIT("a 'default' declaration")
+ ppr DoOrigin = ptext SLIT("a do statement")
+ ppr ProcOrigin = ptext SLIT("a proc expression")
+ ppr (ImplicOrigin doc) = doc
+ ppr (SigOrigin info) = pprSkolInfo info
+ ppr EqOrigin = ptext SLIT("a type equality")