From e557b87ba59529fb25efac95fc3b3f208cf8cf75 Mon Sep 17 00:00:00 2001 From: Ross Paterson Date: Sun, 27 Aug 2006 16:40:44 +0000 Subject: [PATCH] expand advice on importing these modules --- Data/IntMap.hs | 7 ++++--- Data/IntSet.hs | 7 ++++--- Data/Map.hs | 7 ++++--- Data/Set.hs | 7 ++++--- 4 files changed, 16 insertions(+), 12 deletions(-) diff --git a/Data/IntMap.hs b/Data/IntMap.hs index e01e13b..e4377e5 100644 --- a/Data/IntMap.hs +++ b/Data/IntMap.hs @@ -10,10 +10,11 @@ -- -- An efficient implementation of maps from integer keys to values. -- --- This module is intended to be imported @qualified@, to avoid name --- clashes with "Prelude" functions. eg. +-- Since many function names (but not the type name) clash with +-- "Prelude" names, this module is usually imported @qualified@, e.g. -- --- > import Data.IntMap as Map +-- > import Data.IntMap (IntMap) +-- > import qualified Data.IntMap as IntMap -- -- The implementation is based on /big-endian patricia trees/. This data -- structure performs especially well on binary operations like 'union' diff --git a/Data/IntSet.hs b/Data/IntSet.hs index b48a7c8..36cac36 100644 --- a/Data/IntSet.hs +++ b/Data/IntSet.hs @@ -10,10 +10,11 @@ -- -- An efficient implementation of integer sets. -- --- This module is intended to be imported @qualified@, to avoid name --- clashes with "Prelude" functions. eg. +-- Since many function names (but not the type name) clash with +-- "Prelude" names, this module is usually imported @qualified@, e.g. -- --- > import Data.IntSet as Set +-- > import Data.IntSet (IntSet) +-- > import qualified Data.IntSet as IntSet -- -- The implementation is based on /big-endian patricia trees/. This data -- structure performs especially well on binary operations like 'union' diff --git a/Data/Map.hs b/Data/Map.hs index 56b25e1..da83cf2 100644 --- a/Data/Map.hs +++ b/Data/Map.hs @@ -11,10 +11,11 @@ -- -- An efficient implementation of maps from keys to values (dictionaries). -- --- This module is intended to be imported @qualified@, to avoid name --- clashes with Prelude functions. eg. +-- Since many function names (but not the type name) clash with +-- "Prelude" names, this module is usually imported @qualified@, e.g. -- --- > import Data.Map as Map +-- > import Data.Map (Map) +-- > import qualified Data.Map as Map -- -- The implementation of 'Map' is based on /size balanced/ binary trees (or -- trees of /bounded balance/) as described by: diff --git a/Data/Set.hs b/Data/Set.hs index fd80ca6..5f45ce9 100644 --- a/Data/Set.hs +++ b/Data/Set.hs @@ -9,10 +9,11 @@ -- -- An efficient implementation of sets. -- --- This module is intended to be imported @qualified@, to avoid name --- clashes with "Prelude" functions. eg. +-- Since many function names (but not the type name) clash with +-- "Prelude" names, this module is usually imported @qualified@, e.g. -- --- > import Data.Set as Set +-- > import Data.Set (Set) +-- > import qualified Data.Set as Set -- -- The implementation of 'Set' is based on /size balanced/ binary trees (or -- trees of /bounded balance/) as described by: -- 1.7.10.4