Fix Trac #246: order of matching in record patterns
Fix Trac #246: order of matching in record patterns

While I was looking at the desugaring of pattern matching (fixing
Trac #3126) I finally got around to fixing another long-standing bug:
when matching in a record pattern, GHC should match left-to-right in
the programmer-specfied order, *not* left-to-right positionally in 
the original record declaration.

Needless to say, that requires a little more code. 
See Note [Record patterns] in MatchCon.lhs



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