never executed always true always false
    1 module GHC.Driver.Config.Diagnostic
    2   ( initDiagOpts
    3   )
    4 where
    5 
    6 import GHC.Driver.Flags
    7 import GHC.Driver.Session
    8 
    9 import GHC.Utils.Outputable
   10 import GHC.Utils.Error (DiagOpts (..))
   11 
   12 initDiagOpts :: DynFlags -> DiagOpts
   13 initDiagOpts dflags = DiagOpts
   14   { diag_warning_flags       = warningFlags dflags
   15   , diag_fatal_warning_flags = fatalWarningFlags dflags
   16   , diag_warn_is_error       = gopt Opt_WarnIsError dflags
   17   , diag_reverse_errors      = reverseErrors dflags
   18   , diag_max_errors          = maxErrors dflags
   19   , diag_ppr_ctx             = initSDocContext dflags defaultErrStyle
   20   }
   21