Copyright | (c) Niklas Broberg 2004-2012 |
---|---|
License | BSD-style (see the file LICENSE.txt) |
Maintainer | Niklas Broberg, niklas.broberg@gmail.com |
Stability | experimental |
Portability | portable |
Safe Haskell | None |
Language | Haskell98 |
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.
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.