It's possible to define a reasonable NFData instance for any Foldable type. We can offer a suitable rnf to help.
data Unit = Unit
instance Monoid Unit where
mempty = Unit
Unit `mappend` Unit = Unit -- strict in both arguments, unlike ()
rnfFoldable :: (Foldable f, NFData a) => f a -> ()
rnfFoldable xs = foldMap (\x -> rnf x `seq` Unit) xs `seq` ()
It's possible to define a reasonable
NFDatainstance for anyFoldabletype. We can offer a suitablernfto help.