[Git][ghc/ghc][wip/romes/12935] fix Ord instance

Matthew Pickering (@mpickering) gitlab at gitlab.haskell.org
Thu Jul 11 14:19:47 UTC 2024



Matthew Pickering pushed to branch wip/romes/12935 at Glasgow Haskell Compiler / GHC


Commits:
599aec7a by Matthew Pickering at 2024-07-11T15:19:17+01:00
fix Ord instance

- - - - -


2 changed files:

- compiler/GHC/Cmm/CLabel.hs
- compiler/GHC/CmmToAsm/CFG.hs


Changes:

=====================================
compiler/GHC/Cmm/CLabel.hs
=====================================
@@ -346,6 +346,8 @@ instance Ord CLabel where
   compare (IdLabel a1 b1 c1)
           (IdLabel a2 b2 c2)
           | isExternalName a1, isExternalName a2 = stableNameCmp a1 a2 S.<> compare b1 b2 S.<> compare c1 c2
+          | isExternalName a1 = GT
+          | isExternalName a2 = LT
 
   compare (IdLabel a1 b1 c1) (IdLabel a2 b2 c2) =
     -- Comparing names here should deterministic because all unique should have been renamed deterministically ......


=====================================
compiler/GHC/CmmToAsm/CFG.hs
=====================================
@@ -5,7 +5,6 @@
 {-# LANGUAGE TypeFamilies               #-}
 {-# LANGUAGE FlexibleContexts           #-}
 {-# LANGUAGE TupleSections              #-}
-{-# OPTIONS_GHC -ddump-simpl -ddump-to-file #-}
 --
 -- Copyright (c) 2018 Andreas Klebinger
 --



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/599aec7aa5fa1524e4f8a18ccc44769f7a98fe1c

-- 
This project does not include diff previews in email notifications.
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/599aec7aa5fa1524e4f8a18ccc44769f7a98fe1c
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/20240711/b2177631/attachment-0001.html>


More information about the ghc-commits mailing list