withStack :: ([VerifType] -> [VerifType]) -> Instr
withStack f = modifyStack (\s -> let stack'     = f (stackVal s)
                                     stackSize' = length stack'
                                 in s { stackVal  = stack'
                                      , stackMax  = max (stackMax s) stackSize'
                                      , stackSize = stackSize' })
withStack :: ([VerifType] -> [VerifType]) -> Instr
withStack f = modifyStack (\s -> let stack'     = f (stackVal s)
                                     stackSize' = length stack'
                                 in s { stackVal  = stack'
                                      , stackMax  = max (stackMax s) stackSize'
                                      , stackSize = stackSize' })
withStack f = modifyStack (\s -> let stack'     = f (stackVal s)
                                     stackSize' = length stack'
                                 in s { stackVal  = stack'
                                      , stackMax  = max (stackMax s) stackSize'
                                      , stackSize = stackSize' })