#### DMCA

## Implementing Context Patterns in the Glasgow Haskell Compiler (1997)

### Citations

592 | The Implementation of Functional Programming Languages - JONES, S - 1987 |

345 |
The Lambda Calculus, Its Syntax and Semantics, volume 103
- Barendregt
(Show Context)
Citation Context ...ue v if there exists a function f and values v 1 ; : : : ; v k such that pat i matches v i and f v 1 : : : v k is equal to v. Furthermore, this function f is a representation of a constructor context =-=[Bar85]-=-, i.e. a constructor term with iholesj in it. The representation consists of modelling the iholej by the function arguments, i.e. f has the following form: f = h 1 : : : : h k :C[h 1 ; : : : ; h k ] w... |

336 | Pizza into Java: Translating Theory into Practice
- Odersky, Wadler
- 1997
(Show Context)
Citation Context ...hough we have presented context patterns in the language Haskell, this concept can easily be adopted for other (functional) languages using pattern matching like ML [Mil84], Clean [BvELP87], or PIZZA =-=[OW97]. 21 Appendix: -=-Complete Translation of initlast For the initlast example initlast [] = error "Empty list" initlast (c [x]) = ((c []), x) we obtain the following translation initlast [] = error "Empty ... |

67 | Compiling Haskell by Program Transformation: A Report from the Trenches. Pages 18–44 of: Nielson, Hanne Riis (ed), of the sixth European - Jones, Simon - 1996 |

66 |
Clean - A Language for Functional Graph Rewriting.
- Brus, Eekelen, et al.
- 1987
(Show Context)
Citation Context ...e language Core. Although we have presented context patterns in the language Haskell, this concept can easily be adopted for other (functional) languages using pattern matching like ML [Mil84], Clean =-=[BvELP87], or PIZZA-=- [OW97]. 21 Appendix: Complete Translation of initlast For the initlast example initlast [] = error "Empty list" initlast (c [x]) = ((c []), x) we obtain the following translation initlast [... |

56 | Curry: A Truly Functional Logic Language
- Hanus, Kuchen, et al.
- 1995
(Show Context)
Citation Context ...rn then it would have type [t] in the right hand side of the equation. This would be very confusing. This nondeterministic approach would t better in a integrated functional logic language like Curry =-=[HKMN95]-=- or Babel [KLMNRA96], than in a purely functional one. 2.2 Additional Features Sometimes it is necessary to restrict the possible matches of a context pattern. Suppose we use the following data struct... |

39 |
The Standard ML core language
- Milner
- 1985
(Show Context)
Citation Context ...the intermediate language Core. Although we have presented context patterns in the language Haskell, this concept can easily be adopted for other (functional) languages using pattern matching like ML =-=[Mil84], Clean [B-=-vELP87], or PIZZA [OW97]. 21 Appendix: Complete Translation of initlast For the initlast example initlast [] = error "Empty list" initlast (c [x]) = ((c []), x) we obtain the following trans... |

11 |
Report on the programming Language Haskell - A non-strict, Purely Functional Language - version 1.0
- al
- 1990
(Show Context)
Citation Context ...on denitions, pattern bindings, list comprehensions, and case expressions. However, the rst four of these can be translated into case expressions, so we only consider patterns in case expressions. In =-=[HPW92]-=-, the semantics of case expressions is dened by a translation into simple case expressions: case e 0 -- K x 1 : : : xn -? e 1 ;s-? e 2swhere K is constructor (including tuple constructor) and x i are ... |

9 | Context patterns in Haskell
- Mohnen
- 1996
(Show Context)
Citation Context ...orm it, especially functions which operate on programs as data objects. In this paper we describe our approach on extending the Glasgow Haskell Compiler (ghc) with context patterns. 1 Introduction In =-=[Moh97]-=- we introduced context patterns, a new nonlocal form of patterns, which allow the matching of subterms without xed distance from the root of the whole term. The main motivation for context patterns is... |

6 | The Functional Logic Language BABEL and Its Implementation on a Graph Machine
- Kuchen, Loogen, et al.
- 1996
(Show Context)
Citation Context ...ave type [t] in the right hand side of the equation. This would be very confusing. This nondeterministic approach would t better in a integrated functional logic language like Curry [HKMN95] or Babel =-=[KLMNRA96]-=-, than in a purely functional one. 2.2 Additional Features Sometimes it is necessary to restrict the possible matches of a context pattern. Suppose we use the following data structure to represent tre... |

6 |
Avoiding repeated tests in pattern matching
- Thiemann
- 1993
(Show Context)
Citation Context ...ations like inlining (e.g. chk1) and fi reduction (e.g. application of chk1) as for instance used in ghc [PS94, Pey96] 2. more eOEcient pattern matching strategies like those in [Pey87, Chapter 7] or =-=[Thi93]-=- may be adopted 3. completely new optimisations can be performed. For instance, if the function using a context pattern is recursive, it may be unnecessary to check the complete structure again. This ... |

2 |
Compilation by transformation in the Glasgow Haskell compiler
- Peyton-Jones, Santos
- 1994
(Show Context)
Citation Context ... Patterns in the ghc 3.1 The Glasgow Haskell Compiler The Glasgow Haskell Compiler (ghc) is a highly optimising compiler for Haskell which follows the paradigm of compiling as program transformations =-=[PS94]-=-: The source program is compiled into an executable form by applying a number of semantics maintaining transformations. The major steps of this compilation process are shown in Figure 4. Haskell Sourc... |