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

DDC.Core.Transform.Bubble

Description

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.

Synopsis

# Documentation

bubbleModule :: Ord n => Module a n -> Module a n Source #

Bubble casts outwards in a Module.

bubbleX :: Ord n => KindEnv n -> TypeEnv n -> Exp a n -> Exp a n Source #

Bubble casts outwards in an Exp.