HORIZON HASKELLDocslts/ghc-10.0.x04404a62026-10-19Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 04404a6 · 2026-10-19

Moduleghc-10.0.0.20260917GHC2024

GHC.StgToJS.Sinker.Sinker

Synopsis

Unfloat some top-level unexported things

GHC floats constants to the top level. This is fine in native code, but with JS they occupy some global variable name. We can unfloat some unexported things:

  • global constructors, as long as they're referenced only once by another global constructor and are not in a recursive binding group

  • literals (small literals may also be sunk if they are used more than once)