-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GHC 8.4 compatibility. #186
Conversation
Turns out that the patches were broken on pre-8.0 GHCs. I've added a |
8221ad4
to
5f40732
Compare
I think the |
The easiest way to fix this is to convert to |
That works. I don't really understand how |
Regarding |
OK! So I'll leave the hpackification to you, since you've kindly offered, and once I've cleaned up this last stubborn warning I will squash and I think this will be ready to merge, though I think dependencies aren't ready yet so it shouldn't be released. |
d123ebd
to
59399b8
Compare
@quasicomputational I pushed the Hpack changes to |
BTW, thanks for looking into this + I think the approach you took of trying to keep dependencies minimal is the right thing to do for |
59399b8
to
8ad13d8
Compare
This is a simple application of https://github.com/hvr/head.hackage/blob/master/patches/doctest-0.13.0.patch, by Ryan Scott. It's not quite road-ready yet and the 8.4 builder is still allowed to fail.
8ad13d8
to
e1f0d6b
Compare
Rebased and Travis is just checking that it likes it with RE dependencies: hashable is a definite snag, but it might be the only one. haskell-unordered-containers/hashable#149 is tracking that and it might only need a bounds bump on base. |
I released a new version of |
An other thing I discovered, tests fail with If GHC has some flag to disable fancy error messages, then that's what we want to use. |
package.yaml
Outdated
- syb >= 0.3 | ||
- code-page >= 0.1 | ||
- deepseq | ||
- directory | ||
- filepath | ||
- process | ||
- ghc-paths >= 0.1.0.9 | ||
- semigroups |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still want to get rid of this dependency.
src/Runner.hs
Outdated
-- | Sum up summaries. | ||
instance Monoid Summary where | ||
mempty = Summary 0 0 0 0 | ||
(Summary x1 x2 x3 x4) `mappend` (Summary y1 y2 y3 y4) = Summary (x1 + y1) (x2 + y2) (x3 + y3) (x4 + y4) | ||
mappend = (<>) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want the simplest possible code here to make it compile (it's an internal type, we don't need the Semigroup
instance), something like:
instance Monoid Summary where
mempty = Summary 0 0 0 0
#if MIN_VERSION_base(4,11,0)
instance Semigroup Summary where
(Summary x1 x2 x3 x4) <> (Summary y1 y2 y3 y4) =
#else
(Summary x1 x2 x3 x4) `mappend` (Summary y1 y2 y3 y4) =
#endif
Summary (x1 + y1) (x2 + y2) (x3 + y3) (x4 + y4)
(untested!)
Weren't fancy colours introduced in GHC 8.2? I don't know why that'd suddenly start being a problem now. The flag to tell GHC to disable it is |
8f7d06f
to
46e56da
Compare
46e56da
to
cd3eb7f
Compare
The 8.4 builder is green (or should be, unless I just messed up a prettifying rebase), but it's still marked as allow-failure. I think, until 8.4's officially released, that's sane. |
I guess is broken with 8.2 too. It has been reported as #181. |
@quasicomputational Thanks a lot! Regarding the |
On Hackage. |
@quasicomputational are you on Twitter btw? |
Thanks! I'm not a fan of CPP within statements like that, but it's up to you; it's an internal module, so there's no desire to expose a No, I'm not on Twitter, sorry. |
Yes, understandable. For me it's a trade off: One solution is to have two CPP statements that have invariants between each other, the second solution is CPP within statements. I don't like neither of it, but given a choice I lean towards the later (for the reason that I don't want to deal with the invariants). |
This is a simple application of
https://github.com/hvr/head.hackage/blob/master/patches/doctest-0.13.0.patch,
by Ryan Scott.
It's not quite road-ready yet and the 8.4 builder is still allowed to fail.