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

Copyright(c) Niklas Broberg 2004-2012
LicenseBSD-style (see the file LICENSE.txt)
MaintainerNiklas Broberg, niklas.broberg@gmail.com
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell98

Language.Haskell.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

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.