Adapting Proofs-as-Programs