mirror of
https://github.com/gren-lang/compiler.git
synced 2024-09-11 08:45:42 +03:00
Unbox types safely in --optimize mode
Fix https://github.com/elm/compiler/issues/1836
This commit is contained in:
parent
1cfe830903
commit
a798228fd9
@ -209,7 +209,7 @@ addGlobalHelp mode graph global state =
|
||||
)
|
||||
|
||||
Opt.Box ->
|
||||
addStmt state (
|
||||
addStmt (addGlobal mode graph state identity) (
|
||||
generateBox mode global
|
||||
)
|
||||
|
||||
@ -400,6 +400,12 @@ generateBox mode global@(Opt.Global home name) =
|
||||
JS.Var [ (JsName.fromGlobal home name, Just definition) ]
|
||||
|
||||
|
||||
{-# NOINLINE identity #-}
|
||||
identity :: Opt.Global
|
||||
identity =
|
||||
Opt.Global ModuleName.basics Name.identity
|
||||
|
||||
|
||||
|
||||
-- GENERATE PORTS
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user