Implementing Context Patterns in the Glasgow Haskell Compiler Markus Mohnen, Stefan Tobies Context patterns are a new non--local form of patterns, which allow the matching of subterms without fixed distance from the root of the whole term. Typical applications of context patterns are functions which search a data structure and possibly transform 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.