| Markus Mohnen | Disclaimer | Last modified: 2002-12-16 14:19 UTC |
|
MOVES: Software Modeling and Verification (Informatik 2) |
| Computer Science / RWTH / I2 / Staff / Current / Mohnen / PUBLICATIONS / Cp ifl96 | |
|
|
Abstract: Context Patterns in HaskellIn modern functional languages, pattern matching is used to define functions or expressions by performing an analysis of the structure of values. We extend Haskell with a more general form of patterns called context patterns, which allow the matching of subterms without fixed distance from the root of the whole term. The semantics of context patterns is defined by transforming them to standard Haskell programs.Typical applications of context patterns are functions which search a data structure and possibly transform it. This concept can easily be adopted for other languages using pattern matching like ML or Clean. |