getTag :: CmdName -> CompM CmdTag
getTag cn = do
  (CState i mi) <- get
  case M.lookup cn mi of
    Just ct -> return (CmdTag ct cn)
    Nothing -> do 
        put (CState (succ i) (M.insert cn i mi))
        return (CmdTag i cn)
getTag :: CmdName -> CompM CmdTag
getTag cn = do
  (CState i mi) <- get
  case M.lookup cn mi of
    Just ct -> return (CmdTag ct cn)
    Nothing -> do 
        put (CState (succ i) (M.insert cn i mi))
        return (CmdTag i cn)
getTag cn = do
  (CState i mi) <- get
  case M.lookup cn mi of
    Just ct -> return (CmdTag ct cn)
    Nothing -> do 
        put (CState (succ i) (M.insert cn i mi))
        return (CmdTag i cn)