--- Utils ---

recQProgOpt :: (QProg -> QProg) -> (QItem -> QItem)
recQProgOpt opt = rec_opt
  where rec_opt (QQuote p b) = QQuote p $ opt $ fmap rec_opt b
        rec_opt x = x
recQProgOpt :: (QProg -> QProg) -> (QItem -> QItem)
recQProgOpt opt = rec_opt
  where rec_opt (QQuote p b) = QQuote p $ opt $ fmap rec_opt b
        rec_opt x = x
recQProgOpt opt = rec_opt
  where rec_opt (QQuote p b) = QQuote p $ opt $ fmap rec_opt b
        rec_opt x = x