[commit: ghc] master: Mark AutoDeriveTypeable as deprecated (f59332f)

git at git.haskell.org git at git.haskell.org
Fri Jul 6 18:09:24 UTC 2018


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

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

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

commit f59332f92b30306675da22150de092eeebbf55f3
Author: Krzysztof Gogolewski <krz.gogolewski at gmail.com>
Date:   Fri Jul 6 10:59:43 2018 -0400

    Mark AutoDeriveTypeable as deprecated
    
    Test Plan: validate
    
    Reviewers: bgamari, alpmestan
    
    Reviewed By: alpmestan
    
    Subscribers: rwbarton, thomie, carter
    
    GHC Trac Issues: #15342
    
    Differential Revision: https://phabricator.haskell.org/D4933


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

f59332f92b30306675da22150de092eeebbf55f3
 compiler/main/DynFlags.hs                                     | 5 ++++-
 docs/users_guide/glasgow_exts.rst                             | 2 +-
 testsuite/tests/dependent/should_compile/dynamic-paper.hs     | 2 +-
 testsuite/tests/deriving/should_compile/AutoDeriveTypeable.hs | 1 -
 testsuite/tests/deriving/should_compile/T7710.hs              | 1 -
 testsuite/tests/deriving/should_compile/T8950.hs              | 2 +-
 testsuite/tests/typecheck/should_compile/T10348.hs            | 2 +-
 testsuite/tests/typecheck/should_fail/T9999.hs                | 2 +-
 8 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 2ecbd6e..3957879 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -4115,7 +4115,10 @@ xFlagsDeps = [
   flagSpec "AlternativeLayoutRuleTransitional"
                                               LangExt.AlternativeLayoutRuleTransitional,
   flagSpec "Arrows"                           LangExt.Arrows,
-  flagSpec "AutoDeriveTypeable"               LangExt.AutoDeriveTypeable,
+  depFlagSpecCond "AutoDeriveTypeable"        LangExt.AutoDeriveTypeable
+    id
+         ("Typeable instances are created automatically " ++
+                     "for all types since GHC 8.2."),
   flagSpec "BangPatterns"                     LangExt.BangPatterns,
   flagSpec "BinaryLiterals"                   LangExt.BinaryLiterals,
   flagSpec "CApiFFI"                          LangExt.CApiFFI,
diff --git a/docs/users_guide/glasgow_exts.rst b/docs/users_guide/glasgow_exts.rst
index 4a860ac..2a98522 100644
--- a/docs/users_guide/glasgow_exts.rst
+++ b/docs/users_guide/glasgow_exts.rst
@@ -4453,7 +4453,7 @@ Deriving ``Data`` instances
 
 .. extension:: DeriveDataTypeable
     :shortdesc: Enable deriving for the Data class.
-       Implied by :extension:`AutoDeriveTypeable`.
+       Implied by (deprecated) :extension:`AutoDeriveTypeable`.
 
     :since: 6.8.1
 
diff --git a/testsuite/tests/dependent/should_compile/dynamic-paper.hs b/testsuite/tests/dependent/should_compile/dynamic-paper.hs
index 2c284cf..c998f09 100644
--- a/testsuite/tests/dependent/should_compile/dynamic-paper.hs
+++ b/testsuite/tests/dependent/should_compile/dynamic-paper.hs
@@ -7,7 +7,7 @@ Stephanie Weirich, Richard Eisenberg, and Dimitrios Vytiniotis, 2016. -}
 {-#  LANGUAGE RankNTypes, PolyKinds, TypeOperators,
              ScopedTypeVariables, GADTs, FlexibleInstances,
              UndecidableInstances, RebindableSyntax,
-             DataKinds, MagicHash, AutoDeriveTypeable #-}
+             DataKinds, MagicHash #-}
 {-# OPTIONS_GHC -Wno-missing-methods -Wno-redundant-constraints #-}
 {-# OPTIONS_GHC -Wno-simplifiable-class-constraints #-}
   -- Because we define a local Typeable class and have
diff --git a/testsuite/tests/deriving/should_compile/AutoDeriveTypeable.hs b/testsuite/tests/deriving/should_compile/AutoDeriveTypeable.hs
index 52e6c38..281b330 100644
--- a/testsuite/tests/deriving/should_compile/AutoDeriveTypeable.hs
+++ b/testsuite/tests/deriving/should_compile/AutoDeriveTypeable.hs
@@ -1,4 +1,3 @@
-{-# LANGUAGE AutoDeriveTypeable #-}
 {-# LANGUAGE StandaloneDeriving #-}
 {-# LANGUAGE DataKinds          #-}
 {-# LANGUAGE PolyKinds          #-}
diff --git a/testsuite/tests/deriving/should_compile/T7710.hs b/testsuite/tests/deriving/should_compile/T7710.hs
index 5375c2c..9a5af94 100644
--- a/testsuite/tests/deriving/should_compile/T7710.hs
+++ b/testsuite/tests/deriving/should_compile/T7710.hs
@@ -1,6 +1,5 @@
 {-# LANGUAGE DeriveDataTypeable #-}
 {-# LANGUAGE TypeSynonymInstances #-}
-{-# LANGUAGE AutoDeriveTypeable #-}
 {-# LANGUAGE TypeFamilies #-}
 
 module T7710 where
diff --git a/testsuite/tests/deriving/should_compile/T8950.hs b/testsuite/tests/deriving/should_compile/T8950.hs
index b913b27..58c6590 100644
--- a/testsuite/tests/deriving/should_compile/T8950.hs
+++ b/testsuite/tests/deriving/should_compile/T8950.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE AutoDeriveTypeable, DataKinds, StandaloneDeriving #-}
+{-# LANGUAGE DataKinds, StandaloneDeriving #-}
 
 module T8950 where
 
diff --git a/testsuite/tests/typecheck/should_compile/T10348.hs b/testsuite/tests/typecheck/should_compile/T10348.hs
index dadb8aa..d79e66b 100644
--- a/testsuite/tests/typecheck/should_compile/T10348.hs
+++ b/testsuite/tests/typecheck/should_compile/T10348.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE AutoDeriveTypeable, GADTs, DataKinds, KindSignatures, StandaloneDeriving, TypeOperators #-}
+{-# LANGUAGE GADTs, DataKinds, KindSignatures, StandaloneDeriving, TypeOperators #-}
 
 module T10348 where
 
diff --git a/testsuite/tests/typecheck/should_fail/T9999.hs b/testsuite/tests/typecheck/should_fail/T9999.hs
index 656e913..8422df2 100644
--- a/testsuite/tests/typecheck/should_fail/T9999.hs
+++ b/testsuite/tests/typecheck/should_fail/T9999.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE AutoDeriveTypeable, PolyKinds, TypeFamilies, StandaloneDeriving #-}
+{-# LANGUAGE PolyKinds, TypeFamilies, StandaloneDeriving #-}
 
 module T9999 where
 



More information about the ghc-commits mailing list