An Exploration of Modular Programs

Jan Nicklisch, Simon Peyton Jones

The Glasgow Workshop on Functional Programming, 1996 |

Recently, Mark Jones introduced first class structures as a means to express modular structure. In this paper we elaborate on this idea by comparing the module systems of Standard ML and Haskell 1.3, widely used functional languages, and a Haskell variant equipped with such first class structures. Moreover, we look at another obvious and well-known extension to Hindley-Milner type systems, namely higher order type variables, to explore its usefulness in solving problems occuring when one attempts to structure larger programs into maintainable pieces. We argue that there are surprisingly few applications where the module system currently provided by Haskell cannot keep pace iwth Standard ML’s expressiveness. when one adds first class structures to Haskell, the module system reaches the expressiveness of Standard ML and even exceeds it.