Optimisation fuel is used to control the amount of work the optimiser does.
Every optimisation step consumes a certain amount of fuel and stops when it runs out of fuel. This can be used e.g. to debug optimiser bugs: Run the optimiser with varying amount of fuel to find out the exact number of steps where a bug is introduced in the output.
Documentation
maybeRewriteWithFuel :: OptimizationFuel -> Maybe a -> Maybe aSource
data OptFuelState Source
type FuelConsumer a = OptimizationFuel -> (a, OptimizationFuel)Source
class Monad m => FuelUsingMonad m whereSource
fuelRemaining :: m OptimizationFuelSource
fuelDecrement :: String -> OptimizationFuel -> OptimizationFuel -> m ()Source
fuelExhausted :: m BoolSource
lastFuelPass :: m StringSource
FuelUsingMonad FuelMonad | |
FuelUsingMonad (DFM' FuelMonad f) |
runFuelIO :: OptFuelState -> FuelMonad a -> IO aSource
fuelConsumingPass :: String -> FuelConsumer a -> FuelMonad aSource
Monad FuelMonad | |
MonadUnique FuelMonad | |
FuelUsingMonad FuelMonad | |
MonadUnique (DFM' FuelMonad f) | |
FuelUsingMonad (DFM' FuelMonad f) |
lGraphOfGraph :: Graph m l -> FuelMonad (LGraph m l)Source