Commits

Maxime Henrion committed 8b242a8

Fix the documentation of rnf and deepseq that was still switched, and add
documentation for functions that were missing it.

  • Participants
  • Parent commits 019adf2

Comments (0)

Files changed (1)

File Control/DeepSeq.hs

 import GHC.Generics
 
 class DeepSeq a where
-  -- | Evaluates its first argument to normal form, and then returns its
-  -- second argument as the result.
+  -- | Evaluate its argument to normal form, and then return '()'.
   rnf :: a -> ()
   default rnf :: (Generic a, GDeepSeq (Rep a)) => a -> ()
   rnf = grnf . from
 ($!!) :: DeepSeq a => (a -> b) -> a -> b
 f $!! x = x `deepseq` f x
 
+-- | Evaluates its first argument to normal form, and then returns its
+-- second argument as the result.
 deepseq :: DeepSeq a => a -> b -> b
 deepseq x y = rnf x `seq` y
 
+-- | Evaluates its argument to normal form, and then return it.
 force :: DeepSeq a => a -> a
 force x = x `deepseq` x