Reify data family instances correctly.
Reify data family instances correctly.

Summary:
Fix #9692.

The reifier didn't account for the possibility that data/newtype
instances are sometimes eta-reduced. It now eta-expands as necessary.

Test Plan: th/T9692

Reviewers: simonpj, austin

Subscribers: thomie, carter, ezyang, simonmar

Differential Revision: https://phabricator.haskell.org/D355

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