diff options
author | HaskellMouse <rinat.stryungis@serokell.io> | 2022-04-27 06:19:45 +0300 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-06-06 09:50:00 -0400 |
commit | 9ce9ea5071af5c7a5b6fcef11ac6e19c14480901 (patch) | |
tree | 7d6113e6e2eef0cefebf4302dda8ff4bec157b73 /testsuite/tests/polykinds | |
parent | 5a3fdcfd615b502f123bb31f42d22577d44748ac (diff) | |
download | haskell-9ce9ea5071af5c7a5b6fcef11ac6e19c14480901.tar.gz |
Deprecate TypeInType extension
This commit fixes #20312
It deprecates "TypeInType" extension
according to the following proposal:
https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0083-no-type-in-type.rst
It has been already implemented.
The migration strategy:
1. Disable TypeInType
2. Enable both DataKinds and PolyKinds extensions
Metric Decrease:
T16875
Diffstat (limited to 'testsuite/tests/polykinds')
21 files changed, 32 insertions, 23 deletions
diff --git a/testsuite/tests/polykinds/T14847.hs b/testsuite/tests/polykinds/T14847.hs index 3474fe069c..b59544d3d7 100644 --- a/testsuite/tests/polykinds/T14847.hs +++ b/testsuite/tests/polykinds/T14847.hs @@ -1,6 +1,7 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE TypeInType #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE DataKinds #-} module T14847 where data Proxy k (a :: k) = MkProxy diff --git a/testsuite/tests/polykinds/T14887a.hs b/testsuite/tests/polykinds/T14887a.hs index 4179862cad..62442730e7 100644 --- a/testsuite/tests/polykinds/T14887a.hs +++ b/testsuite/tests/polykinds/T14887a.hs @@ -1,6 +1,7 @@ {-# LANGUAGE PartialTypeSignatures #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeInType #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE DataKinds #-} {-# OPTIONS_GHC -Wno-partial-type-signatures #-} module Bug where diff --git a/testsuite/tests/polykinds/T14939.hs b/testsuite/tests/polykinds/T14939.hs index eb3c700f9f..f1387a00ab 100644 --- a/testsuite/tests/polykinds/T14939.hs +++ b/testsuite/tests/polykinds/T14939.hs @@ -1,4 +1,4 @@ -{-# Language RankNTypes, ConstraintKinds, TypeInType, GADTs #-} +{-# Language RankNTypes, ConstraintKinds, DataKinds, PolyKinds, GADTs #-} module T14939 where diff --git a/testsuite/tests/polykinds/T15577.hs b/testsuite/tests/polykinds/T15577.hs index 18ebc42f92..90586c6e94 100644 --- a/testsuite/tests/polykinds/T15577.hs +++ b/testsuite/tests/polykinds/T15577.hs @@ -1,7 +1,8 @@ {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeApplications #-} {-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE TypeInType #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} module Bug where diff --git a/testsuite/tests/polykinds/T15577.stderr b/testsuite/tests/polykinds/T15577.stderr index 5478da8b4a..7f875be9fd 100644 --- a/testsuite/tests/polykinds/T15577.stderr +++ b/testsuite/tests/polykinds/T15577.stderr @@ -1,5 +1,5 @@ -T15577.hs:20:18: error: +T15577.hs:21:18: error: • Expecting one more argument to ‘f’ Expected a type, but ‘f’ has kind ‘* -> *’ • In the type ‘f’ diff --git a/testsuite/tests/polykinds/T16221.hs b/testsuite/tests/polykinds/T16221.hs index 56a83748da..c697428bab 100644 --- a/testsuite/tests/polykinds/T16221.hs +++ b/testsuite/tests/polykinds/T16221.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE GADTs, TypeInType, ExistentialQuantification #-} +{-# LANGUAGE GADTs, PolyKinds, DataKinds, ExistentialQuantification #-} module T16221 where diff --git a/testsuite/tests/polykinds/T16221a.hs b/testsuite/tests/polykinds/T16221a.hs index 50128aa826..758faa4643 100644 --- a/testsuite/tests/polykinds/T16221a.hs +++ b/testsuite/tests/polykinds/T16221a.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE TypeInType, ExistentialQuantification #-} +{-# LANGUAGE DataKinds, PolyKinds, ExistentialQuantification #-} module T16221a where diff --git a/testsuite/tests/polykinds/T16245a.hs b/testsuite/tests/polykinds/T16245a.hs index 65d904f609..2defabb36d 100644 --- a/testsuite/tests/polykinds/T16245a.hs +++ b/testsuite/tests/polykinds/T16245a.hs @@ -1,6 +1,7 @@ {-# LANGUAGE Haskell2010 #-} {-# LANGUAGE RankNTypes #-} -{-# LANGUAGE TypeInType #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE DataKinds #-} module Bug where import Data.Kind diff --git a/testsuite/tests/polykinds/T16245a.stderr b/testsuite/tests/polykinds/T16245a.stderr index 00f300fdab..a7df4f2fbc 100644 --- a/testsuite/tests/polykinds/T16245a.stderr +++ b/testsuite/tests/polykinds/T16245a.stderr @@ -1,12 +1,12 @@ -T16245a.hs:11:66: error: +T16245a.hs:12:66: error: • Expected kind ‘k1’, but ‘b’ has kind ‘k2’ ‘k2’ is a rigid type variable bound by the newtype declaration for ‘T’ - at T16245a.hs:11:12 + at T16245a.hs:12:12 ‘k1’ is a rigid type variable bound by the newtype declaration for ‘T’ - at T16245a.hs:11:1-67 + at T16245a.hs:12:1-67 • In the second argument of ‘SameKind’, namely ‘b’ In the type ‘(forall (b :: k). SameKind a b)’ In the definition of data constructor ‘MkT’ diff --git a/testsuite/tests/polykinds/T16247.hs b/testsuite/tests/polykinds/T16247.hs index 617f3c4aca..63db8ea175 100644 --- a/testsuite/tests/polykinds/T16247.hs +++ b/testsuite/tests/polykinds/T16247.hs @@ -1,6 +1,7 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeInType #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE DataKinds #-} module Bug where import Data.Kind diff --git a/testsuite/tests/polykinds/T16247.stderr b/testsuite/tests/polykinds/T16247.stderr index dc637bee4a..5c78312f29 100644 --- a/testsuite/tests/polykinds/T16247.stderr +++ b/testsuite/tests/polykinds/T16247.stderr @@ -1,5 +1,5 @@ -T16247.hs:9:20: error: +T16247.hs:10:20: error: • These kind and type variables: a k (b :: k) are out of dependency order. Perhaps try this ordering: k (a :: k) (b :: k) diff --git a/testsuite/tests/polykinds/T16247a.hs b/testsuite/tests/polykinds/T16247a.hs index 60a98d6c8f..58215916ed 100644 --- a/testsuite/tests/polykinds/T16247a.hs +++ b/testsuite/tests/polykinds/T16247a.hs @@ -2,7 +2,8 @@ {-# LANGUAGE GADTs #-} {-# LANGUAGE ScopedTypeVariables #-} {-# LANGUAGE TypeFamilies #-} -{-# LANGUAGE TypeInType #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE DataKinds #-} {-# LANGUAGE TypeOperators #-} module Bug where diff --git a/testsuite/tests/polykinds/T16247a.stderr b/testsuite/tests/polykinds/T16247a.stderr index 0205a74429..8bcd75ac9b 100644 --- a/testsuite/tests/polykinds/T16247a.stderr +++ b/testsuite/tests/polykinds/T16247a.stderr @@ -1,5 +1,5 @@ -T16247a.hs:21:28: error: +T16247a.hs:22:28: error: • These kind and type variables: p k are out of dependency order. Perhaps try this ordering: k (p :: k) diff --git a/testsuite/tests/polykinds/T16263.hs b/testsuite/tests/polykinds/T16263.hs index 4331c123b4..4620d5b96e 100644 --- a/testsuite/tests/polykinds/T16263.hs +++ b/testsuite/tests/polykinds/T16263.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE GADTs, TypeInType, EmptyDataDecls #-} +{-# LANGUAGE GADTs, DataKinds, PolyKinds, EmptyDataDecls #-} module T16263 where diff --git a/testsuite/tests/polykinds/T16342.hs b/testsuite/tests/polykinds/T16342.hs index 5eafcee9ec..8d21a323e9 100644 --- a/testsuite/tests/polykinds/T16342.hs +++ b/testsuite/tests/polykinds/T16342.hs @@ -1,4 +1,4 @@ -{-# LANGUAGE MultiParamTypeClasses, TypeInType, ConstrainedClassMethods, ScopedTypeVariables #-} +{-# LANGUAGE MultiParamTypeClasses, DataKinds, PolyKinds, ConstrainedClassMethods, ScopedTypeVariables #-} module T16342 where diff --git a/testsuite/tests/polykinds/T18451.hs b/testsuite/tests/polykinds/T18451.hs index da14360ea5..91fe7d7a43 100644 --- a/testsuite/tests/polykinds/T18451.hs +++ b/testsuite/tests/polykinds/T18451.hs @@ -1,5 +1,6 @@ {-# LANGUAGE RankNTypes #-} -{-# LANGUAGE TypeInType #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE DataKinds #-} module Bug where import Data.Kind diff --git a/testsuite/tests/polykinds/T18451.stderr b/testsuite/tests/polykinds/T18451.stderr index 0bd3f9893b..0626e69b79 100644 --- a/testsuite/tests/polykinds/T18451.stderr +++ b/testsuite/tests/polykinds/T18451.stderr @@ -1,5 +1,5 @@ -T18451.hs:10:58: error: +T18451.hs:11:58: error: • Expected kind ‘k0’, but ‘b’ has kind ‘k’ Type variable kinds: a :: k0 diff --git a/testsuite/tests/polykinds/T18451a.hs b/testsuite/tests/polykinds/T18451a.hs index 9b5248c30f..5611a7afcb 100644 --- a/testsuite/tests/polykinds/T18451a.hs +++ b/testsuite/tests/polykinds/T18451a.hs @@ -1,5 +1,6 @@ {-# LANGUAGE RankNTypes #-} -{-# LANGUAGE TypeInType #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE DataKinds #-} module Bug where import Data.Kind diff --git a/testsuite/tests/polykinds/T18451a.stderr b/testsuite/tests/polykinds/T18451a.stderr index b7ad0ee898..7a53c03d22 100644 --- a/testsuite/tests/polykinds/T18451a.stderr +++ b/testsuite/tests/polykinds/T18451a.stderr @@ -1,5 +1,5 @@ -T18451a.hs:10:15: error: +T18451a.hs:11:15: error: • These kind and type variables: a b (c :: Const Type b) are out of dependency order. Perhaps try this ordering: (b :: k) (a :: Const (*) b) (c :: Const (*) b) diff --git a/testsuite/tests/polykinds/T18451b.hs b/testsuite/tests/polykinds/T18451b.hs index 9b5248c30f..5611a7afcb 100644 --- a/testsuite/tests/polykinds/T18451b.hs +++ b/testsuite/tests/polykinds/T18451b.hs @@ -1,5 +1,6 @@ {-# LANGUAGE RankNTypes #-} -{-# LANGUAGE TypeInType #-} +{-# LANGUAGE PolyKinds #-} +{-# LANGUAGE DataKinds #-} module Bug where import Data.Kind diff --git a/testsuite/tests/polykinds/T18451b.stderr b/testsuite/tests/polykinds/T18451b.stderr index 458d39105e..f426c73fa0 100644 --- a/testsuite/tests/polykinds/T18451b.stderr +++ b/testsuite/tests/polykinds/T18451b.stderr @@ -1,5 +1,5 @@ -T18451b.hs:10:15: error: +T18451b.hs:11:15: error: • These kind and type variables: a b (c :: Const Type b) are out of dependency order. Perhaps try this ordering: (b :: k) (a :: Const (*) b) (c :: Const (*) b) |