Apply the kind subst to the (kinds of the) quanitifed tyvars in deriveTyData
Apply the kind subst to the (kinds of the) quanitifed tyvars in deriveTyData

I've elaboated Note [Unify kinds in deriving] to explain
what is going on here.

The change fixes Trac #8893.

AlexanderPankiv/ghc,fmthoma/ghc,vTurbine/ghc,gcampax/ghc,nkaretnikov/ghc,mfine/ghc,GaloisInc/halvm-ghc,mfine/ghc,ryantm/ghc,vikraman/ghc,ghc-android/ghc,nathyong/microghc-ghc,anton-dessiatov/ghc,nkaretnikov/ghc,sdiehl/ghc,mcschroeder/ghc,tjakway/ghcjvm,mettekou/ghc,mcschroeder/ghc,lukexi/ghc,da-x/ghc,mfine/ghc,fmthoma/ghc,da-x/ghc,ezyang/ghc,nushio3/ghc,anton-dessiatov/ghc,vTurbine/ghc,siddhanathan/ghc,GaloisInc/halvm-ghc,GaloisInc/halvm-ghc,urbanslug/ghc,sdiehl/ghc,siddhanathan/ghc,nkaretnikov/ghc,christiaanb/ghc,TomMD/ghc,ml9951/ghc,vikraman/ghc,christiaanb/ghc,vTurbine/ghc,acowley/ghc,forked-upstream-packages-for-ghcjs/ghc,tjakway/ghcjvm,anton-dessiatov/ghc,nathyong/microghc-ghc,spacekitteh/smcghc,TomMD/ghc,siddhanathan/ghc,vikraman/ghc,bitemyapp/ghc,TomMD/ghc,lukexi/ghc,jstolarek/ghc,christiaanb/ghc,green-haskell/ghc,acowley/ghc,ghc-android/ghc,vTurbine/ghc,vTurbine/ghc,fmthoma/ghc,oldmanmike/ghc,sgillespie/ghc,acowley/ghc,da-x/ghc,tibbe/ghc,gridaphobe/ghc,green-haskell/ghc,AlexanderPankiv/ghc,nushio3/ghc,spacekitteh/smcghc,lukexi/ghc,wxwxwwxxx/ghc,urbanslug/ghc,frantisekfarka/ghc-dsi,siddhanathan/ghc,AlexanderPankiv/ghc,gcampax/ghc,GaloisInc/halvm-ghc,urbanslug/ghc,green-haskell/ghc,mcschroeder/ghc,mettekou/ghc,lukexi/ghc,forked-upstream-packages-for-ghcjs/ghc,shlevy/ghc,forked-upstream-packages-for-ghcjs/ghc,bitemyapp/ghc,acowley/ghc,vikraman/ghc,sgillespie/ghc,nathyong/microghc-ghc,tibbe/ghc,ml9951/ghc,sdiehl/ghc,nathyong/microghc-ghc,mfine/ghc,nushio3/ghc,acowley/ghc,sdiehl/ghc,mcschroeder/ghc,sdiehl/ghc,olsner/ghc,fmthoma/ghc,snoyberg/ghc,ezyang/ghc,holzensp/ghc,sgillespie/ghc,mcschroeder/ghc,fmthoma/ghc,vTurbine/ghc,frantisekfarka/ghc-dsi,mfine/ghc,ryantm/ghc,mettekou/ghc,GaloisInc/halvm-ghc,tjakway/ghcjvm,jstolarek/ghc,wxwxwwxxx/ghc,spacekitteh/smcghc,shlevy/ghc,TomMD/ghc,mcschroeder/ghc,nathyong/microghc-ghc,snoyberg/ghc,gridaphobe/ghc,holzensp/ghc,bitemyapp/ghc,elieux/ghc,fmthoma/ghc,jstolarek/ghc,tjakway/ghcjvm,urbanslug/ghc,nkaretnikov/ghc,oldmanmike/ghc,oldmanmike/ghc,oldmanmike/ghc,siddhanathan/ghc,wxwxwwxxx/ghc,bitemyapp/ghc,mettekou/ghc,wxwxwwxxx/ghc,ezyang/ghc,gridaphobe/ghc,ryantm/ghc,gcampax/ghc,spacekitteh/smcghc,olsner/ghc,elieux/ghc,acowley/ghc,wxwxwwxxx/ghc,anton-dessiatov/ghc,frantisekfarka/ghc-dsi,TomMD/ghc,sgillespie/ghc,shlevy/ghc,mettekou/ghc,nushio3/ghc,shlevy/ghc,mettekou/ghc,shlevy/ghc,elieux/ghc,ghc-android/ghc,frantisekfarka/ghc-dsi,tibbe/ghc,da-x/ghc,nushio3/ghc,wxwxwwxxx/ghc,olsner/ghc,vikraman/ghc,gridaphobe/ghc,nathyong/microghc-ghc,ml9951/ghc,nkaretnikov/ghc,wxwxwwxxx/ghc,anton-dessiatov/ghc,tibbe/ghc,gcampax/ghc,jstolarek/ghc,mfine/ghc,forked-upstream-packages-for-ghcjs/ghc,olsner/ghc,forked-upstream-packages-for-ghcjs/ghc,olsner/ghc,tjakway/ghcjvm,christiaanb/ghc,elieux/ghc,da-x/ghc,tjakway/ghcjvm,oldmanmike/ghc,nathyong/microghc-ghc,green-haskell/ghc,anton-dessiatov/ghc,frantisekfarka/ghc-dsi,gcampax/ghc,vTurbine/ghc,forked-upstream-packages-for-ghcjs/ghc,siddhanathan/ghc,urbanslug/ghc,ghc-android/ghc,da-x/ghc,olsner/ghc,nushio3/ghc,mcschroeder/ghc,mfine/ghc,olsner/ghc,ezyang/ghc,nushio3/ghc,gridaphobe/ghc,bitemyapp/ghc,nkaretnikov/ghc,holzensp/ghc,ryantm/ghc,ml9951/ghc,GaloisInc/halvm-ghc,AlexanderPankiv/ghc,elieux/ghc,ml9951/ghc,TomMD/ghc,vikraman/ghc,snoyberg/ghc,forked-upstream-packages-for-ghcjs/ghc,lukexi/ghc,snoyberg/ghc,TomMD/ghc,GaloisInc/halvm-ghc,ryantm/ghc,sgillespie/ghc,fmthoma/ghc,ghc-android/ghc,ml9951/ghc,christiaanb/ghc,acowley/ghc,urbanslug/ghc,sgillespie/ghc,ezyang/ghc,ml9951/ghc,christiaanb/ghc,gcampax/ghc,gridaphobe/ghc,spacekitteh/smcghc,snoyberg/ghc,da-x/ghc,ezyang/ghc,tjakway/ghcjvm,oldmanmike/ghc,sdiehl/ghc,gcampax/ghc,nkaretnikov/ghc,urbanslug/ghc,tibbe/ghc,mettekou/ghc,AlexanderPankiv/ghc,holzensp/ghc,snoyberg/ghc,snoyberg/ghc,siddhanathan/ghc,ezyang/ghc,shlevy/ghc,ghc-android/ghc,green-haskell/ghc,vikraman/ghc,AlexanderPankiv/ghc,elieux/ghc,shlevy/ghc,sdiehl/ghc,anton-dessiatov/ghc,holzensp/ghc,ghc-android/ghc,ml9951/ghc,gridaphobe/ghc,sgillespie/ghc,AlexanderPankiv/ghc,elieux/ghc,christiaanb/ghc,jstolarek/ghc,oldmanmike/ghc