|
Language.Haskell.DeadCode | Portability | portable | Stability | experimental | Maintainer | joost.visser@di.uminho.pt |
|
|
|
|
|
Description |
This module implements dead code elimination for Haskell.
Under construction!!!
We are not yet faithfully dealing with qualified vs. unqualified names.
Same holds for module level analysis.
|
|
Synopsis |
|
|
|
|
Dead code elimination |
|
hsElimDeadCode :: (Term t, MonadPlus m) => t -> m t |
This function removes unused local declarations |
|
hsTestDecl :: MonadPlus m => [HsQName] -> HsDecl -> m Bool |
Test wether the names declared by a given declaration are among
a given list of free names. |
|
isValueDef :: HsDecl -> Bool |
Test whether a given declaration defines a value (vs a type). |
|
Application extraction |
|
hsExtrAppl :: MonadPlus m => [(ModuleName, [ModuleName], HsModule)] -> m [(ModuleName, [ModuleName], HsModule)] |
This function removes unused top declarations from
a list of modules, until it reaches a fixpoint. The first
module is assumed to be the top modules, from which no names
are supposed to be deleted. |
|
Instances |
|
Produced by Haddock version 0.6 |