From: sof Date: Mon, 24 Nov 1997 21:06:11 +0000 (+0000) Subject: [project @ 1997-11-24 21:06:11 by sof] X-Git-Tag: Approx_2487_patches~1259 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=752fd59c1803419f4919365504065d3688b0d1ab;p=ghc-hetmet.git [project @ 1997-11-24 21:06:11 by sof] Have conflictFM return Maybe type rather than list --- diff --git a/ghc/compiler/rename/RnEnv.lhs b/ghc/compiler/rename/RnEnv.lhs index 5403354..577b795 100644 --- a/ghc/compiler/rename/RnEnv.lhs +++ b/ghc/compiler/rename/RnEnv.lhs @@ -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}