withWarnings :: (Proxy p) => Bool -> GHC.Ghc a -> Producer (StateP Options (ReaderP Settings p)) ClientDirective GHC.Ghc a
withWarnings v action = do
  beforeValue <- liftP $ readRef refWarningsEnabled
  ref <- liftP $ view refWarningsEnabled
  liftP $ writeRef refWarningsEnabled v
  lift (action `GHC.gfinally` GHC.liftIO (writeIORef ref beforeValue))
withWarnings :: (Proxy p) => Bool -> GHC.Ghc a -> Producer (StateP Options (ReaderP Settings p)) ClientDirective GHC.Ghc a
withWarnings v action = do
  beforeValue <- liftP $ readRef refWarningsEnabled
  ref <- liftP $ view refWarningsEnabled
  liftP $ writeRef refWarningsEnabled v
  lift (action `GHC.gfinally` GHC.liftIO (writeIORef ref beforeValue))
withWarnings v action = do
  beforeValue <- liftP $ readRef refWarningsEnabled
  ref <- liftP $ view refWarningsEnabled
  liftP $ writeRef refWarningsEnabled v
  lift (action `GHC.gfinally` GHC.liftIO (writeIORef ref beforeValue))