ddc-core-simpl-0.4.3.1: Disciplined Disciple Compiler code transformations.

Safe HaskellNone
LanguageHaskell98

DDC.Core.Transform.Forward

Description

Float let-bindings with a single use forward into their use-sites.

Synopsis

Documentation

data ForwardInfo Source #

Summary of number of bindings floated.

Constructors

ForwardInfo 

Fields

data FloatControl Source #

Fine control over what should be floated.

Constructors

FloatAllow

Allow binding to be floated, but don't require it.

FloatDeny

Prevent a binding being floated, at all times.

FloatForce

Force a binding to be floated, at all times.

FloatForceUsedOnce

Force a binding to be floated if it's only used once.

data Config a n Source #

forwardModule Source #

Arguments

:: Ord n 
=> Profile n

Language profile

-> Config a n 
-> Module a n 
-> TransformResult (Module a n) 

Float let-bindings in a module with a single use forward into their use sites.

forwardX Source #

Arguments

:: Ord n 
=> Profile n

Language profile.

-> Config a n 
-> Exp a n 
-> TransformResult (Exp a n) 

Float let-bindings in an expression with a single use forward into their use-sites.