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

Safe HaskellSafe-Inferred



Bubble casts outwards. We float casts up and outwards so they are just inside the inner-most enclosing let. This way the functions still have the same effect and closure, but the casts don't get in the way of subsequent transforms.



bubbleModule :: Ord n => Module a n -> Module a nSource

Bubble casts outwards in a Module.

bubbleX :: Ord n => KindEnv n -> TypeEnv n -> Exp a n -> Exp a nSource

Bubble casts outwards in an Exp.