summaryrefslogtreecommitdiff
path: root/testsuite/tests/determinism
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/determinism
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/determinism')
-rw-r--r--testsuite/tests/determinism/determ004/determ004.hs2
-rw-r--r--testsuite/tests/determinism/determ014/A.hs6
2 files changed, 5 insertions, 3 deletions
diff --git a/testsuite/tests/determinism/determ004/determ004.hs b/testsuite/tests/determinism/determ004/determ004.hs
index 756075031d..1361d76a0e 100644
--- a/testsuite/tests/determinism/determ004/determ004.hs
+++ b/testsuite/tests/determinism/determ004/determ004.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE TypeOperators
+{-# LANGUAGE TypeOperators, StarIsType
, DataKinds
, PolyKinds
, TypeFamilies
diff --git a/testsuite/tests/determinism/determ014/A.hs b/testsuite/tests/determinism/determ014/A.hs
index fb7a538ebd..35ea20f225 100644
--- a/testsuite/tests/determinism/determ014/A.hs
+++ b/testsuite/tests/determinism/determ014/A.hs
@@ -11,6 +11,8 @@
module KeyValue where
+import Data.Kind
+
data AccValidation err a = AccFailure err | AccSuccess a
data KeyValueError = MissingValue
@@ -23,11 +25,11 @@ missing = rpure missingField
missingField :: forall x. (WithKeyValueError :. f) x
missingField = Compose $ AccFailure [MissingValue]
-data Rec :: (u -> *) -> [u] -> * where
+data Rec :: (u -> Type) -> [u] -> Type where
RNil :: Rec f '[]
(:&) :: !(f r) -> !(Rec f rs) -> Rec f (r ': rs)
-newtype Compose (f :: l -> *) (g :: k -> l) (x :: k)
+newtype Compose (f :: l -> Type) (g :: k -> l) (x :: k)
= Compose { getCompose :: f (g x) }
type (:.) f g = Compose f g