[commit: ghc] master: testsuite: Add regression test for #13474 (616a3b4)

git at git.haskell.org git at git.haskell.org
Sat Apr 1 15:01:03 UTC 2017


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

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

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

commit 616a3b49f085c01ff676424a1c3297ce0888e7ae
Author: Ben Gamari <ben at smart-cactus.org>
Date:   Sat Apr 1 10:59:53 2017 -0400

    testsuite: Add regression test for #13474


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

616a3b49f085c01ff676424a1c3297ce0888e7ae
 testsuite/tests/typecheck/should_compile/T13474.hs | 13 +++++++++++++
 testsuite/tests/typecheck/should_compile/all.T     |  1 +
 2 files changed, 14 insertions(+)

diff --git a/testsuite/tests/typecheck/should_compile/T13474.hs b/testsuite/tests/typecheck/should_compile/T13474.hs
new file mode 100644
index 0000000..9775832
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T13474.hs
@@ -0,0 +1,13 @@
+module T13474 where
+
+import qualified Data.Map as M
+
+class Default a where
+  def :: a
+
+foo :: Default a => b -> a
+foo x = def
+
+mapdef :: Default v => M.Map k v -> M.Map k v
+mapdef = M.map foo
+
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 6bd98ca..c6674c9 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -550,3 +550,4 @@ test('T13337', normal, compile, [''])
 test('T13343', normal, compile, [''])
 test('T13458', normal, compile, [''])
 test('T13490', normal, compile, [''])
+test('T13474', normal, compile, [''])



More information about the ghc-commits mailing list