Fix regression in Data.Fixed Read instance (re #9231)
Fix regression in Data.Fixed Read instance (re #9231)

`convertFixed` operates under the wrong assumption that
`Data.Fixed.resolution` returns a base-10 exponent `e`, whereas it
actually returns the power-of-10 value `10^e`.

So while the code (that was introduced in 5f19f951d8 / #7483) happens to
compute a correct result by coincidence, it allocates huge integer values
in the process (i.e. `10^(10^e)`) which cause long computations which
eventually result in out-of-memory conditions for `e`-values beyond
`Data.Fixed.Milli`.

A proper long-term fix would probably be to extend the `HasResolution`
type-class to have a 2nd method providing the `e` value.

Signed-off-by: Herbert Valerio Riedel <hvr@gnu.org>

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

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