Refactor OccAnal; and improve dead-code elimination
Refactor OccAnal; and improve dead-code elimination

The occurrence analyer is now really rather subtle when dealing
with recursive groups; see Note [Loop breaking and RULES] especially.

This patch refactors this code a bit, notably 
  * Introduces a new data type Details instead of a tuple

  * More clearly breaks up a recursive group into its SCCs
	before processing it in a separate function occAnalRec

  * As a result, does better dead-code elimination, becuause it's
   	done per SCC rather than for the whole Rec


  


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