| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Language.REST.RuntimeTerm
Synopsis
- data RuntimeTerm = App Op [RuntimeTerm]
- class ToRuntimeTerm a where
- toRuntimeTerm :: a -> RuntimeTerm
- subTerms :: RuntimeTerm -> [(RuntimeTerm, RuntimeTerm -> RuntimeTerm)]
- contains :: RuntimeTerm -> RuntimeTerm -> Bool
Documentation
data RuntimeTerm Source #
Ground terms
Constructors
| App Op [RuntimeTerm] |
Instances
class ToRuntimeTerm a where Source #
Transformable to a ground term
Methods
toRuntimeTerm :: a -> RuntimeTerm Source #
Instances
| ToRuntimeTerm Op Source # | |
Defined in Language.REST.RuntimeTerm Methods toRuntimeTerm :: Op -> RuntimeTerm Source # | |
| ToRuntimeTerm RuntimeTerm Source # | |
Defined in Language.REST.RuntimeTerm Methods | |
subTerms :: RuntimeTerm -> [(RuntimeTerm, RuntimeTerm -> RuntimeTerm)] Source #
subTerms t returns a list of pairs (s, f), where s is a subterm of t,
and f is a function that takes a replacement s' for s, and generates a new
term where s is replaced with s' in t. Also includes the pair (t, id),
representing the term itself.
TODO: Consider more efficient implementations
contains :: RuntimeTerm -> RuntimeTerm -> Bool Source #
t iff contains ut == u or u is a subterm of t