From 7031704332db55de1fc3c46a8f450bad933997e0 Mon Sep 17 00:00:00 2001 From: John Leo Date: Tue, 13 Dec 2016 14:57:15 -0500 Subject: 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 --- testsuite/tests/ghci/scripts/T12550.script | 38 ++++++++++++++++++++++++++++-- testsuite/tests/ghci/scripts/T12550.stdout | 14 +++++++++++ testsuite/tests/ghci/scripts/all.T | 2 +- 3 files changed, 51 insertions(+), 3 deletions(-) (limited to 'testsuite/tests/ghci') 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']) -- cgit v1.2.1