summaryrefslogtreecommitdiff
path: root/libraries/ghc-boot-th
diff options
context:
space:
mode:
Diffstat (limited to 'libraries/ghc-boot-th')
-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)