Describir: Logical Foundations of Functional Programming