reconfigure :: (Proxy p) => Producer (StateP Options (ReaderP Settings p)) ClientDirective GHC.Ghc ()
reconfigure = do
  let status = respond . ClientLog "Reconfigure"
  status "Updating GHC options"
  opts <- use ghcOpts
  settings <- liftP ask
  status $ "New options: " ++ unwords (settings ^. extraOptions ++ opts)
  configOk <- newSession (settings ^. refErrors) (settings ^. extraOptions ++ opts)
  status "Processing configure result"
  needReconfig .= not configOk
reconfigure :: (Proxy p) => Producer (StateP Options (ReaderP Settings p)) ClientDirective GHC.Ghc ()
reconfigure = do
  let status = respond . ClientLog "Reconfigure"
  status "Updating GHC options"
  opts <- use ghcOpts
  settings <- liftP ask
  status $ "New options: " ++ unwords (settings ^. extraOptions ++ opts)
  configOk <- newSession (settings ^. refErrors) (settings ^. extraOptions ++ opts)
  status "Processing configure result"
  needReconfig .= not configOk
reconfigure = do
  let status = respond . ClientLog "Reconfigure"
  status "Updating GHC options"
  opts <- use ghcOpts
  settings <- liftP ask
  status $ "New options: " ++ unwords (settings ^. extraOptions ++ opts)
  configOk <- newSession (settings ^. refErrors) (settings ^. extraOptions ++ opts)
  status "Processing configure result"
  needReconfig .= not configOk