|
ABSTRACT
We extend Haskell with regular expression patterns. Regular expression patterns provide means for matching and extracting data which goes well beyond ordinary pattern matching as found in Haskell. It has proven useful for string manipulation and for processing structured data such as XML. Regular expression patterns can be used with arbitrary lists, and work seamlessly together with ordinary pattern matching in Haskell. Our extension is lightweight, it is little more than syntactic sugar. We present a semantics and a type system, and show how to implement it as a preprocessor to Haskell.
REFERENCES
Note: OCR errors may be found in this Reference List extracted from the full text article. ACM has opted to expose the complete List rather than only correct and linked references.
| |
1
|
|
 |
2
|
|
| |
3
|
Martin Erwig and Simon Peyton Jones. Pattern Guards and Transformational Patterns. In Haskell Workshop, 2000.
|
| |
4
|
|
| |
5
|
A. Frisch. Regular Tree Language Recognition with Static Information. In 3rd IFIP International Conference on Theoretical Computer Science, 2004.
|
| |
6
|
Haruo Hosoya and Makoto Murata. Boolean Operations and Inclusion Test for Attribute-Element Constraints. In Eighth International Conference on Implementation and Application of Automata, volume 2759 of Lecture Notes in Computer Science, pages 201--212. Springer-Verlag, 2003.
|
 |
7
|
|
 |
8
|
|
 |
9
|
|
| |
10
|
Kenny Zhuo Ming Lu and Martin Sulzmann. XHaskell: Regular Expression Types for Haskell. http://www.comp.nus.edu.sg/ sulzmann/, 2004.
|
 |
11
|
|
| |
12
|
Luc Maranget. Two Techniques for Compiling Lazy Pattern Matching. Research report 2385, INRIA, 1994.
|
| |
13
|
Erik Meijer and Mark Shields. XM : A Functional Language for Constructing and Manipulating XML Documents. (Draft), 1999.
|
| |
14
|
Erik Meijer and Danny van Velzen. Haskell Server Pages. In Graham Hutton, editor, Electronic Notes in Theoretical Computer Science, volume 41. Elsevier, 2001.
|
| |
15
|
www.perl.org.
|
| |
16
|
Martin Odersky et.al. The Scala Programming Language. http://scala.epfl.ch/.
|
| |
17
|
Philip Wadler. The Implementation of Functional Programming Languages, chapter Efficient Compilation of Pattern Matching. Prentice Hall, 1987.
|
|