module GHC.Driver.Config.Core.Opt.LiberateCase
  ( initLiberateCaseOpts
  ) where

import GHC.Driver.Session

import GHC.Core.Opt.LiberateCase ( LibCaseOpts(..) )

-- | Initialize configuration for the liberate case Core optomization
-- pass.
initLiberateCaseOpts :: DynFlags -> LibCaseOpts
initLiberateCaseOpts :: DynFlags -> LibCaseOpts
initLiberateCaseOpts DynFlags
dflags = LibCaseOpts
  { lco_threshold :: Maybe Int
lco_threshold = DynFlags -> Maybe Int
liberateCaseThreshold DynFlags
dflags
  , lco_unfolding_opts :: UnfoldingOpts
lco_unfolding_opts = DynFlags -> UnfoldingOpts
unfoldingOpts DynFlags
dflags
  }