[Git][ghc/ghc][master] Derive Ord instance for Extension

Marge Bot gitlab at gitlab.haskell.org
Mon Apr 20 08:36:52 UTC 2020



 Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
36882493 by Shayne Fletcher at 2020-04-20T04:36:43-04:00
Derive Ord instance for Extension

Metric Increase:
   T12150
   T12234

- - - - -


1 changed file:

- libraries/ghc-boot-th/GHC/LanguageExtensions/Type.hs


Changes:

=====================================
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)



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/36882493fcaa9dd2eefa7184929765189ac339ad

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/36882493fcaa9dd2eefa7184929765189ac339ad
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/20200420/8dd493bb/attachment.html>


More information about the ghc-commits mailing list