| Safe Haskell | None |
|---|
DDC.Core.Transform.Beta
Description
Beta-reduce applications of a explicit lambda abstractions to variables and values.
- data Config = Config {
- configBindRedexes :: Bool
- configZero :: Config
- data Info = Info {
- infoTypes :: Int
- infoWits :: Int
- infoValues :: Int
- infoValuesLetted :: Int
- infoValuesSkipped :: Int
- betaReduce :: forall c a n. (Ord n, TransformUpMX (Writer Info) c) => Profile n -> Config -> c a n -> TransformResult (c a n)
Documentation
Constructors
| Config | |
Fields
| |
Instances
| Show Config |
Empty beta configuration with all flags set to False.
A summary of what the beta reduction transform did.
Constructors
| Info | |
Fields
| |
Arguments
| :: forall c a n . (Ord n, TransformUpMX (Writer Info) c) | |
| => Profile n | Language profile. |
| -> Config | Beta transform config. |
| -> c a n | Thing to transform. |
| -> TransformResult (c a n) |
Beta-reduce applications of a explicit lambda abstractions to variables and values.
If the flag is set then if we find a lambda abstraction that is applied to a redex then let-bind the redex and substitute the new variable instead.