-
Notifications
You must be signed in to change notification settings - Fork 178
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
Remove strict compose
versions
#745
Conversation
Once this is merged, I think it would be good to make a release in time for GHC 9.0, so users of |
Do you know the deadline?
…On Thu, Sep 10, 2020, 5:34 AM Simon Jakobi ***@***.***> wrote:
Once this is merged, I think it would be good to make a release in time
for GHC 9.0, so users of compose are less likely to encounter the
differences in strictness.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#745 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOOF7OQYUIHX3Y3LQZPGMTSFCMS5ANCNFSM4REUVONA>
.
|
Unfortunately I don't. https://gitlab.haskell.org/ghc/ghc/-/issues/18216#note_298165 seems to indicate that the release preparations are ongoing. @bgamari When would a |
Do we have enough |
No idea. I was wondering how to best convert a lazy map to a strict one by forcing all the values. Is there anything better than |
Let's not discuss this in a closed PR though. |
`map id` is the best way I know.
…On Fri, Sep 11, 2020, 5:50 PM Simon Jakobi ***@***.***> wrote:
Let's not discuss this in a closed PR though.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#745 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOOF7J3QCM7GX5DSKK3TTLSFKLQTANCNFSM4REUVONA>
.
|
Actually, that's wrong.... The nf package has the right stuff for doing it
efficiently. Or a strictifying fold.
…On Fri, Sep 11, 2020, 6:05 PM David Feuer ***@***.***> wrote:
`map id` is the best way I know.
On Fri, Sep 11, 2020, 5:50 PM Simon Jakobi ***@***.***>
wrote:
> Let's not discuss this in a closed PR though.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#745 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAOOF7J3QCM7GX5DSKK3TTLSFKLQTANCNFSM4REUVONA>
> .
>
|
What does that look like in practice? Could you give an example? |
forceValues :: Map k v -> ()
forceValues = foldl' (flip seq) ()
Looks like I was wrong about nf. I thought it had a type like this:
newtype Shallow a = Shallow a
instance NFData (Shallow a) where
rnf !_ = ()
With that,
forceValues = rnf . L.map Shallow
where L.map Shallow should be rewritten to a coercion.
…On Fri, Sep 11, 2020, 6:10 PM Simon Jakobi ***@***.***> wrote:
Actually, that's wrong.... The nf package has the right stuff for doing it
efficiently. Or a strictifying fold.
What does that look like in practice? Could you give an example?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#745 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOOF7MCDURYQ6ZE32E5M2LSFKN3XANCNFSM4REUVONA>
.
|
So a
Cheers! |
Yes, but fusing that definition ... not so easy! Maybe we should actually
offer that toStrict function so we can attach RULES to it.
…On Fri, Sep 11, 2020, 6:41 PM Simon Jakobi ***@***.***> wrote:
So a toStrict function could be defined as
toStrict :: Map k v -> Map k v
toStrict m = foldl' (flip seq) () m `seq` m
Cheers!
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#745 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAOOF7I3G3QAJAAH7O7MRKLSFKRTNANCNFSM4REUVONA>
.
|
…as discussed in
haskell-unordered-containers/unordered-containers#299 (comment).