Deepseq proposed patch
Henning Thielemann
lemming at henning-thielemann.de
Thu Jun 10 16:52:47 EDT 2010
On Thu, 10 Jun 2010, Julian Blake Kongslie wrote:
> Control.DeepSeq has a large number of instances for its class NFData,
> I'd like to propose a new one:
>
> import Data.Data
>
> dataDeepSeq :: (Data a) => a -> a
> dataDeepSeq a = gmapQr ($) a (seq . dataDeepSeq) a
>
> instance (Data a) => NFData a where
> rnf a = dataDeepSeq a `seq` ()
Is this an instance at all? It is not of the form NFData Type or NFData
(TypeCon a) or so.
More information about the Libraries
mailing list