- { L (comb4 $1 $2 $3 $4) -- We need the location on tycl_hdr
- -- in case constrs and deriving are
- -- both empty
- (mkTyData (unLoc $1) (unLoc $2) Nothing
- (reverse (unLoc $3)) (unLoc $4)) }
+ {% do { let {(ctxt, tc, tvs, tparms) = unLoc $2}
+ ; tpats <- checkTyVars tparms True -- can have type pats
+ ; return $
+ L (comb4 $1 $2 $3 $4)
+ -- We need the location on tycl_hdr in case
+ -- constrs and deriving are both empty
+ (mkTyData (unLoc $1) (ctxt, tc, tvs, tpats)
+ Nothing (reverse (unLoc $3)) (unLoc $4)) } }