Updated for use with Agda 2.4.2.