Text this: Internal program extraction in the calculus of inductive constructions