Generalize TrieMap compression to GenMap.
Generalize TrieMap compression to GenMap.

I still haven't applied the optimization to anything besides TypeMap.

Summary:
Signed-off-by: Edward Z. Yang <ezyang@cs.stanford.edu>

Depends On: D606

Reviewers: simonpj, austin

Subscribers: carter, thomie

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

GHC Trac Issues: #9960

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