ghc optimization of incremental update