[commit: ghc] master: Drop NFData constraint from compact. (5841574)
git at git.haskell.org
git at git.haskell.org
Thu Feb 23 08:06:01 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/58415741882b8e350beaf81ccedb74ee9c99257d/ghc
>---------------------------------------------------------------
commit 58415741882b8e350beaf81ccedb74ee9c99257d
Author: Edward Z. Yang <ezyang at cs.stanford.edu>
Date: Mon Feb 20 21:50:41 2017 -0800
Drop NFData constraint from compact.
Summary:
It's both unsound (easy to write a bogus NFData instance) and
incomplete (you might want to serialize data that doesn't have
an NFData instance, and will be fine at runtime.) So better
just to drop it. (By the way, we used to need the NFData
instance to "pre-evaluate" the data before we copied it into
the region, but since Simon Marlow rewrote the code to directly
evaluate and copy, this is no longer necessary.)
Signed-off-by: Edward Z. Yang <ezyang at cs.stanford.edu>
Test Plan: validate
Reviewers: simonmar, austin, dfeuer, bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D3168
>---------------------------------------------------------------
58415741882b8e350beaf81ccedb74ee9c99257d
libraries/compact/Data/Compact.hs | 38 +++++++++++--------------
libraries/compact/Data/Compact/Internal.hs | 3 +-
libraries/compact/Data/Compact/Serialized.hs | 19 ++++++-------
libraries/compact/compact.cabal | 8 ++----
libraries/compact/tests/compact_function.hs | 4 ---
libraries/compact/tests/compact_huge_array.hs | 4 ---
libraries/compact/tests/compact_loop.hs | 5 ----
libraries/compact/tests/compact_mutable.hs | 4 ---
libraries/compact/tests/compact_pinned.hs | 1 -
libraries/compact/tests/compact_serialize.hs | 3 +-
libraries/compact/tests/compact_simple_array.hs | 4 ---
11 files changed, 31 insertions(+), 62 deletions(-)
Diff suppressed because of size. To see it, use:
git diff-tree --root --patch-with-stat --no-color --find-copies-harder --ignore-space-at-eol --cc 58415741882b8e350beaf81ccedb74ee9c99257d
More information about the ghc-commits
mailing list