summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShayne Fletcher <shayne@shaynefletcher.org>2020-04-19 09:32:41 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-04-20 04:36:43 -0400
commit36882493fcaa9dd2eefa7184929765189ac339ad (patch)
treeae0a85b9ea4ec02b5a6b7dc0ae1e020707e385bb
parenteaed0a3289e4c24ff1a70c6fc4b7f8bae6cd2dd3 (diff)
downloadhaskell-36882493fcaa9dd2eefa7184929765189ac339ad.tar.gz
Derive Ord instance for Extension
Metric Increase: T12150 T12234
-rw-r--r--libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs b/libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs
index 62512c6e65..33573f62b7 100644
--- a/libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs
+++ b/libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs
@@ -145,3 +145,7 @@ data Extension
| CUSKs
| StandaloneKindSignatures
deriving (Eq, Enum, Show, Generic, Bounded)
+-- 'Ord' and 'Bounded' are provided for GHC API users (see discussions
+-- in https://gitlab.haskell.org/ghc/ghc/merge_requests/2707 and
+-- https://gitlab.haskell.org/ghc/ghc/merge_requests/826).
+instance Ord Extension where compare a b = compare (fromEnum a) (fromEnum b)