summaryrefslogtreecommitdiff
path: root/testsuite/tests/dependent
diff options
context:
space:
mode:
authorBen Gamari <ben@smart-cactus.org>2020-12-15 11:21:06 -0500
committerBen Gamari <ben@smart-cactus.org>2020-12-15 11:21:06 -0500
commit331f556886e611af3d2633d1cebb868574a2aa13 (patch)
treecc38fae1d51227ca86677435aaee311c2e6bbbe0 /testsuite/tests/dependent
parent535dae66271af0ce4ab9c0a772614b700bc4c92a (diff)
downloadhaskell-331f556886e611af3d2633d1cebb868574a2aa13.tar.gz
Revert "Implement BoxedRep proposal"
This was inadvertently merged. This reverts commit 6c2eb2232b39ff4720fda0a4a009fb6afbc9dcea.
Diffstat (limited to 'testsuite/tests/dependent')
-rw-r--r--testsuite/tests/dependent/should_compile/RaeJobTalk.hs18
-rw-r--r--testsuite/tests/dependent/should_fail/T17131.stderr4
2 files changed, 7 insertions, 15 deletions
diff --git a/testsuite/tests/dependent/should_compile/RaeJobTalk.hs b/testsuite/tests/dependent/should_compile/RaeJobTalk.hs
index 90a72c2a9a..6c74e10a7c 100644
--- a/testsuite/tests/dependent/should_compile/RaeJobTalk.hs
+++ b/testsuite/tests/dependent/should_compile/RaeJobTalk.hs
@@ -14,14 +14,12 @@ import Data.Type.Bool
import Data.Type.Equality hiding ((:~~:)(..))
import GHC.TypeLits
import Data.Proxy
-import GHC.Exts hiding (Lifted, BoxedRep)
+import GHC.Exts
import Data.Kind
import Unsafe.Coerce
import Data.Char
import Data.Maybe
-import qualified GHC.Exts as Exts
-
-------------------------------
-- Utilities
@@ -84,9 +82,7 @@ data TyCon (a :: k) where
Arrow :: TyCon (->)
TYPE :: TyCon TYPE
RuntimeRep :: TyCon RuntimeRep
- Levity :: TyCon Levity
- BoxedRep :: TyCon 'Exts.BoxedRep
- Lifted :: TyCon 'Exts.Lifted
+ LiftedRep' :: TyCon 'LiftedRep
-- If extending, add to eqTyCon too
eqTyCon :: TyCon a -> TyCon b -> Maybe (a :~~: b)
@@ -98,9 +94,7 @@ eqTyCon Maybe Maybe = Just HRefl
eqTyCon Arrow Arrow = Just HRefl
eqTyCon TYPE TYPE = Just HRefl
eqTyCon RuntimeRep RuntimeRep = Just HRefl
-eqTyCon Levity Levity = Just HRefl
-eqTyCon BoxedRep BoxedRep = Just HRefl
-eqTyCon Lifted Lifted = Just HRefl
+eqTyCon LiftedRep' LiftedRep' = Just HRefl
eqTyCon _ _ = Nothing
-- Check whether or not a type is really a plain old tycon;
@@ -218,10 +212,8 @@ instance TyConAble [] where tyCon = List
instance TyConAble Maybe where tyCon = Maybe
instance TyConAble (->) where tyCon = Arrow
instance TyConAble TYPE where tyCon = TYPE
-instance TyConAble 'Exts.Lifted where tyCon = Lifted
-instance TyConAble 'Exts.BoxedRep where tyCon = BoxedRep
-instance TyConAble RuntimeRep where tyCon = RuntimeRep
-instance TyConAble Levity where tyCon = Levity
+instance TyConAble 'LiftedRep where tyCon = LiftedRep'
+instance TyConAble RuntimeRep where tyCon = RuntimeRep
-- Can't just define Typeable the way we want, because the instances
-- overlap. So we have to mock up instance chains via closed type families.
diff --git a/testsuite/tests/dependent/should_fail/T17131.stderr b/testsuite/tests/dependent/should_fail/T17131.stderr
index b2af8ab7b8..daad6ac054 100644
--- a/testsuite/tests/dependent/should_fail/T17131.stderr
+++ b/testsuite/tests/dependent/should_fail/T17131.stderr
@@ -1,9 +1,9 @@
T17131.hs:12:34: error:
• Couldn't match kind: TypeReps xs
- with: '[ 'BoxedRep 'Lifted]
+ with: '[ 'LiftedRep]
Expected kind ‘TYPE ('TupleRep (TypeReps xs))’,
- but ‘(# a #)’ has kind ‘TYPE ('TupleRep '[ 'BoxedRep 'Lifted])’
+ but ‘(# a #)’ has kind ‘TYPE ('TupleRep '[ 'LiftedRep])’
The type variable ‘xs’ is ambiguous
• In the type ‘(# a #)’
In the type family declaration for ‘Tuple#’