runRewriteSession :: (Functor m, Monad m)
                  => DebugLevel
                  -> RewriteState
                  -> RewriteSession m a
                  -> m a
runRewriteSession lvl st
  = Unbound.runFreshMT
  . fmap (\(a,s) -> traceIf True ("Applied " ++ show (s ^. transformCounter) ++ " transformations") a)
  . (`State.runStateT` st)
  . (`Reader.runReaderT` RE lvl)
runRewriteSession :: (Functor m, Monad m)
                  => DebugLevel
                  -> RewriteState
                  -> RewriteSession m a
                  -> m a
runRewriteSession lvl st
  = Unbound.runFreshMT
  . fmap (\(a,s) -> traceIf True ("Applied " ++ show (s ^. transformCounter) ++ " transformations") a)
  . (`State.runStateT` st)
  . (`Reader.runReaderT` RE lvl)
runRewriteSession lvl st
  = Unbound.runFreshMT
  . fmap (\(a,s) -> traceIf True ("Applied " ++ show (s ^. transformCounter) ++ " transformations") a)
  . (`State.runStateT` st)
  . (`Reader.runReaderT` RE lvl)