[deduplicate Data.MySet
Helmut Grohne <grohne@cs.uni-bonn.de>**20140211094700
 Ignore-this: d4f6e2e18181031e7129cef42f1a173e
] hunk ./src/Igor2/Data/Rules.hs 31
+import Data.MySet (deleteM, insertM, replaceM)
hunk ./src/Igor2/Data/Rules.hs 350
-ruleAtIndex  i rs = (S.toAscList rs) !! i
-
-deleteM :: (Ord a) => a -> Maybe (Set a) -> Maybe (Set a)
-deleteM r rs = 
-    liftM (S.delete r) rs >>=  \rs' -> 
-        if S.null rs' then return rs' else Nothing
-
-insertM :: (Ord a) => a -> Maybe (Set a) -> Maybe (Set a)
-insertM  r rs   = 
-    case rs of
-        (Just rs') -> return $ S.insert r rs'
-        Nothing    -> return $ S.insert r S.empty
-
-replaceM r1 r2 = (insertM r2).(deleteM r1)
+ruleAtIndex  i rs = S.toAscList rs !! i