summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2020-04-05 12:10:10 -0400
committerMarge Bot <ben+marge-bot@smart-cactus.org>2020-04-08 16:43:44 -0400
commit7802fa17a9a1a0f02fbf95170c13d7a9711a681e (patch)
tree6d43a4767833369ac59b1de7cf2841d074aea78a /testsuite
parent04b6cf947ea065a210a216cc91f918cc1660d430 (diff)
downloadhaskell-7802fa17a9a1a0f02fbf95170c13d7a9711a681e.tar.gz
Handle promoted data constructors in typeToLHsType correctly
Instead of using `nlHsTyVar`, which hardcodes `NotPromoted`, have `typeToLHsType` pick between `Promoted` and `NotPromoted` by checking if a type constructor is promoted using `isPromotedDataCon`. Fixes #18020.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/deriving/should_compile/T14578.stderr30
-rw-r--r--testsuite/tests/deriving/should_compile/T14579.stderr12
-rw-r--r--testsuite/tests/deriving/should_fail/T15073.stderr2
3 files changed, 22 insertions, 22 deletions
diff --git a/testsuite/tests/deriving/should_compile/T14578.stderr b/testsuite/tests/deriving/should_compile/T14578.stderr
index 25480b836c..58376989db 100644
--- a/testsuite/tests/deriving/should_compile/T14578.stderr
+++ b/testsuite/tests/deriving/should_compile/T14578.stderr
@@ -9,7 +9,7 @@ Derived class instances:
GHC.Base.sconcat ::
GHC.Base.NonEmpty (T14578.Wat f g a) -> T14578.Wat f g a
GHC.Base.stimes ::
- forall (b :: TYPE GHC.Types.LiftedRep).
+ forall (b :: TYPE 'GHC.Types.LiftedRep).
GHC.Real.Integral b => b -> T14578.Wat f g a -> T14578.Wat f g a
(GHC.Base.<>)
= GHC.Prim.coerce
@@ -37,12 +37,12 @@ Derived class instances:
instance GHC.Base.Functor f =>
GHC.Base.Functor (T14578.App f) where
GHC.Base.fmap ::
- forall (a :: TYPE GHC.Types.LiftedRep)
- (b :: TYPE GHC.Types.LiftedRep).
+ forall (a :: TYPE 'GHC.Types.LiftedRep)
+ (b :: TYPE 'GHC.Types.LiftedRep).
(a -> b) -> T14578.App f a -> T14578.App f b
(GHC.Base.<$) ::
- forall (a :: TYPE GHC.Types.LiftedRep)
- (b :: TYPE GHC.Types.LiftedRep).
+ forall (a :: TYPE 'GHC.Types.LiftedRep)
+ (b :: TYPE 'GHC.Types.LiftedRep).
a -> T14578.App f b -> T14578.App f a
GHC.Base.fmap
= GHC.Prim.coerce
@@ -56,23 +56,23 @@ Derived class instances:
instance GHC.Base.Applicative f =>
GHC.Base.Applicative (T14578.App f) where
GHC.Base.pure ::
- forall (a :: TYPE GHC.Types.LiftedRep). a -> T14578.App f a
+ forall (a :: TYPE 'GHC.Types.LiftedRep). a -> T14578.App f a
(GHC.Base.<*>) ::
- forall (a :: TYPE GHC.Types.LiftedRep)
- (b :: TYPE GHC.Types.LiftedRep).
+ forall (a :: TYPE 'GHC.Types.LiftedRep)
+ (b :: TYPE 'GHC.Types.LiftedRep).
T14578.App f (a -> b) -> T14578.App f a -> T14578.App f b
GHC.Base.liftA2 ::
- forall (a :: TYPE GHC.Types.LiftedRep)
- (b :: TYPE GHC.Types.LiftedRep)
- (c :: TYPE GHC.Types.LiftedRep).
+ forall (a :: TYPE 'GHC.Types.LiftedRep)
+ (b :: TYPE 'GHC.Types.LiftedRep)
+ (c :: TYPE 'GHC.Types.LiftedRep).
(a -> b -> c) -> T14578.App f a -> T14578.App f b -> T14578.App f c
(GHC.Base.*>) ::
- forall (a :: TYPE GHC.Types.LiftedRep)
- (b :: TYPE GHC.Types.LiftedRep).
+ forall (a :: TYPE 'GHC.Types.LiftedRep)
+ (b :: TYPE 'GHC.Types.LiftedRep).
T14578.App f a -> T14578.App f b -> T14578.App f b
(GHC.Base.<*) ::
- forall (a :: TYPE GHC.Types.LiftedRep)
- (b :: TYPE GHC.Types.LiftedRep).
+ forall (a :: TYPE 'GHC.Types.LiftedRep)
+ (b :: TYPE 'GHC.Types.LiftedRep).
T14578.App f a -> T14578.App f b -> T14578.App f a
GHC.Base.pure
= GHC.Prim.coerce
diff --git a/testsuite/tests/deriving/should_compile/T14579.stderr b/testsuite/tests/deriving/should_compile/T14579.stderr
index 18e64f7bb6..81212022ef 100644
--- a/testsuite/tests/deriving/should_compile/T14579.stderr
+++ b/testsuite/tests/deriving/should_compile/T14579.stderr
@@ -8,16 +8,16 @@ Derived class instances:
T14579.Glurp a -> T14579.Glurp a -> GHC.Types.Bool
(GHC.Classes.==)
= GHC.Prim.coerce
- @(T14579.Wat @a (Data.Proxy.Proxy @a)
- -> T14579.Wat @a (Data.Proxy.Proxy @a) -> GHC.Types.Bool)
+ @(T14579.Wat @a ('Data.Proxy.Proxy @a)
+ -> T14579.Wat @a ('Data.Proxy.Proxy @a) -> GHC.Types.Bool)
@(T14579.Glurp a -> T14579.Glurp a -> GHC.Types.Bool)
- ((GHC.Classes.==) @(T14579.Wat @a (Data.Proxy.Proxy @a)))
+ ((GHC.Classes.==) @(T14579.Wat @a ('Data.Proxy.Proxy @a)))
(GHC.Classes./=)
= GHC.Prim.coerce
- @(T14579.Wat @a (Data.Proxy.Proxy @a)
- -> T14579.Wat @a (Data.Proxy.Proxy @a) -> GHC.Types.Bool)
+ @(T14579.Wat @a ('Data.Proxy.Proxy @a)
+ -> T14579.Wat @a ('Data.Proxy.Proxy @a) -> GHC.Types.Bool)
@(T14579.Glurp a -> T14579.Glurp a -> GHC.Types.Bool)
- ((GHC.Classes./=) @(T14579.Wat @a (Data.Proxy.Proxy @a)))
+ ((GHC.Classes./=) @(T14579.Wat @a ('Data.Proxy.Proxy @a)))
instance forall a (x :: Data.Proxy.Proxy a).
GHC.Classes.Eq a =>
diff --git a/testsuite/tests/deriving/should_fail/T15073.stderr b/testsuite/tests/deriving/should_fail/T15073.stderr
index d27ff4d216..5c1d99768f 100644
--- a/testsuite/tests/deriving/should_fail/T15073.stderr
+++ b/testsuite/tests/deriving/should_fail/T15073.stderr
@@ -3,7 +3,7 @@ T15073.hs:8:12: error:
• Illegal unboxed tuple type as function argument: (# Foo a #)
Perhaps you intended to use UnboxedTuples
• In the type signature:
- p :: Foo a -> Unit# @GHC.Types.LiftedRep (Foo a)
+ p :: Foo a -> Unit# @'GHC.Types.LiftedRep (Foo a)
When typechecking the code for ‘p’
in a derived instance for ‘P (Foo a)’:
To see the code I am typechecking, use -ddump-deriv