X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=Data%2FSet.hs;h=3e46e2c9c0c2cbd80939f435951258e11ba1a34f;hb=5c72582ffd19df4906f800e073bea89d68bbb93b;hp=f4dad32a48e5d0b88253f917653bb9674ac1feb1;hpb=3742ec445c4a37d4897313b50ab95310ea55844e;p=ghc-base.git diff --git a/Data/Set.hs b/Data/Set.hs index f4dad32..3e46e2c 100644 --- a/Data/Set.hs +++ b/Data/Set.hs @@ -2,24 +2,32 @@ -- | -- Module : Data.Set -- Copyright : (c) The University of Glasgow 2001 --- License : BSD-style (see the file libraries/core/LICENSE) +-- License : BSD-style (see the file libraries/base/LICENSE) -- -- Maintainer : libraries@haskell.org -- 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