Drop GHC 8.0 compatibility
ClosedPublic

Authored by RyanGlScott on Mar 10 2018, 5:22 PM.

Details

Summary

GHC 8.4.1 is out, so now GHC's support window only extends
back to GHC 8.2. This means we can delete gobs of code that were
only used for GHC 8.0 support. Hooray!

Test Plan

./validate

Diff Detail

Repository
rGHC Glasgow Haskell Compiler
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
RyanGlScott created this revision.Mar 10 2018, 5:22 PM
dfeuer accepted this revision.Mar 11 2018, 1:55 PM
dfeuer added a subscriber: dfeuer.

Nice! I see you found a bunch of MIN_VERSION_* you could remove for libraries. Did you also check for __GLASGOW_HASKELL__ and MIN_VERSION_GLASGOW_HASKELL tests we can remove?

This revision is now accepted and ready to land.Mar 11 2018, 1:55 PM

Did you also check for __GLASGOW_HASKELL__ and MIN_VERSION_GLASGOW_HASKELL tests we can remove?

I did. To my pleasant surprise, the only uses of either macro that I could find were in the test suite, so I left them alone.

dfeuer added a comment.EditedMar 11 2018, 3:01 PM

Did you also check for __GLASGOW_HASKELL__ and MIN_VERSION_GLASGOW_HASKELL tests we can remove?

I did. To my pleasant surprise, the only uses of either macro that I could find were in the test suite, so I left them alone.

I think I just found two. Look in Data.Array.ST. runSTArray and runSTUArray have #if __GLASGOW_HASKELL__ >= 711. Did you forget to search for development version numbers?

I think I just found two. Look in Data.Array.ST. runSTArray and runSTUArray have #if __GLASGOW_HASKELL__ >= 711. Did you forget to search for development version numbers?

Nope—I just didn't look in submodules. There are probably tons of those in places like Haddock, for instance, but I simply don't have the energy to exhaustively comb through all of them.

bgamari accepted this revision.Mar 11 2018, 4:00 PM
bgamari added a subscriber: alexbiehl.

Thanks @RyanGlScott!

@alexbiehl, perhaps you could comb through Haddock looking for dead CPP like is done in this patch?

@bgamari, how can I put together a differential for array? I don't know the
correct workflow.

dfeuer added inline comments.Mar 11 2018, 10:20 PM
compiler/utils/UniqFM.hs
348–349

This was my doing, and it was better than what came before, but it's the wrong approach! What we really should do is much simpler:

equalKeysUFM (UFM m1) (UFM m2) = liftEq (\_ _ -> True) m1 m2

Do you want to do that now, or should I put together a separate differential?

@alexbiehl, perhaps you could comb through Haddock looking for dead CPP like is done in this patch?

Good idea, will do so.

RyanGlScott added inline comments.Mar 12 2018, 6:56 AM
compiler/utils/UniqFM.hs
348–349

I'd prefer to keep this as small of a Diff as possible, so I'd favor leaving that to a separate Diff.

@bgamari, how can I put together a differential for array? I don't know the
correct workflow.

Just running arc diff as usual in libraries/array should work.

dfeuer requested changes to this revision.Mar 12 2018, 2:24 PM

When I was updating array, I realized that you missed a spot. We no longer need to derive Typeable explicitly, as that has been automatic for some time. That also means some modules can drop the Data.Typeable import and a few might be able to drop DeriveDataTypeable.

This revision now requires changes to proceed.Mar 12 2018, 2:24 PM

When I was updating array, I realized that you missed a spot. We no longer need to derive Typeable explicitly, as that has been automatic for some time. That also means some modules can drop the Data.Typeable import and a few might be able to drop DeriveDataTypeable.

Hm. I could have sworn that I expunged all uses of Data.Typeable in 95dfdceb8b4dcc54a366949577d9ee389bad5bc3, but it does appear that some still remain (or perhaps snuck in since that commit).

  • Remove some rogue 'deriving Typeable' statements
dfeuer accepted this revision.Mar 12 2018, 6:09 PM
This revision is now accepted and ready to land.Mar 12 2018, 6:09 PM
This revision was automatically updated to reflect the committed changes.