[commit: ghc] master: testsuite: Add (still failing) testcase for #12550 (e7ec521)

git at git.haskell.org git at git.haskell.org
Mon Nov 21 19:22:27 UTC 2016


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/e7ec521ecf7dfcb42d39763e84d3447127747aed/ghc

>---------------------------------------------------------------

commit e7ec521ecf7dfcb42d39763e84d3447127747aed
Author: Ben Gamari <bgamari.foss at gmail.com>
Date:   Mon Nov 21 13:44:21 2016 -0500

    testsuite: Add (still failing) testcase for #12550
    
    I thought that this would naturally resolve itself with the elimination
    of the Type pretty-printer but somehow all of the stars in result
    position of an arrow are still rendered in non-Unicode syntax. Quite
    odd.
    
    Test Plan: Validate
    
    Reviewers: austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D2704
    
    GHC Trac Issues: #12550


>---------------------------------------------------------------

e7ec521ecf7dfcb42d39763e84d3447127747aed
 testsuite/tests/ghci/scripts/T12550.script | 10 ++++++
 testsuite/tests/ghci/scripts/T12550.stdout | 53 ++++++++++++++++++++++++++++++
 testsuite/tests/ghci/scripts/all.T         |  1 +
 3 files changed, 64 insertions(+)

diff --git a/testsuite/tests/ghci/scripts/T12550.script b/testsuite/tests/ghci/scripts/T12550.script
new file mode 100644
index 0000000..3964035
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T12550.script
@@ -0,0 +1,10 @@
+:set -fprint-unicode-syntax -fprint-explicit-foralls
+
+:t fmap
+:i fmap
+:k Functor
+:m + GHC.Generics
+:i Functor
+:t datatypeName
+:i datatypeName
+:t (:*:)
diff --git a/testsuite/tests/ghci/scripts/T12550.stdout b/testsuite/tests/ghci/scripts/T12550.stdout
new file mode 100644
index 0000000..442bc05
--- /dev/null
+++ b/testsuite/tests/ghci/scripts/T12550.stdout
@@ -0,0 +1,53 @@
+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
+  ...
+  	-- Defined in ‘GHC.Base’
+Functor ∷ (★ → ★) → Constraint
+class Functor (f ∷ ★ → ★) where
+  fmap ∷ ∀ a b. (a → b) → f a → f b
+  (<$) ∷ ∀ a b. a → f b → f a
+  {-# MINIMAL fmap #-}
+  	-- Defined in ‘GHC.Base’
+instance Functor V1 -- Defined in ‘GHC.Generics’
+instance Functor (URec Char) -- Defined in ‘GHC.Generics’
+instance Functor (URec Double) -- Defined in ‘GHC.Generics’
+instance Functor (URec Float) -- Defined in ‘GHC.Generics’
+instance Functor (URec Int) -- Defined in ‘GHC.Generics’
+instance Functor (URec Word) -- Defined in ‘GHC.Generics’
+instance Functor U1 -- Defined in ‘GHC.Generics’
+instance ∀ (f ∷ ★ → ★). Functor f ⇒ Functor (Rec1 f)
+  -- Defined in ‘GHC.Generics’
+instance Functor Par1 -- Defined in ‘GHC.Generics’
+instance ∀ i (c ∷ Meta) (f ∷ ★ → ★). Functor f ⇒ Functor (M1 i c f)
+  -- Defined in ‘GHC.Generics’
+instance ∀ i c. Functor (K1 i c) -- Defined in ‘GHC.Generics’
+instance ∀ (f ∷ ★ → ★) (g ∷ ★ → ★).
+         (Functor g, Functor f) ⇒
+         Functor (f :.: g)
+  -- Defined in ‘GHC.Generics’
+instance ∀ (f ∷ ★ → ★) (g ∷ ★ → ★).
+         (Functor g, Functor f) ⇒
+         Functor (f :+: g)
+  -- Defined in ‘GHC.Generics’
+instance ∀ (f ∷ ★ → ★) (g ∷ ★ → ★).
+         (Functor g, Functor f) ⇒
+         Functor (f :*: g)
+  -- Defined in ‘GHC.Generics’
+instance ∀ a. Functor (Either a) -- Defined in ‘Data.Either’
+instance Functor [] -- Defined in ‘GHC.Base’
+instance Functor Maybe -- Defined in ‘GHC.Base’
+instance Functor IO -- Defined in ‘GHC.Base’
+instance ∀ r. Functor ((->) r) -- Defined in ‘GHC.Base’
+instance ∀ a. Functor ((,) a) -- Defined in ‘GHC.Base’
+datatypeName
+  ∷ ∀ {d} {t ∷ ★ → (★ → ★) → ★ → ★} {f ∷ ★ → ★} {a}.
+    Datatype d ⇒
+    t d f a → [Char]
+class Datatype (d ∷ k) where
+  datatypeName ∷ ∀ k1 (t ∷ k → (k1 → ★) → k1 → ★) (f ∷ k1
+                                                       → ★) (a ∷ k1).
+                 t d f a → [Char]
+  ...
+  	-- Defined in ‘GHC.Generics’
+(:*:) ∷ ∀ {g ∷ ★ → ★} {p} {f ∷ ★ → ★}. f p → g p → (:*:) f g p
diff --git a/testsuite/tests/ghci/scripts/all.T b/testsuite/tests/ghci/scripts/all.T
index e9a41a9..53cb1e3 100755
--- a/testsuite/tests/ghci/scripts/all.T
+++ b/testsuite/tests/ghci/scripts/all.T
@@ -267,3 +267,4 @@ 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'])



More information about the ghc-commits mailing list