From: simonmar Date: Tue, 28 May 2002 14:06:01 +0000 (+0000) Subject: [project @ 2002-05-28 14:06:01 by simonmar] X-Git-Tag: nhc98-1-18-release~999 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=6b3944f81ee4f2eef404ac235a3589171c9debbb;p=haskell-directory.git [project @ 2002-05-28 14:06:01 by simonmar] Add (minimal) documentation --- diff --git a/Data/Set.hs b/Data/Set.hs index b724d01..3e46e2c 100644 --- a/Data/Set.hs +++ b/Data/Set.hs @@ -8,18 +8,26 @@ -- Stability : provisional -- Portability : portable -- --- This implementation of sets sits squarely upon Data.FiniteMap. +-- An implementation of sets, based on the "Data.FiniteMap". -- ----------------------------------------------------------------------------- module Data.Set ( + -- * The @Set@ type Set, -- abstract, instance of: Eq + -- * Construction emptySet, -- :: Set a mkSet, -- :: Ord a => [a] -> Set a setToList, -- :: Set a -> [a] unitSet, -- :: a -> Set a + -- * Inspection + elementOf, -- :: Ord a => a -> Set a -> Bool + isEmptySet, -- :: Set a -> Bool + cardinality, -- :: Set a -> Int + + -- * Operations union, -- :: Ord a => Set a -> Set a -> Set a unionManySets, -- :: Ord a => [Set a] -> Set a minusSet, -- :: Ord a => Set a -> Set a -> Set a @@ -27,11 +35,6 @@ module Data.Set ( intersect, -- :: Ord a => Set a -> Set a -> Set a addToSet, -- :: Ord a => Set a -> a -> Set a delFromSet, -- :: Ord a => Set a -> a -> Set a - - elementOf, -- :: Ord a => a -> Set a -> Bool - isEmptySet, -- :: Set a -> Bool - - cardinality -- :: Set a -> Int ) where import Prelude