Drop NFData constraint from compact.
authorEdward Z. Yang <ezyang@cs.stanford.edu>
Tue, 21 Feb 2017 05:50:41 +0000 (21:50 -0800)
committerEdward Z. Yang <ezyang@cs.stanford.edu>
Thu, 23 Feb 2017 04:47:50 +0000 (20:47 -0800)
commit58415741882b8e350beaf81ccedb74ee9c99257d
tree33478f3282fc4448b90293c77fae06980c7f94eb
parent992ea02980d59eec0ac730b912fa16733a0fe0e1
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@cs.stanford.edu>
Test Plan: validate

Reviewers: simonmar, austin, dfeuer, bgamari

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D3168
libraries/compact/Data/Compact.hs
libraries/compact/Data/Compact/Internal.hs
libraries/compact/Data/Compact/Serialized.hs
libraries/compact/compact.cabal
libraries/compact/tests/compact_function.hs
libraries/compact/tests/compact_huge_array.hs
libraries/compact/tests/compact_loop.hs
libraries/compact/tests/compact_mutable.hs
libraries/compact/tests/compact_pinned.hs
libraries/compact/tests/compact_serialize.hs
libraries/compact/tests/compact_simple_array.hs