- { typats' <- rnTyPats data_doc typatsMaybe
- ; context' <- rnContext data_doc context
- ; (derivs', deriv_fvs) <- rn_derivs derivs
- ; return (tyvars', context', typats', derivs', deriv_fvs) }
- -- For GADTs, the type variables in the declaration
- -- do not scope over the constructor signatures
- -- data T a where { T1 :: forall b. b-> b }
+ { context' <- rnContext data_doc context
+ ; (typats', fvs1) <- rnTyPats data_doc tycon' typats
+ ; (derivs', fvs2) <- rn_derivs derivs
+ ; let fvs = fvs1 `plusFV` fvs2 `plusFV`
+ extractHsCtxtTyNames context'
+ ; return ((tyvars', context', typats', derivs'), fvs) }