summaryrefslogtreecommitdiff
path: root/testsuite/tests/th
diff options
context:
space:
mode:
authorVladislav Zavialov <vlad.z.4096@gmail.com>2018-06-14 15:02:36 -0400
committerRichard Eisenberg <rae@cs.brynmawr.edu>2018-06-14 15:05:32 -0400
commitd650729f9a0f3b6aa5e6ef2d5fba337f6f70fa60 (patch)
treeac224609397d4b7ca7072fc87739d2522be7675b /testsuite/tests/th
parent4672e2ebf040feffde4e7e2d79c479e4c0c3efaf (diff)
downloadhaskell-d650729f9a0f3b6aa5e6ef2d5fba337f6f70fa60.tar.gz
Embrace -XTypeInType, add -XStarIsType
Summary: Implement the "Embrace Type :: Type" GHC proposal, .../ghc-proposals/blob/master/proposals/0020-no-type-in-type.rst GHC 8.0 included a major change to GHC's type system: the Type :: Type axiom. Though casual users were protected from this by hiding its features behind the -XTypeInType extension, all programs written in GHC 8+ have the axiom behind the scenes. In order to preserve backward compatibility, various legacy features were left unchanged. For example, with -XDataKinds but not -XTypeInType, GADTs could not be used in types. Now these restrictions are lifted and -XTypeInType becomes a redundant flag that will be eventually deprecated. * Incorporate the features currently in -XTypeInType into the -XPolyKinds and -XDataKinds extensions. * Introduce a new extension -XStarIsType to control how to parse * in code and whether to print it in error messages. Test Plan: Validate Reviewers: goldfire, hvr, bgamari, alanz, simonpj Reviewed By: goldfire, simonpj Subscribers: rwbarton, thomie, mpickering, carter GHC Trac Issues: #15195 Differential Revision: https://phabricator.haskell.org/D4748
Diffstat (limited to 'testsuite/tests/th')
-rw-r--r--testsuite/tests/th/T11463.hs2
-rw-r--r--testsuite/tests/th/T11484.hs2
-rw-r--r--testsuite/tests/th/T13642.hs2
-rw-r--r--testsuite/tests/th/T13781.hs2
-rw-r--r--testsuite/tests/th/T14060.hs2
-rw-r--r--testsuite/tests/th/T14869.hs2
-rw-r--r--testsuite/tests/th/T8031.hs4
-rw-r--r--testsuite/tests/th/TH_RichKinds2.hs5
-rw-r--r--testsuite/tests/th/TH_RichKinds2.stderr2
9 files changed, 12 insertions, 11 deletions
diff --git a/testsuite/tests/th/T11463.hs b/testsuite/tests/th/T11463.hs
index 1faf5964f4..3cb57d1cea 100644
--- a/testsuite/tests/th/T11463.hs
+++ b/testsuite/tests/th/T11463.hs
@@ -1,5 +1,5 @@
{-# LANGUAGE TemplateHaskell #-}
-{-# LANGUAGE TypeInType #-}
+{-# LANGUAGE DataKinds, PolyKinds #-}
module Main where
import Data.Kind
diff --git a/testsuite/tests/th/T11484.hs b/testsuite/tests/th/T11484.hs
index d8c0708bd2..e1e30fc694 100644
--- a/testsuite/tests/th/T11484.hs
+++ b/testsuite/tests/th/T11484.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE TypeInType #-}
+{-# LANGUAGE PolyKinds #-}
module T11484 where
diff --git a/testsuite/tests/th/T13642.hs b/testsuite/tests/th/T13642.hs
index 090b891433..ab655c0e4a 100644
--- a/testsuite/tests/th/T13642.hs
+++ b/testsuite/tests/th/T13642.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE GADTs, TypeInType, TemplateHaskell, RankNTypes #-}
+{-# LANGUAGE GADTs, PolyKinds, TemplateHaskell, RankNTypes #-}
module T13642 where
import Data.Kind (Type)
diff --git a/testsuite/tests/th/T13781.hs b/testsuite/tests/th/T13781.hs
index 7498f56bae..2fd2f1a3d4 100644
--- a/testsuite/tests/th/T13781.hs
+++ b/testsuite/tests/th/T13781.hs
@@ -1,5 +1,5 @@
{-# LANGUAGE TemplateHaskell #-}
-{-# LANGUAGE TypeInType #-}
+{-# LANGUAGE PolyKinds #-}
module T13781 where
import Data.Kind
diff --git a/testsuite/tests/th/T14060.hs b/testsuite/tests/th/T14060.hs
index 5527b25b6e..8c4f2ddc95 100644
--- a/testsuite/tests/th/T14060.hs
+++ b/testsuite/tests/th/T14060.hs
@@ -2,7 +2,7 @@
{-# LANGUAGE ExistentialQuantification #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilyDependencies #-}
-{-# LANGUAGE TypeInType #-}
+{-# LANGUAGE PolyKinds #-}
module Main where
import Data.Kind
diff --git a/testsuite/tests/th/T14869.hs b/testsuite/tests/th/T14869.hs
index c58d4e2720..4b0dcdc171 100644
--- a/testsuite/tests/th/T14869.hs
+++ b/testsuite/tests/th/T14869.hs
@@ -1,7 +1,7 @@
{-# LANGUAGE ConstraintKinds #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
-{-# LANGUAGE TypeInType #-}
+{-# LANGUAGE DataKinds #-}
module T14869 where
import Data.Kind
diff --git a/testsuite/tests/th/T8031.hs b/testsuite/tests/th/T8031.hs
index 9f06c06ed6..08081ed6fd 100644
--- a/testsuite/tests/th/T8031.hs
+++ b/testsuite/tests/th/T8031.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE TemplateHaskell, RankNTypes, TypeOperators, TypeInType,
+{-# LANGUAGE TemplateHaskell, RankNTypes, TypeOperators, DataKinds, PolyKinds,
GADTs #-}
module T8031 where
@@ -6,7 +6,7 @@ module T8031 where
import Data.Proxy
import Data.Kind
-data SList :: [k] -> * where
+data SList :: [k] -> Type where
SCons :: Proxy h -> Proxy t -> SList (h ': t)
$( [d| foo :: forall (a :: k). Proxy a
diff --git a/testsuite/tests/th/TH_RichKinds2.hs b/testsuite/tests/th/TH_RichKinds2.hs
index ab3e107d0f..9ac13a157b 100644
--- a/testsuite/tests/th/TH_RichKinds2.hs
+++ b/testsuite/tests/th/TH_RichKinds2.hs
@@ -8,6 +8,7 @@
module TH_RichKinds2 where
+import qualified Data.Kind as K
import Data.Char
import Data.List
import Language.Haskell.TH
@@ -32,7 +33,7 @@ $( let fixKs :: String -> String -- need to remove TH renaming index from k vari
if length index == 0 then s else
prefix ++ "0" ++ (fixKs rest)
in
- do decls <- [d| data SMaybe :: (k -> *) -> (Maybe k) -> * where
+ do decls <- [d| data SMaybe :: (k -> K.Type) -> (Maybe k) -> K.Type where
SNothing :: SMaybe s 'Nothing
SJust :: s a -> SMaybe s ('Just a)
@@ -42,7 +43,7 @@ $( let fixKs :: String -> String -- need to remove TH renaming index from k vari
reportWarning (fixKs (pprint decls))
return decls )
-data SBool :: Bool -> * where
+data SBool :: Bool -> K.Type where
SFalse :: SBool 'False
STrue :: SBool 'True
diff --git a/testsuite/tests/th/TH_RichKinds2.stderr b/testsuite/tests/th/TH_RichKinds2.stderr
index 6b0662218a..8970da8bdb 100644
--- a/testsuite/tests/th/TH_RichKinds2.stderr
+++ b/testsuite/tests/th/TH_RichKinds2.stderr
@@ -1,5 +1,5 @@
-TH_RichKinds2.hs:24:4: warning:
+TH_RichKinds2.hs:25:4: warning:
data SMaybe_0 :: (k_0 -> *) -> GHC.Base.Maybe k_0 -> * where
SNothing_2 :: SMaybe_0 s_3 'GHC.Base.Nothing
SJust_4 :: (s_5 a_6) -> SMaybe_0 s_5 ('GHC.Base.Just a_6)