processError :: (Proxy p) => ErrorInfo -> Producer (StateP Options (ReaderP Settings p)) ClientDirective GHC.Ghc ()
processError err = liftP $ hoist GHC.liftIO $ do
  warningsEnabled <- readRef refWarningsEnabled
  fname <- readRef refFileName
  fpath <- readRef refFilePath
  msg <- lift $ GHC.liftIO $ fmap renderError $ adjustFileName fname fpath err
  when (warningsEnabled || not (isWarning $ err ^. severity)) $
    respond $ ClientStdout msg
processError :: (Proxy p) => ErrorInfo -> Producer (StateP Options (ReaderP Settings p)) ClientDirective GHC.Ghc ()
processError err = liftP $ hoist GHC.liftIO $ do
  warningsEnabled <- readRef refWarningsEnabled
  fname <- readRef refFileName
  fpath <- readRef refFilePath
  msg <- lift $ GHC.liftIO $ fmap renderError $ adjustFileName fname fpath err
  when (warningsEnabled || not (isWarning $ err ^. severity)) $
    respond $ ClientStdout msg
processError err = liftP $ hoist GHC.liftIO $ do
  warningsEnabled <- readRef refWarningsEnabled
  fname <- readRef refFileName
  fpath <- readRef refFilePath
  msg <- lift $ GHC.liftIO $ fmap renderError $ adjustFileName fname fpath err
  when (warningsEnabled || not (isWarning $ err ^. severity)) $
    respond $ ClientStdout msg