never executed always true always false
    1 module GHC.Driver.Config.Logger
    2   ( initLogFlags
    3   )
    4 where
    5 
    6 import GHC.Prelude
    7 
    8 import GHC.Driver.Session
    9 
   10 import GHC.Utils.Logger (LogFlags (..))
   11 import GHC.Utils.Outputable
   12 
   13 -- | Initialize LogFlags from DynFlags
   14 initLogFlags :: DynFlags -> LogFlags
   15 initLogFlags dflags = LogFlags
   16   { log_default_user_context = initSDocContext dflags defaultUserStyle
   17   , log_default_dump_context = initSDocContext dflags defaultDumpStyle
   18   , log_dump_flags           = dumpFlags dflags
   19   , log_show_caret           = gopt Opt_DiagnosticsShowCaret dflags
   20   , log_show_warn_groups     = gopt Opt_ShowWarnGroups dflags
   21   , log_enable_timestamps    = not (gopt Opt_SuppressTimestamps dflags)
   22   , log_dump_to_file         = gopt Opt_DumpToFile dflags
   23   , log_dump_dir             = dumpDir dflags
   24   , log_dump_prefix          = dumpPrefix dflags
   25   , log_dump_prefix_override = dumpPrefixForce dflags
   26   , log_enable_debug         = not (hasNoDebugOutput dflags)
   27   , log_verbosity            = verbosity dflags
   28   }
   29