MetaCart Sign in to MyCiteSeerX

Include Citations | Advanced Search | Help

Disambiguated Search | Include Citations | Advanced Search | Help

Active Patterns (1996) [10 citations — 4 self]

by Martin Erwig
In 8th Int. Workshop on Implementation of Functional Languages, LNCS 1268
Add To MetaCart

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 representation in function definitions. We define the semantics of active patterns and describe their implementation. 1 Introduction Pattern matching is a well-appreciated concept of (functional) programming. It contributes to concise function definitions by implicitly decomposing data type values. In many cases, a large part of a function's definition is only needed to prepare for recursive application and to finally lead to a base case for which the definition itself is rather simple. Such function definitions could be simplified considerably if these preparatory computations could be factorized and given in a separate place. Recognizing t...

Citations

1415 The Definition of Standard ML – Milner, Tofte, et al. - 1990
341 Deforestation: transforming programs to eliminate trees – Wadler - 1990
156 A non-strict functional language with polymorphic types – Miranda
104 Views: A way for pattern matching to cohabit with data abstraction – WADLER - 1987
61 Safe Fusion of Functional Expressions – Chin - 1992
26 Functional Programming with Graphs – Erwig - 1997
25 Pattern Matching with Abstract Data Types – Burton, Cameron - 1993
14 Abstract value constructors – Aitken, Reppy - 1992
14 An efficient functional implementation of FIFO queues – BURTON - 1982
13 A New Look at Pattern Matching in Abstract Data Types – Gostanza, Pena, et al. - 1996
9 Context Patterns in Haskell – Mohnen - 1996
4 Lawful Functions and Program Verification – Thompson - 1990