summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci
diff options
context:
space:
mode:
authorJohn Leo <leo@halfaya.org>2016-12-13 14:57:15 -0500
committerBen Gamari <ben@smart-cactus.org>2016-12-13 15:38:33 -0500
commit7031704332db55de1fc3c46a8f450bad933997e0 (patch)
treeda3d099939e1951c5286a7804dc42a8685b28d19 /testsuite/tests/ghci
parentaa123f445338c2980fcee87a09c01d14a83bf409 (diff)
downloadhaskell-7031704332db55de1fc3c46a8f450bad933997e0.tar.gz
print * in unicode correctly (fixes #12550)
Test Plan: validate Reviewers: simonpj, austin, bgamari, goldfire Reviewed By: bgamari, goldfire Subscribers: thomie Differential Revision: https://phabricator.haskell.org/D2829
Diffstat (limited to 'testsuite/tests/ghci')
-rw-r--r--testsuite/tests/ghci/scripts/T12550.script38
-rw-r--r--testsuite/tests/ghci/scripts/T12550.stdout14
-rwxr-xr-xtestsuite/tests/ghci/scripts/all.T2
3 files changed, 51 insertions, 3 deletions
diff --git a/testsuite/tests/ghci/scripts/T12550.script b/testsuite/tests/ghci/scripts/T12550.script
index 3964035e8b..dad2a47e65 100644
--- a/testsuite/tests/ghci/scripts/T12550.script
+++ b/testsuite/tests/ghci/scripts/T12550.script
@@ -1,10 +1,44 @@
-:set -fprint-unicode-syntax -fprint-explicit-foralls
+:set -fprint-explicit-foralls -XKindSignatures -XExplicitNamespaces
+import Data.Kind (type Type)
+
+
+class C a where f :: a b
+:t f
+class C (a :: * -> * ) where f :: a b
+:t f
+class C (a :: ★ -> * ) where f :: a b
+:t f
+class C (a :: * -> ★ ) where f :: a b
+:t f
+class C (a :: ★ -> ★ ) where f :: a b
+:t f
+class C (a :: Type -> Type ) where f :: a b
+:t f
+
+:set -fprint-unicode-syntax
+
+class C a where f :: a b
+:t f
+class C (a :: * -> * ) where f :: a b
+:t f
+class C (a :: ★ -> * ) where f :: a b
+:t f
+class C (a :: * -> ★ ) where f :: a b
+:t f
+class C (a :: ★ -> ★ ) where f :: a b
+:t f
+class C (a :: Type -> Type ) where f :: a b
+:t f
:t fmap
:i fmap
:k Functor
-:m + GHC.Generics
+
+import GHC.Generics
:i Functor
:t datatypeName
:i datatypeName
:t (:*:)
+:k Rep
+:k M1
+
diff --git a/testsuite/tests/ghci/scripts/T12550.stdout b/testsuite/tests/ghci/scripts/T12550.stdout
index 442bc05c71..de3f8d15d6 100644
--- a/testsuite/tests/ghci/scripts/T12550.stdout
+++ b/testsuite/tests/ghci/scripts/T12550.stdout
@@ -1,3 +1,15 @@
+f :: forall {b} {a :: * -> *}. C a => a b
+f :: forall {b} {a :: * -> *}. C a => a b
+f :: forall {b} {a :: * -> *}. C a => a b
+f :: forall {b} {a :: * -> *}. C a => a b
+f :: forall {b} {a :: * -> *}. C a => a b
+f :: forall {b} {a :: * -> *}. C a => a b
+f ∷ ∀ {b} {a ∷ ★ → ★}. C a ⇒ a b
+f ∷ ∀ {b} {a ∷ ★ → ★}. C a ⇒ a b
+f ∷ ∀ {b} {a ∷ ★ → ★}. C a ⇒ a b
+f ∷ ∀ {b} {a ∷ ★ → ★}. C a ⇒ a b
+f ∷ ∀ {b} {a ∷ ★ → ★}. C a ⇒ a b
+f ∷ ∀ {b} {a ∷ ★ → ★}. C a ⇒ a b
fmap ∷ ∀ {f ∷ ★ → ★} {b} {a}. Functor f ⇒ (a → b) → f a → f b
class Functor (f ∷ ★ → ★) where
fmap ∷ ∀ a b. (a → b) → f a → f b
@@ -51,3 +63,5 @@ class Datatype (d ∷ k) where
...
-- Defined in ‘GHC.Generics’
(:*:) ∷ ∀ {g ∷ ★ → ★} {p} {f ∷ ★ → ★}. f p → g p → (:*:) f g p
+Rep ∷ ★ → ★ → ★
+M1 ∷ ∀ k. ★ → Meta → (k → ★) → k → ★
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index b89d1c48fd..08ae3a2e87 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -267,5 +267,5 @@ test('T12091',
test('T12523', normal, ghci_script, ['T12523.script'])
test('T12024', normal, ghci_script, ['T12024.script'])
test('T12447', expect_broken(12447), ghci_script, ['T12447.script'])
-test('T12550', expect_broken(12550), ghci_script, ['T12550.script'])
test('T10249', normal, ghci_script, ['T10249.script'])
+test('T12550', normal, ghci_script, ['T12550.script'])