-
Notifications
You must be signed in to change notification settings - Fork 97
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
add more NFData instances #305
add more NFData instances #305
Conversation
I'm all in favor of the new instances. Please make sure performance is not lost for existing instances. Either
|
Will inspection-testing be sufficient for proving (1)?
…On Sat, 6 Feb 2021, 10:35 am David Feuer, ***@***.***> wrote:
I'm all in favor of the new instances. Please make sure performance is not
lost for existing instances. Either
1. Check that they produce identical Core (including unfoldings,
arity, and unfolding guidance)
2. Benchmark with several instances, especially including cheap ones
(e.g., ones where deepseq = seq, where rnf = const (), and where rnf
just forces one field of a record), where the map is various sizes and
already in normal form.
3. Leave the existing instances alone and just add the new ones on
top. This is a bit silly, of course, but it's certainly the easiest way to
be confident you won't goof anything up.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#305 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATLFOJT7JJ6XWVAEQRJ33LS5SFG5ANCNFSM4XFU3WYA>
.
|
No, I don't think so. That's not looking at things like unfoldings.
…On Fri, Feb 5, 2021, 9:37 PM Isaac Elliott ***@***.***> wrote:
Will inspection-testing be sufficient for proving (1)?
On Sat, 6 Feb 2021, 10:35 am David Feuer, ***@***.***>
wrote:
> I'm all in favor of the new instances. Please make sure performance is
not
> lost for existing instances. Either
>
> 1. Check that they produce identical Core (including unfoldings,
> arity, and unfolding guidance)
> 2. Benchmark with several instances, especially including cheap ones
> (e.g., ones where deepseq = seq, where rnf = const (), and where rnf
> just forces one field of a record), where the map is various sizes and
> already in normal form.
> 3. Leave the existing instances alone and just add the new ones on
> top. This is a bit silly, of course, but it's certainly the easiest way
to
> be confident you won't goof anything up.
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <
#305 (comment)
>,
> or unsubscribe
> <
https://github.com/notifications/unsubscribe-auth/AATLFOJT7JJ6XWVAEQRJ33LS5SFG5ANCNFSM4XFU3WYA
>
> .
>
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#305 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOOF7LEKY5ZHXJ3GFIJIZDS5STNPANCNFSM4XFU3WYA>
.
|
Given that, I decided to leave the existing instances as-is and only add the new ones. |
Can you add some CPP, so the new instances are only defined with recent enough versions of |
Or should we bump the minimum deepseq bound?
…On Mon, Feb 8, 2021, 8:18 AM Simon Jakobi ***@***.***> wrote:
Can you add some CPP, so the new instances are only defined with recent
enough versions of deepseq?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#305 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOOF7I3JMNSQRRJQESBL3DS57QCJANCNFSM4XFU3WYA>
.
|
I think that might limit GHC compatibility too much for people who can't easily upgrade boot libraries separately from the compiler. |
The latest deepseq supports base>=4.5. Even we don't go back that far!
…On Mon, Feb 8, 2021, 12:57 PM Simon Jakobi ***@***.***> wrote:
Or should we bump the minimum deepseq bound?
I think that might limit GHC compatibility too much for people who can't
easily upgrade boot libraries separately from the compiler.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#305 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOOF7LH7GDEAZJDBOWTRZTS6AQXBANCNFSM4XFU3WYA>
.
|
True. But AFAIK using the latest |
Explain?
…On Mon, Feb 8, 2021, 1:02 PM Simon Jakobi ***@***.***> wrote:
The latest deepseq supports base>=4.5. Even we don't go back that far!
True. But AFAIK using the latest deepseq with e.g. GHC 8.2 is rather
tricky with e.g. Nix.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#305 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOOF7NI4XNVCWHYHPM2YITS6ARLDANCNFSM4XFU3WYA>
.
|
I don't remember the details. AFAIK it's non-trivial to update boot libraries with Nix. I think I once tried to update |
For this we'd only need deepseq-1.4.3, which came out in July, 2017.
Honestly, if someone has to fuss a little too use that with an old GHC, I
don't think that's our problem.
…On Mon, Feb 8, 2021, 1:05 PM Simon Jakobi ***@***.***> wrote:
I don't remember the details. AFAIK it's non-trivial to update boot
libraries with Nix. I think I once tried to update containers or
bytestring and it was a PITA.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#305 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOOF7I7V26LTLZXLIXZZWTS6ARXTANCNFSM4XFU3WYA>
.
|
OK. If that's easier we'll need to update the |
It's easy either way, but CPP always makes the future harder.
…On Mon, Feb 8, 2021, 1:34 PM Simon Jakobi ***@***.***> wrote:
OK. If that's easier we'll need to update the deepseq bound and fix CI.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#305 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOOF7KRXNVDMRJFA2ZOIQTS6AVEJANCNFSM4XFU3WYA>
.
|
CI is failing. |
Yes, it is. Have you reached consensus on how you'd like me to fix the
version issue? It looks like it leans toward "increase the deepseq bound".
…On Fri, 12 Feb 2021, 4:50 pm David Feuer, ***@***.***> wrote:
CI is failing.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#305 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AATLFOKRHZ3T3QG7LCMTKRLS6TFSHANCNFSM4XFU3WYA>
.
|
That's definitely my inclination, yes. |
My preference is for retaining backward compatibility with |
On third thought, I'm fine with raising the @LightAndLight Could you raise the bound and fix CI, please? |
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 believe --installed=-deepseq
needs to be added to the command that generates our Travis config, so it can use a non-bundled version.
I believe |
I'd like to cut a release fairly soon and ideally include this PR. Do you think you can finish this PR in the next, say, 2 weeks, @LightAndLight? Otherwise I can take a stab at it, but I'd probably take the CPP route. |
@sjakobi I copied the |
I can reproduce the error from https://travis-ci.com/github/haskell-unordered-containers/unordered-containers/jobs/495652251 by using the following
and the following command:
I think the error message is pretty unhelpful, but I noticed that the With 7.10.3 I also have to remove the constraint on I don't have 7.8.4 installed, so I haven't been able to test with it. I'm not sure how much more pain it would take to fix the CI setup. We can probably take a shortcut and disable the benchmarks for GHC < 8. I'm slightly worried that some users might end up going down this constraint-fighting path too though, so I think we should rather switch to the CPP route. I'm sorry that I didn't insist on it in the first place. |
Merged via #314. Thank you, @LightAndLight! |
adds:
closes #304