deepseq
deepseq copied to clipboard
Deep evaluation of data structures
This is a left-over issue from #6 As described in https://github.com/haskell/deepseq/issues/6#issuecomment-147619390 by @glguy defining an instance for `TVar` is complicated since we'd lose `{-# LANGUAGE Safe #-}` by import `TVar`...
I propose an `NFData` method (by some name) ```haskell whnfIsNf :: proxy a -> Bool whnfIsNf _ = False ``` Then we can have, for example, ```haskell instance NFData Integer...
```haskell newtype Whnf a = Whnf a newtype Whnf1 f a = Whnf1 (f a) newtype Whnf2 bi a b = Whnf2 (bi a b) instance NFData (Whnf a) where...
I suggested to remove the instance NFData (a -> b) because it cannot be implemented properly. I think the proposal got broad support: https://mail.haskell.org/libraries/2016-May/026961.html We have still to decide whether...
If we have `f :: b -> Void` and `g :: a -> b`, we can get `f . g :: a -> Void`. But if we do this recursively,...
Generic instances of `NFData` and `NFData1`, and documentation. ```haskell instance (Generic a, GNFData Zero (Rep a)) => NFData (Generically a) where rnf :: Generically a -> () rnf (Generically a)...
Adds instances for: - UArray - ForeignPtr - TVar Fixes #44 and fixes #15. Note that the ForeignPtr instance is strict in the contained Addr# but not the ForeignPtrContents. I...
If a type has a `Foldable` instance, then we can force it from left to right or from right to left. Fixes #17
I'm currently in a situation where I want to `rnf` a value from an upstream library, but it doesn't define `NFData` instances. It does, however, define a `Generic` instance. If...
Current implementation of `$!!` is: ``` deepseq :: NFData a => a -> b -> b deepseq a b = rnf a `seq` b ($!!) :: (NFData a) => (a...