- | NewTypeDerived -- Used for deriving instances of newtypes, where the
- CoercionI -- witness dictionary is identical to the argument
- -- dictionary. Hence no bindings, no pragmas.
- -- The coercion maps from newtype to the representation type
- -- (mentioning type variables bound by the forall'd iSpec variables)
- -- E.g. newtype instance N [a] = N1 (Tree a)
- -- co : N [a] ~ Tree a
+ | NewTypeDerived -- Used for deriving instances of newtypes, where the
+ -- witness dictionary is identical to the argument
+ -- dictionary. Hence no bindings, no pragmas.
+
+ CoercionI -- The coercion maps from newtype to the representation type
+ -- (mentioning type variables bound by the forall'd iSpec variables)
+ -- E.g. newtype instance N [a] = N1 (Tree a)
+ -- co : N [a] ~ Tree a
+
+ TyCon -- The TyCon is the newtype N. If it's indexed, then it's the
+ -- representation TyCon, so that tyConDataCons returns [N1],
+ -- the "data constructor".
+ -- See Note [Newtype deriving and unused constructors]
+ -- in TcDeriv