Repository : ssh://darcs.haskell.org//srv/darcs/packages/containers On branch : master
http://hackage.haskell.org/trac/ghc/changeset/39bdf353d3e90a2fb75cf5b5baa5f40a8044ffcf >--------------------------------------------------------------- commit 39bdf353d3e90a2fb75cf5b5baa5f40a8044ffcf Author: Johan Tibell <[email protected]> Date: Thu Nov 17 21:42:05 2011 -0800 Improve strictness properties documentation >--------------------------------------------------------------- Data/Map/Strict.hs | 14 +++++++++----- 1 files changed, 9 insertions(+), 5 deletions(-) diff --git a/Data/Map/Strict.hs b/Data/Map/Strict.hs index edfc9af..ba50f05 100644 --- a/Data/Map/Strict.hs +++ b/Data/Map/Strict.hs @@ -263,14 +263,18 @@ import Data.Map.Base hiding -- $strictness -- --- * All functions are strict in both key and value arguments. Examples: +-- This module is strict in keys and values. In particular, -- --- > insertWith (+) k undefined m == undefined --- > delete undefined m == undefined +-- * key and value function arguments passed to functions are +-- evaluated to WHNF before the function body is evaluated, and +-- +-- * keys and values returned by high-order function arguments are +-- evaluated to WHNF before they are inserted into the map. -- --- * Keys and values are evaluated to WHNF before they are stored in --- the map. Examples: +-- Here are some examples: -- +-- > insertWith (+) k undefined m == undefined +-- > delete undefined m == undefined -- > map (\ v -> undefined) == undefined -- > mapKeys (\ k -> undefined) == undefined _______________________________________________ Cvs-libraries mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-libraries
