insertConst :: (Gate g, Monad m) => Ref -> ConstId -> BuilderT g m ()
insertConst !ref !id = do
    bs_circ . circ_consts . at (getConstId id) ?= ref
    insertGate ref (gateBase (Const id))
insertConst :: (Gate g, Monad m) => Ref -> ConstId -> BuilderT g m ()
insertConst !ref !id = do
    bs_circ . circ_consts . at (getConstId id) ?= ref
    insertGate ref (gateBase (Const id))
insertConst !ref !id = do
    bs_circ . circ_consts . at (getConstId id) ?= ref
    insertGate ref (gateBase (Const id))