summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2022-11-14 16:43:47 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-11-14 22:21:05 -0500
commit65ce43cc647109fb18c8703563cf25fc8cf103fc (patch)
tree174b8c3c9624da6c22577560a9d4589cfca38f9b /testsuite
parent78f7ecb053340388236300e7e8d458a1a5a42344 (diff)
downloadhaskell-65ce43cc647109fb18c8703563cf25fc8cf103fc.tar.gz
Fix :i Constraint printing "type Constraint = Constraint"
Since Constraint became a synonym for CONSTRAINT 'LiftedRep, we need the same code for handling printing as for the synonym Type = TYPE 'LiftedRep. This addresses the same bug as #18594, so I'm reusing the test.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tests/ghci/should_run/T18594.script1
-rw-r--r--testsuite/tests/ghci/should_run/T18594.stdout3
2 files changed, 4 insertions, 0 deletions
diff --git a/testsuite/tests/ghci/should_run/T18594.script b/testsuite/tests/ghci/should_run/T18594.script
index 815275914c..4589dcdec8 100644
--- a/testsuite/tests/ghci/should_run/T18594.script
+++ b/testsuite/tests/ghci/should_run/T18594.script
@@ -1,5 +1,6 @@
:m GHC.Types
:i (->)
+:i Constraint
:set -XStarIsType
:i Type
:set -XNoStarIsType
diff --git a/testsuite/tests/ghci/should_run/T18594.stdout b/testsuite/tests/ghci/should_run/T18594.stdout
index 1c6c93ad7a..216186a632 100644
--- a/testsuite/tests/ghci/should_run/T18594.stdout
+++ b/testsuite/tests/ghci/should_run/T18594.stdout
@@ -7,6 +7,9 @@ instance Semigroup b => Semigroup (a -> b) -- Defined in ‘GHC.Base’
instance Applicative ((->) r) -- Defined in ‘GHC.Base’
instance Functor ((->) r) -- Defined in ‘GHC.Base’
instance Monad ((->) r) -- Defined in ‘GHC.Base’
+type Constraint :: *
+type Constraint = CONSTRAINT LiftedRep
+ -- Defined in ‘GHC.Types’
type Type :: *
type Type = TYPE LiftedRep
-- Defined in ‘GHC.Types’