[commit: ghc] master: DynFlags: Support British spelling of GeneralisedNewtypeDeriving (1773964)

git at git.haskell.org git at git.haskell.org
Fri Mar 2 21:07:50 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/17739645ce5a5d4b46b1de8d43e87b318a98ae6b/ghc

>---------------------------------------------------------------

commit 17739645ce5a5d4b46b1de8d43e87b318a98ae6b
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Fri Mar 2 14:18:48 2018 -0500

    DynFlags: Support British spelling of GeneralisedNewtypeDeriving
    
    Reviewers: dfeuer
    
    Reviewed By: dfeuer
    
    Subscribers: dfeuer, rwbarton, thomie, carter
    
    GHC Trac Issues: #14819
    
    Differential Revision: https://phabricator.haskell.org/D4422


>---------------------------------------------------------------

17739645ce5a5d4b46b1de8d43e87b318a98ae6b
 compiler/main/DynFlags.hs         | 2 ++
 docs/users_guide/8.6.1-notes.rst  | 2 ++
 docs/users_guide/glasgow_exts.rst | 2 +-
 testsuite/tests/driver/T4437.hs   | 3 ++-
 4 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 873ac3b..99a798e 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -4122,6 +4122,8 @@ xFlagsDeps = [
   flagSpec "GHCForeignImportPrim"             LangExt.GHCForeignImportPrim,
   flagSpec' "GeneralizedNewtypeDeriving"      LangExt.GeneralizedNewtypeDeriving
                                               setGenDeriving,
+  flagSpec' "GeneralisedNewtypeDeriving"      LangExt.GeneralizedNewtypeDeriving
+                                              setGenDeriving,
   flagSpec "ImplicitParams"                   LangExt.ImplicitParams,
   flagSpec "ImplicitPrelude"                  LangExt.ImplicitPrelude,
   flagSpec "ImpredicativeTypes"               LangExt.ImpredicativeTypes,
diff --git a/docs/users_guide/8.6.1-notes.rst b/docs/users_guide/8.6.1-notes.rst
index f5f2a5a..17617ac 100644
--- a/docs/users_guide/8.6.1-notes.rst
+++ b/docs/users_guide/8.6.1-notes.rst
@@ -54,6 +54,8 @@ Compiler
   calling the C compiler. Instead we use :ghc-flag:`-iquote` to only add it as
   an include path for `#include ""`. See :ghc-ticket:`14312`.
 
+- GHC now supports British spelling of :extension:`GeneralizedNewtypeDeriving`.
+
 Runtime system
 ~~~~~~~~~~~~~~
 
diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index 439f4d2..40013f3 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -4586,7 +4586,7 @@ Generalised derived instances for newtypes
                GeneralizedNewtypeDeriving
     :shortdesc: Enable newtype deriving.
 
-    :since: 6.8.1
+    :since: 6.8.1. British spelling since 8.6.1.
 
     Enable GHC's cunning generalised deriving mechanism for ``newtype``\s
 
diff --git a/testsuite/tests/driver/T4437.hs b/testsuite/tests/driver/T4437.hs
index 6a46e52..d82e434 100644
--- a/testsuite/tests/driver/T4437.hs
+++ b/testsuite/tests/driver/T4437.hs
@@ -40,7 +40,8 @@ expectedGhcOnlyExtensions = ["RelaxedLayout",
                              "AlternativeLayoutRule",
                              "AlternativeLayoutRuleTransitional",
                              "EmptyDataDeriving",
-                             "NumericUnderscores"]
+                             "NumericUnderscores",
+                             "GeneralisedNewtypeDeriving"]
 
 expectedCabalOnlyExtensions :: [String]
 expectedCabalOnlyExtensions = ["Generics",



More information about the ghc-commits mailing list