Strafunski-StrategyLib-5.0.0.3: Library for strategic programming

Portabilityportable
Stabilityexperimental
MaintainerRalf Laemmel, Joost Visser
Safe HaskellNone

Data.Generics.Strafunski.StrategyLib.NameTheme

Contents

Description

This module is part of StrategyLib, a library of functional strategy combinators, including combinators for generic traversal. This module provides algorithms to collect names and their types.

Synopsis

Free name analysis

freeNamesSource

Arguments

:: (Eq name, Term t) 
=> TU [(name, tpe)] Identity

Identify declarations

-> TU [name] Identity

Identify references

-> t

Input term

-> [name]

Free names

Generic free name analysis algorithm (without types)

freeTypedNamesSource

Arguments

:: (Eq name, Term t) 
=> TU [(name, tpe)] Identity

Identify declarations

-> TU [name] Identity

Identify references

-> [(name, tpe)]

Derived declarations

-> t

Input term

-> [(name, tpe)]

Free names with types

Generic free name analysis algorithm with types

Bound name analysis

boundTypedNames :: (Term f, Term t, Eq name) => TU [(name, tpe)] Identity -> (f -> Maybe f) -> t -> Maybe ([(name, tpe)], f)Source

Accumulate declarations for focus