-- |Looks up the id in the list, and returns the replacement if it exists
-- |or the original if it doesnt 
getid' :: Idx -> StateT [(Idx, Idx)] (State IdxSet) Idx
getid' v = do
  mp <- get
  case lookup v mp of
    Just v' -> return v'
    Nothing -> return v

-- |Looks up the id in the list, and returns the replacement if it exists
-- |or the original if it doesnt 
getid' :: Idx -> StateT [(Idx, Idx)] (State IdxSet) Idx
getid' v = do
  mp <- get
  case lookup v mp of
    Just v' -> return v'
    Nothing -> return v

-- |Looks up the id in the list, and returns the replacement if it exists
-- |or the original if it doesnt 
getid' v = do
  mp <- get
  case lookup v mp of
    Just v' -> return v'
    Nothing -> return v

-- |Looks up the id in the list, and returns the replacement if it exists
-- |or the original if it doesnt 