summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci/should_run
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-08-20 17:30:51 +0200
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2020-08-23 14:12:53 +0200
commit8b86509270227dbc61f0700c7d9261a4c7672361 (patch)
tree8f95fd86fa1c052f12aefa7a1038519910ffafeb /testsuite/tests/ghci/should_run
parent3f50154591ada9064351ccec4adfe6df53ca2439 (diff)
downloadhaskell-8b86509270227dbc61f0700c7d9261a4c7672361.tar.gz
Do not print synonyms in :i (->), :i Type (#18594)
This adds a new printing flag `sdocPrintTypeAbbreviations` that is used specifically to avoid ghci printing 'type (->) = (->)' and 'type Type = Type'.
Diffstat (limited to 'testsuite/tests/ghci/should_run')
-rw-r--r--testsuite/tests/ghci/should_run/T10145.stdout2
-rw-r--r--testsuite/tests/ghci/should_run/T18594.script6
-rw-r--r--testsuite/tests/ghci/should_run/T18594.stdout15
-rw-r--r--testsuite/tests/ghci/should_run/all.T1
4 files changed, 23 insertions, 1 deletions
diff --git a/testsuite/tests/ghci/should_run/T10145.stdout b/testsuite/tests/ghci/should_run/T10145.stdout
index f7e40fd0f4..5786372e9d 100644
--- a/testsuite/tests/ghci/should_run/T10145.stdout
+++ b/testsuite/tests/ghci/should_run/T10145.stdout
@@ -1,5 +1,5 @@
type (->) :: * -> * -> *
-type (->) = (->) :: * -> * -> *
+type (->) = FUN 'Many :: * -> * -> *
-- Defined in ‘GHC.Types’
infixr -1 ->
instance Applicative ((->) r) -- Defined in ‘GHC.Base’
diff --git a/testsuite/tests/ghci/should_run/T18594.script b/testsuite/tests/ghci/should_run/T18594.script
new file mode 100644
index 0000000000..815275914c
--- /dev/null
+++ b/testsuite/tests/ghci/should_run/T18594.script
@@ -0,0 +1,6 @@
+:m GHC.Types
+:i (->)
+:set -XStarIsType
+:i Type
+:set -XNoStarIsType
+:i Type
diff --git a/testsuite/tests/ghci/should_run/T18594.stdout b/testsuite/tests/ghci/should_run/T18594.stdout
new file mode 100644
index 0000000000..9e2e79cd8b
--- /dev/null
+++ b/testsuite/tests/ghci/should_run/T18594.stdout
@@ -0,0 +1,15 @@
+type (->) :: * -> * -> *
+type (->) = FUN 'Many :: * -> * -> *
+ -- Defined in ‘GHC.Types’
+infixr -1 ->
+instance Applicative ((->) r) -- Defined in ‘GHC.Base’
+instance Functor ((->) r) -- Defined in ‘GHC.Base’
+instance Monad ((->) r) -- Defined in ‘GHC.Base’
+instance Monoid b => Monoid (a -> b) -- Defined in ‘GHC.Base’
+instance Semigroup b => Semigroup (a -> b) -- Defined in ‘GHC.Base’
+type Type :: *
+type Type = TYPE 'LiftedRep
+ -- Defined in ‘GHC.Types’
+type Type :: Type
+type Type = TYPE 'LiftedRep
+ -- Defined in ‘GHC.Types’
diff --git a/testsuite/tests/ghci/should_run/all.T b/testsuite/tests/ghci/should_run/all.T
index 8130d512d4..3de49c1f34 100644
--- a/testsuite/tests/ghci/should_run/all.T
+++ b/testsuite/tests/ghci/should_run/all.T
@@ -75,3 +75,4 @@ test('T18064',
],
ghci_script,
['T18064.script'])
+test('T18594', just_ghci, ghci_script, ['T18594.script'])