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

  • hadrian/src/Rules/Generate.hs
    ... ... @@ -334,13 +334,15 @@ packageVersions = foldMap f [ base, ghcPrim, compiler, ghc, cabal, templateHaske
    334 334
         f pkg = interpolateVar var $ version <$> readPackageData pkg
    
    335 335
           where var = "LIBRARY_" <> escapedPkgName pkg <> "_VERSION"
    
    336 336
     
    
    337
    -packageUnitIds :: Stage -> Interpolations
    
    338
    -packageUnitIds stage =
    
    337
    +-- We don't want to use the hash in the html documentation because it
    
    338
    +-- makes it harder for non-boot packages to link to boot packages, see #26635
    
    339
    +packageIds :: Interpolations
    
    340
    +packageIds =
    
    339 341
         foldMap f [ base, ghcPrim, compiler, ghc, cabal, templateHaskell, ghcCompact, array ]
    
    340 342
       where
    
    341 343
         f :: Package -> Interpolations
    
    342
    -    f pkg = interpolateVar var $ pkgUnitId stage pkg
    
    343
    -      where var = "LIBRARY_" <> escapedPkgName pkg <> "_UNIT_ID"
    
    344
    +    f pkg = interpolateVar var $ pkgSimpleIdentifier pkg
    
    345
    +      where var = "LIBRARY_" <> escapedPkgName pkg <> "_ID"
    
    344 346
     
    
    345 347
     escapedPkgName :: Package -> String
    
    346 348
     escapedPkgName = map f . pkgName
    
    ... ... @@ -395,10 +397,10 @@ templateRules = do
    395 397
         , interpolateSetting "ProjectPatchLevel1" ProjectPatchLevel1
    
    396 398
         , interpolateSetting "ProjectPatchLevel2" ProjectPatchLevel2
    
    397 399
         ]
    
    398
    -  templateRule "docs/index.html" $ packageUnitIds Stage1
    
    400
    +  templateRule "docs/index.html" $ packageIds
    
    399 401
       templateRule "docs/users_guide/ghc_config.py" $ mconcat
    
    400 402
         [ projectVersion
    
    401
    -    , packageUnitIds Stage1
    
    403
    +    , packageIds
    
    402 404
         , interpolateSetting "LlvmMinVersion" LlvmMinVersion
    
    403 405
         , interpolateSetting "LlvmMaxVersion" LlvmMaxVersion
    
    404 406
         ]