Magnus pushed to branch wip/mangoiv/9.12.5-rc4 at Glasgow Haskell Compiler / GHC

Commits:

3 changed files:

Changes:

  • docs/index.html.in
    ... ... @@ -39,7 +39,7 @@
    39 39
     
    
    40 40
           <LI>
    
    41 41
             <P>
    
    42
    -          <B><A HREF="libraries/@LIBRARY_ghc_UNIT_ID@/index.html">GHC API</A></B>
    
    42
    +          <B><A HREF="libraries/@LIBRARY_ghc_ID@/index.html">GHC API</A></B>
    
    43 43
             </P>
    
    44 44
             <P>
    
    45 45
               Documentation for the GHC API.
    

  • docs/users_guide/ghc_config.py.in
    ... ... @@ -15,16 +15,16 @@ else:
    15 15
     
    
    16 16
     libs_base_uri = '../libraries'
    
    17 17
     
    
    18
    -# N.B. If you add a package to this list be sure to also add a corresponding
    
    19
    -# LIBRARY_VERSION macro call to configure.ac.
    
    18
    +# N.B. If you add a package to this list be sure to also add it to
    
    19
    +# 'packageIds' in hadrian/src/Rules/Generate.hs.
    
    20 20
     lib_versions = {
    
    21
    -    'base': '@LIBRARY_base_UNIT_ID@',
    
    22
    -    'ghc-prim': '@LIBRARY_ghc_prim_UNIT_ID@',
    
    23
    -    'template-haskell': '@LIBRARY_template_haskell_UNIT_ID@',
    
    24
    -    'ghc-compact': '@LIBRARY_ghc_compact_UNIT_ID@',
    
    25
    -    'ghc': '@LIBRARY_ghc_UNIT_ID@',
    
    26
    -    'Cabal': '@LIBRARY_Cabal_UNIT_ID@',
    
    27
    -    'array': '@LIBRARY_array_UNIT_ID@',
    
    21
    +    'base': '@LIBRARY_base_ID@',
    
    22
    +    'ghc-prim': '@LIBRARY_ghc_prim_ID@',
    
    23
    +    'template-haskell': '@LIBRARY_template_haskell_ID@',
    
    24
    +    'ghc-compact': '@LIBRARY_ghc_compact_ID@',
    
    25
    +    'ghc': '@LIBRARY_ghc_ID@',
    
    26
    +    'Cabal': '@LIBRARY_Cabal_ID@',
    
    27
    +    'array': '@LIBRARY_array_ID@',
    
    28 28
     }
    
    29 29
     
    
    30 30
     version = '@ProjectVersion@'
    

  • hadrian/src/Rules/Generate.hs
    ... ... @@ -320,13 +320,15 @@ packageVersions = foldMap f [ base, ghcPrim, compiler, ghc, cabal, templateHaske
    320 320
         f pkg = interpolateVar var $ version <$> readPackageData pkg
    
    321 321
           where var = "LIBRARY_" <> escapedPkgName pkg <> "_VERSION"
    
    322 322
     
    
    323
    -packageUnitIds :: Stage -> Interpolations
    
    324
    -packageUnitIds stage =
    
    323
    +-- We don't want to use the hash in the html documentation because it
    
    324
    +-- makes it harder for non-boot packages to link to boot packages, see #26635
    
    325
    +packageIds :: Interpolations
    
    326
    +packageIds =
    
    325 327
         foldMap f [ base, ghcPrim, compiler, ghc, cabal, templateHaskell, ghcCompact, array ]
    
    326 328
       where
    
    327 329
         f :: Package -> Interpolations
    
    328
    -    f pkg = interpolateVar var $ pkgUnitId stage pkg
    
    329
    -      where var = "LIBRARY_" <> escapedPkgName pkg <> "_UNIT_ID"
    
    330
    +    f pkg = interpolateVar var $ pkgSimpleIdentifier pkg
    
    331
    +      where var = "LIBRARY_" <> escapedPkgName pkg <> "_ID"
    
    330 332
     
    
    331 333
     escapedPkgName :: Package -> String
    
    332 334
     escapedPkgName = map f . pkgName
    
    ... ... @@ -382,10 +384,10 @@ templateRules = do
    382 384
         , interpolateSetting "ProjectPatchLevel1" ProjectPatchLevel1
    
    383 385
         , interpolateSetting "ProjectPatchLevel2" ProjectPatchLevel2
    
    384 386
         ]
    
    385
    -  templateRule "docs/index.html" $ packageUnitIds Stage1
    
    387
    +  templateRule "docs/index.html" $ packageIds
    
    386 388
       templateRule "docs/users_guide/ghc_config.py" $ mconcat
    
    387 389
         [ projectVersion
    
    388
    -    , packageUnitIds Stage1
    
    390
    +    , packageIds
    
    389 391
         , interpolateSetting "LlvmMinVersion" LlvmMinVersion
    
    390 392
         , interpolateSetting "LlvmMaxVersion" LlvmMaxVersion
    
    391 393
         ]