Commit eb86321b authored by Ian Lynagh's avatar Ian Lynagh

Fix warnings in utils/UniqSet

parent 38ac36a3
...@@ -9,29 +9,21 @@ Based on @UniqFMs@ (as you would expect). ...@@ -9,29 +9,21 @@ Based on @UniqFMs@ (as you would expect).
Basically, the things need to be in class @Uniquable@. Basically, the things need to be in class @Uniquable@.
\begin{code} \begin{code}
{-# OPTIONS -w #-}
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings
-- for details
module UniqSet ( module UniqSet (
UniqSet, -- abstract type: NOT UniqSet, -- abstract type: NOT
mkUniqSet, uniqSetToList, emptyUniqSet, unitUniqSet, mkUniqSet, uniqSetToList, emptyUniqSet, unitUniqSet,
addOneToUniqSet, addListToUniqSet, delOneFromUniqSet, delListFromUniqSet, addOneToUniqSet, addListToUniqSet,
delOneFromUniqSet, delListFromUniqSet,
unionUniqSets, unionManyUniqSets, minusUniqSet, unionUniqSets, unionManyUniqSets, minusUniqSet,
elementOfUniqSet, mapUniqSet, intersectUniqSets, elementOfUniqSet, mapUniqSet, intersectUniqSets,
isEmptyUniqSet, filterUniqSet, sizeUniqSet, foldUniqSet, isEmptyUniqSet, filterUniqSet, sizeUniqSet, foldUniqSet,
elemUniqSet_Directly, lookupUniqSet, hashUniqSet elemUniqSet_Directly, lookupUniqSet, hashUniqSet
) where ) where
#include "HsVersions.h" import Maybes
import Maybes ( maybeToBool )
import UniqFM import UniqFM
import Unique ( Unique, Uniquable(..) ) import Unique
#if ! OMIT_NATIVE_CODEGEN #if ! OMIT_NATIVE_CODEGEN
#define IF_NCG(a) a #define IF_NCG(a) a
...@@ -86,7 +78,7 @@ unionUniqSets :: UniqSet a -> UniqSet a -> UniqSet a ...@@ -86,7 +78,7 @@ unionUniqSets :: UniqSet a -> UniqSet a -> UniqSet a
unionUniqSets (MkUniqSet set1) (MkUniqSet set2) = MkUniqSet (plusUFM set1 set2) unionUniqSets (MkUniqSet set1) (MkUniqSet set2) = MkUniqSet (plusUFM set1 set2)
unionManyUniqSets :: [UniqSet a] -> UniqSet a unionManyUniqSets :: [UniqSet a] -> UniqSet a
-- = foldr unionUniqSets emptyUniqSet ss -- = foldr unionUniqSets emptyUniqSet ss
unionManyUniqSets [] = emptyUniqSet unionManyUniqSets [] = emptyUniqSet
unionManyUniqSets [s] = s unionManyUniqSets [s] = s
unionManyUniqSets (s:ss) = s `unionUniqSets` unionManyUniqSets ss unionManyUniqSets (s:ss) = s `unionUniqSets` unionManyUniqSets ss
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment