[Haskell-cafe] different behaviours with or without putStrLn

Erik de Castro Lopo mle+hs at mega-nerd.com
Sun Jan 12 23:08:03 UTC 2014

James ‘Twey’ Kay wrote:

> You can (probably) automatically derive it via Template Haskell using 
> the deepseq-th package:
>      {-# LANGUAGE TemplateHaskell #-}
>      import Control.DeepSeq.TH
>      data MyState = ...
>      $(deriveNFData ''MyState)

In most cases where you think 

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.

Erik de Castro Lopo

More information about the Haskell-Cafe mailing list