I visited the 15th ICFP and associated events in Baltimore. This is a summary of some notes I took there.
Nils Anders Danielsson presented a paper in which he implemented parser combinators in Agda together with correctness and termination proofs. An important trick is to use a phantom type as parameter to the parser type which describes whether a parser accepts the empty word.
I wonder how cumbersome it would be to use a similar trick for our regexp matcher. In the paper we describe informally how to build infinite regular expressions such that matching still terminates and it should be possible to express this in the type system too.