James ‘Twey’ Kay wrote:In most cases where you think
> You can (probably) automatically derive it via Template Haskell using
> the deepseq-th package:
>
> {-# LANGUAGE TemplateHaskell #-}
> import Control.DeepSeq.TH
>
> data MyState = ...
>
> $(deriveNFData ''MyState)
You should probably try the deepseq-generics package before you try deepseq-th.
The generics version was suggested to me by the author of the TH version,
Herbert Valerio Riedel. It seems to be just as fast as the TH version and
doesn't require TH.
Cheers,
Erik
--
----------------------------------------------------------------------
Erik de Castro Lopo
http://www.mega-nerd.com/
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe