lots of CPP and cleanup of 'Data.Monoid/Semigroup' stuff#1876
lots of CPP and cleanup of 'Data.Monoid/Semigroup' stuff#1876parsonsmatt merged 5 commits intoyesodweb:masterfrom
Conversation
|
Also a split-off from #1862 |
|
Failed tests don't seem to be because of yesod itself, but permissions on Windows 🤔 |
Mostly found all the imports of 'Data.Monoid' and 'Data.Semigroup' and removed as much as I can without breaking it. Used CPP for backwards compatibility where needed. Thought about using CPP to avoid deprecation warning of 'parseMonad', but defining a helper function seemed way more straightforward.
c9d339d to
43d6514
Compare
|
Rebased on new master and also noticed pragmas were overused, so at least wanted to remove CPP pragmas that were obviously superfluous. ... tests are failing because of |
demo/streaming/streaming.hs
Outdated
| #if !MIN_VERSION_base(4,11,0) | ||
| import Data.Semigroup ((<>)) | ||
| #endif |
There was a problem hiding this comment.
base-4.11 corresponds to GHC 8.4. We currently have a base lower bound on 4.10 for GHC 8.2. 8.4 was released in March 2018, almost 7 years ago, well outside of any reasonable need to preserve support.
Honestly I'm in favor of bumping the base lower bound and deleting all this CPP.
There was a problem hiding this comment.
I'd be totally fine with that as well.
It's not my call to make, but if you want to, I can make 4.11 / GHC 8.4 the new lowest bound and remove all CPP that was needed for base >= 4.10
There was a problem hiding this comment.
@parsonsmatt
Do you want me to update the cabal files and remove the unnecessary code?
There was a problem hiding this comment.
@parsonsmatt
Should I also bump the (patch) version of every package I set to base >= 4.11? (And add to the Changelog?)
There was a problem hiding this comment.
That would be proper, but I'd also hate to cause this PR to get bigger due to scope creep. We can always make a followup issue to drop GHC 8.4 support and do all related changes there.
There was a problem hiding this comment.
Actually doing the bumping and removing now makes this a less big PR (in terms of code changes), so I went ahead and did so.
If there are any further adjustments you need me to make, do tell 👍
|
Nice! |
|
Maybe wait with publishing the new patch versions until the final PR is accepted and merged? Vlix#1 |
* lots of CPP and cleanup of 'Data.Monoid/Semigroup' stuff Mostly found all the imports of 'Data.Monoid' and 'Data.Semigroup' and removed as much as I can without breaking it. Used CPP for backwards compatibility where needed. Thought about using CPP to avoid deprecation warning of 'parseMonad', but defining a helper function seemed way more straightforward. * yesod-core: found a better solution with 'defaultRequest' * removed a bunch of pragmas that weren't used * removal of Semigroup stuff outside of libraries * bump to 'base >= 4.11' on libraries that had Semigroup imports (and remove the imports)
Mostly found all the imports of 'Data.Monoid' and 'Data.Semigroup' and removed as much as I can without breaking it.
Used CPP for backwards compatibility where needed.
Thought about using CPP to avoid deprecation warning of 'parseMonad', but defining a helper function seemed way more straightforward.