setCurrentRule :: Monad m => Rule a b -> InstanceBuilder a b m ()
setCurrentRule r = do rs <- getRules
                      i <- getCurrentRuleId
                      let rs' = filter ((/= i) . fst) rs
                      putRules $ (i, r):rs'

-- | Builds the instance
setCurrentRule :: Monad m => Rule a b -> InstanceBuilder a b m ()
setCurrentRule r = do rs <- getRules
                      i <- getCurrentRuleId
                      let rs' = filter ((/= i) . fst) rs
                      putRules $ (i, r):rs'

-- | Builds the instance
setCurrentRule r = do rs <- getRules
                      i <- getCurrentRuleId
                      let rs' = filter ((/= i) . fst) rs
                      putRules $ (i, r):rs'

-- | Builds the instance