From f59332f92b30306675da22150de092eeebbf55f3 Mon Sep 17 00:00:00 2001 From: Krzysztof Gogolewski Date: Fri, 6 Jul 2018 10:59:43 -0400 Subject: [PATCH] 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 --- compiler/main/DynFlags.hs | 5 ++++- docs/users_guide/glasgow_exts.rst | 2 +- testsuite/tests/dependent/should_compile/dynamic-paper.hs | 2 +- .../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 2ecbd6efb5..3957879436 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 4a860acfb1..2a98522e83 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 2c284cfeea..c998f0967c 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 52e6c3823c..281b330337 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 5375c2c0eb..9a5af946ac 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 b913b27aa8..58c6590b0e 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 dadb8aa7cf..d79e66b936 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 656e913043..8422df2b03 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 -- GitLab