Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
  • Teo Camarasu's avatar
    228dcae6
    template-haskell: Move wired-ins to ghc-internal · 228dcae6
    Teo Camarasu authored and Teo Camarasu's avatar Teo Camarasu committed
    Thus we make `template-haskell` reinstallable and keep it as the public
    API for Template Haskell.
    All of the wired-in identifiers are moved to `ghc-internal`.
    This necessitates also moving much of `ghc-boot-th` into `ghc-internal`.
    These modules are then re-exported from `ghc-boot-th` and
    `template-haskell`.
    To avoid a dependency on `template-haskell` from `lib:ghc`, we instead
    depend on the TH ASTs via `ghc-boot-th`.
    
    As `template-haskell` no longer has special status, we can drop the
    logic adding an implicit dependency on `template-haskell` when using TH.
    We can also drop the `template-haskell-next` package, which was
    previously used when bootstrapping.
    
    When bootstrapping, we need to vendor the TH AST modules from
    `ghc-internal` into `ghc-boot-th`. This is controlled by the `bootstrap`
    cabal flag as before. See Note [Bootstrapping Template Haskell].
    
    We split out a GHC.Internal.TH.Lift module resolving #24752.
    This module is only built when not bootstrapping.
    
    Resolves #24703
    
    -------------------------
    Metric Increase:
        ghc_boot_th_dir
        ghc_boot_th_so
    -------------------------
    228dcae6
    History
    template-haskell: Move wired-ins to ghc-internal
    Teo Camarasu authored and Teo Camarasu's avatar Teo Camarasu committed
    Thus we make `template-haskell` reinstallable and keep it as the public
    API for Template Haskell.
    All of the wired-in identifiers are moved to `ghc-internal`.
    This necessitates also moving much of `ghc-boot-th` into `ghc-internal`.
    These modules are then re-exported from `ghc-boot-th` and
    `template-haskell`.
    To avoid a dependency on `template-haskell` from `lib:ghc`, we instead
    depend on the TH ASTs via `ghc-boot-th`.
    
    As `template-haskell` no longer has special status, we can drop the
    logic adding an implicit dependency on `template-haskell` when using TH.
    We can also drop the `template-haskell-next` package, which was
    previously used when bootstrapping.
    
    When bootstrapping, we need to vendor the TH AST modules from
    `ghc-internal` into `ghc-boot-th`. This is controlled by the `bootstrap`
    cabal flag as before. See Note [Bootstrapping Template Haskell].
    
    We split out a GHC.Internal.TH.Lift module resolving #24752.
    This module is only built when not bootstrapping.
    
    Resolves #24703
    
    -------------------------
    Metric Increase:
        ghc_boot_th_dir
        ghc_boot_th_so
    -------------------------
Code owners
Assign users and groups as approvers for specific file changes. Learn more.