hsx-0.10.4: HSX (Haskell Source with XML) allows literal XML syntax in Haskell source code.

Portability | portable
Stability | experimental
Maintainer | Niklas Broberg, niklas.broberg@chalmers.se
Safe Haskell | None

HSX.Transform

Description

Functions for transforming abstract Haskell code extended with regular patterns into semantically equivalent normal abstract Haskell code. In other words, we transform away regular patterns.

Synopsis

- transform :: Module -> Module
- transformExp :: Exp -> Exp

# Documentation

transform :: Module -> Module Source

Transform away occurences of regular patterns from an abstract Haskell module, preserving semantics.

transformExp :: Exp -> Exp Source

Transform expressions by traversing subterms. Of special interest are expressions that contain patterns as subterms, i.e. `let`, `case` and lambda expressions, and also list comprehensions and `do`-expressions. All other expressions simply transform their sub-expressions, if any. Of special interest are of course also any xml expressions.