[Git][ghc/ghc][wip/romes/25104] hi: Stable sort avails
Rodrigo Mesquita (@alt-romes)
gitlab at gitlab.haskell.org
Thu Aug 1 09:20:02 UTC 2024
Rodrigo Mesquita pushed to branch wip/romes/25104 at Glasgow Haskell Compiler / GHC
Commits:
5e3a76aa by Rodrigo Mesquita at 2024-08-01T10:19:49+01:00
hi: Stable sort avails
Sorting the Avails in DocStructures is required to produce fully
deterministic interface files in presence of re-exported modules.
Fixes #25104
- - - - -
2 changed files:
- compiler/GHC/Hs/Doc.hs
- testsuite/tests/showIface/HaddockIssue849.stdout
Changes:
=====================================
compiler/GHC/Hs/Doc.hs
=====================================
@@ -153,7 +153,7 @@ instance Binary DocStructureItem where
DsiModExport mod_names avails -> do
putByte bh 4
put_ bh mod_names
- put_ bh avails
+ put_ bh (sortBy stableAvailCmp avails)
get bh = do
tag <- getByte bh
=====================================
testsuite/tests/showIface/HaddockIssue849.stdout
=====================================
@@ -11,12 +11,12 @@ docs:
re-exported module(s): [Data.Functor.Identity]
[]
re-exported module(s): [Data.Maybe]
- [GHC.Internal.Maybe.Maybe{GHC.Internal.Maybe.Maybe,
- GHC.Internal.Maybe.Nothing, GHC.Internal.Maybe.Just},
- GHC.Internal.Data.Maybe.maybe]
+ [GHC.Internal.Data.Maybe.maybe,
+ GHC.Internal.Maybe.Maybe{GHC.Internal.Maybe.Maybe,
+ GHC.Internal.Maybe.Nothing, GHC.Internal.Maybe.Just}]
re-exported module(s): [Data.Tuple]
- [GHC.Internal.Data.Tuple.swap, GHC.Internal.Data.Tuple.curry,
- GHC.Internal.Data.Tuple.fst, GHC.Internal.Data.Tuple.snd,
+ [GHC.Internal.Data.Tuple.curry, GHC.Internal.Data.Tuple.fst,
+ GHC.Internal.Data.Tuple.snd, GHC.Internal.Data.Tuple.swap,
GHC.Internal.Data.Tuple.uncurry]
named chunks:
haddock options:
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5e3a76aa7d8da2168ff2a5babf27d0b63460bccc
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/5e3a76aa7d8da2168ff2a5babf27d0b63460bccc
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240801/badbb987/attachment-0001.html>
More information about the ghc-commits
mailing list