Skip to content
Snippets Groups Projects
Commit 752fd59c authored by sof's avatar sof
Browse files

[project @ 1997-11-24 21:06:11 by sof]

Have conflictFM return Maybe type rather than list
parent 01630909
No related merge requests found
......@@ -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}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment