Active Patterns Martin Erwig FernUniversitšat Hagen, Praktische Informatik IV 58084 Hagen, Germany erwig@fernuni-hagen.de Abstract. Active patterns apply preprocessing functions to data type values before they are matched. This is of use for unfree data types where more than one representation exists for an abstract value: in many cases there is a specific representation for which function definitions become very simple, and active patterns just allow to assume this specific rep- resentation in function definitions. We define the semantics of active patterns and describe their implementation.