[project @ 1997-11-24 21:06:11 by sof]
authorsof <unknown>
Mon, 24 Nov 1997 21:06:11 +0000 (21:06 +0000)
committersof <unknown>
Mon, 24 Nov 1997 21:06:11 +0000 (21:06 +0000)
Have conflictFM return Maybe type rather than list

ghc/compiler/rename/RnEnv.lhs

index 5403354..577b795 100644 (file)
@@ -529,11 +529,11 @@ conflictsFM bad fm1 fm2
 conflictFM :: Ord a 
           => (b->b->Bool)
           -> FiniteMap a b -> a -> b
-          -> [(a,(b,b))]
+          -> Maybe (a,(b,b))
 conflictFM bad fm key elt
   = case lookupFM fm key of
-       Just elt' | bad elt elt' -> [(key,(elt,elt'))]
-       other                    -> []
+       Just elt' | bad elt elt' -> Just (key,(elt,elt'))
+       other                    -> Nothing
 \end{code}