Make the loop-breaking algorithm a bit more liberal, where RULES are involved
Make the loop-breaking algorithm a bit more liberal, where RULES are involved

This is another gloss on the now-quite-subtle and heavily-documented algorithm
for choosing loop breakers.

This fix, provoked by Roman's NDP library, makes sure that when we are choosing
a loop breaker we only take into account variables free on the *rhs* of a rule
not the *lhs*.

Most of the new lines are comments!


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