newSession :: (Proxy p) => IORef (S.Seq ErrorInfo) -> [String] -> Producer p ClientDirective GHC.Ghc Bool
newSession errorIn opts = handleGHCException $ do
  initialDynFlags <- GHC.getSessionDynFlags
  let updatedDynFlags = GHC.dopt_unset ?? GHC.Opt_WarnIsError $ initialDynFlags
       { GHC.log_action = logAction' errorIn
       , GHC.ghcLink = GHC.NoLink
       , GHC.hscTarget = GHC.HscInterpreted
       }
  (finalDynFlags, _, _) <- GHC.parseDynamicFlags updatedDynFlags (map GHC.noLoc $ ["-Wall", "-O0"] ++ opts)
  void $ GHC.setSessionDynFlags finalDynFlags
newSession :: (Proxy p) => IORef (S.Seq ErrorInfo) -> [String] -> Producer p ClientDirective GHC.Ghc Bool
newSession errorIn opts = handleGHCException $ do
  initialDynFlags <- GHC.getSessionDynFlags
  let updatedDynFlags = GHC.dopt_unset ?? GHC.Opt_WarnIsError $ initialDynFlags
       { GHC.log_action = logAction' errorIn
       , GHC.ghcLink = GHC.NoLink
       , GHC.hscTarget = GHC.HscInterpreted
       }
  (finalDynFlags, _, _) <- GHC.parseDynamicFlags updatedDynFlags (map GHC.noLoc $ ["-Wall", "-O0"] ++ opts)
  void $ GHC.setSessionDynFlags finalDynFlags
newSession errorIn opts = handleGHCException $ do
  initialDynFlags <- GHC.getSessionDynFlags
  let updatedDynFlags = GHC.dopt_unset ?? GHC.Opt_WarnIsError $ initialDynFlags
       { GHC.log_action = logAction' errorIn
       , GHC.ghcLink = GHC.NoLink
       , GHC.hscTarget = GHC.HscInterpreted
       }
  (finalDynFlags, _, _) <- GHC.parseDynamicFlags updatedDynFlags (map GHC.noLoc $ ["-Wall", "-O0"] ++ opts)
  void $ GHC.setSessionDynFlags finalDynFlags