Skip to content
  • Sebastian Graf's avatar
    GHC.Core.Unify: Make UM actions one-shot by default · a3d69dc6
    Sebastian Graf authored and Ben Gamari's avatar Ben Gamari committed
    This MR makes the UM monad in GHC.Core.Unify into a one-shot
    monad.  See the long Note [The one-shot state monad trick].
    
    See also #18202 and !3309, which applies this to all Reader/State-like
    monads in GHC for compile-time perf improvements. The pattern used
    here enables something similar to the state-hack, but is applicable to
    user-defined monads, not just `IO`.
    
    Metric Decrease 'runtime/bytes allocated' (test_env='i386-linux-deb9'):
        haddock.Cabal
    a3d69dc6