Few changes to deepseq

Oleg Grenrus oleg.grenrus at iki.fi
Tue Oct 25 15:18:06 UTC 2016


About two weeks ago i made three small PR to `deepseq` [1,2,3], to resolve three long standing issues [4,5,6]

As deepseq is a core package, I bring these issues and pull requests to the libraries@ attention, so
the pull requests could be merged or declined, and issues resolved in way or another.

- The `rwhnf` [1] helper is straightforward, I hope that it will be accepted as is.

- The deeply strict liftM, aka <$!!> [2], is discussed a bit in the issue [5].
  I think this is quite straightforward as well.

  Side note: It's not obvious what this operator does,
  also neither $!, <$!> or $!! documentation explains them properly.
  IMHO Improving the documentation of these operators should be done as a separate chore,
  there is something on wiki [7], but that description is quite sparse as well, but
  I'm not competent enough to do that. Is there some good resource?

- The NFData1 and NFData2 classes. The PR [3] proposes:

    class NFData1 f where
        liftRnf :: (a -> ()) -> f a -> ()

  definition. The is also some discussion about `rnf1 :: NFData a => f a -> ()` would be enough.
  I'm not repeating it here, `liftRnf` is just more powerful. I'll add Generics support,
  if the addition is approved.

  For the record, I think that polykinded `NFData` is not a good idea, yet.


As this is 3-proposals-in-1, the discussion time is 3 weeks, ending Nov 14.

Cheers,
Oleg Grenrus, aka phadej

- [1]: rwhnf: https://github.com/haskell/deepseq/pull/22
- [2]: deeply strict liftM: https://github.com/haskell/deepseq/pull/23
- [3]: NFData1/2: https://github.com/haskell/deepseq/pull/21
- [4]: rwhnf: https://github.com/haskell/deepseq/issues/3
- [5]: deeply strict liftM: https://github.com/haskell/deepseq/issues/13
- [6]: NFData1 helper https://github.com/haskell/deepseq/issues/8
- [7]: https://wiki.haskell.org/Performance/Strictness#Evaluating_expressions_strictly

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20161025/d36068b4/attachment.sig>


More information about the Libraries mailing list