module GHC.Driver.Config.StgToJS
( initStgToJSConfig
)
where
import GHC.StgToJS.Types
import GHC.Driver.DynFlags
import GHC.Platform.Ways
import GHC.Utils.Outputable
import GHC.Prelude
initStgToJSConfig :: DynFlags -> StgToJSConfig
initStgToJSConfig :: DynFlags -> StgToJSConfig
initStgToJSConfig DynFlags
dflags = StgToJSConfig
{ csInlinePush :: Bool
csInlinePush = Bool
False
, csInlineBlackhole :: Bool
csInlineBlackhole = Bool
False
, csInlineLoadRegs :: Bool
csInlineLoadRegs = Bool
False
, csInlineEnter :: Bool
csInlineEnter = Bool
False
, csInlineAlloc :: Bool
csInlineAlloc = Bool
False
, csPrettyRender :: Bool
csPrettyRender = GeneralFlag -> DynFlags -> Bool
gopt GeneralFlag
Opt_DisableJsMinifier DynFlags
dflags
, csTraceRts :: Bool
csTraceRts = Bool
False
, csAssertRts :: Bool
csAssertRts = Bool
False
, csBoundsCheck :: Bool
csBoundsCheck = GeneralFlag -> DynFlags -> Bool
gopt GeneralFlag
Opt_DoBoundsChecking DynFlags
dflags
, csDebugAlloc :: Bool
csDebugAlloc = Bool
False
, csTraceForeign :: Bool
csTraceForeign = Bool
False
, csProf :: Bool
csProf = DynFlags -> Ways
ways DynFlags
dflags Ways -> Way -> Bool
`hasWay` Way
WayProf
, csRuntimeAssert :: Bool
csRuntimeAssert = Bool
False
, csContext :: SDocContext
csContext = DynFlags -> PprStyle -> SDocContext
initSDocContext DynFlags
dflags PprStyle
defaultDumpStyle
}