[Haskell-cafe] Derving NFData via Generics from a type that has a vector doesn't work. (was trying to understand out of memory exceptions)

anatoly yakovenko aeyakovenko at gmail.com
Wed Apr 17 16:56:20 CEST 2013


so this one works


instance NFData (V.Vector a) where rnf a = force a `seq` ()


any reason why something like this isn't part of the vector library?


Thanks,
Anatoly


On Apr 17, 2013, at 7:51 AM, anatoly yakovenko <aeyakovenko at gmail.com> wrote:

> Thanks,  So now i at least get a compiler error
> 
>    No instance for (NFData (V.Vector Double))
> 
> So how would one define NFData instance for vector?
> 
> 
> On Apr 16, 2013, at 10:51 PM, Andres Löh <andres at well-typed.com> wrote:
> 
>>> NFData Simple where rnf = genericRnf
> 




More information about the Haskell-Cafe mailing list