Matthew Pickering pushed to branch wip/mp/ghc-9.10.1-determinism at Glasgow Haskell Compiler / GHC
Commits:
-
06ea36f3
by Matthew Pickering at 2026-02-02T17:28:42+00:00
1 changed file:
Changes:
| ... | ... | @@ -50,6 +50,7 @@ import qualified GHC.Utils.Outputable as O |
| 50 | 50 | import GHC.Hs.Extension
|
| 51 | 51 | import GHC.Types.Unique.Map
|
| 52 | 52 | import Data.List (sortBy)
|
| 53 | +import Data.Function
|
|
| 53 | 54 | |
| 54 | 55 | import GHC.Hs.DocString
|
| 55 | 56 | |
| ... | ... | @@ -88,7 +89,7 @@ instance Outputable a => Outputable (WithHsDocIdentifiers a pass) where |
| 88 | 89 | instance Binary a => Binary (WithHsDocIdentifiers a GhcRn) where
|
| 89 | 90 | put_ bh (WithHsDocIdentifiers s ids) = do
|
| 90 | 91 | put_ bh s
|
| 91 | - put_ bh $ BinLocated <$> ids
|
|
| 92 | + put_ bh $ BinLocated <$> (sortBy (stableNameCmp `on` getName) ids)
|
|
| 92 | 93 | get bh =
|
| 93 | 94 | liftA2 WithHsDocIdentifiers (get bh) (fmap unBinLocated <$> get bh)
|
| 94 | 95 |