[commit: ghc] ghc-8.2: testsuite: Add regression test for #13474 (f7b19a6)
git at git.haskell.org
git at git.haskell.org
Mon Apr 3 02:37:44 UTC 2017
Repository : ssh://git@git.haskell.org/ghc
On branch : ghc-8.2
Link : http://ghc.haskell.org/trac/ghc/changeset/f7b19a66e64df5b89c65ccda8d6bc22f6b9a7b4d/ghc
>---------------------------------------------------------------
commit f7b19a66e64df5b89c65ccda8d6bc22f6b9a7b4d
Author: Ben Gamari <ben at smart-cactus.org>
Date: Sat Apr 1 10:59:53 2017 -0400
testsuite: Add regression test for #13474
(cherry picked from commit 6928d8019cd2cdd1c0b9d6e1fe1a0c8c07e57595)
>---------------------------------------------------------------
f7b19a66e64df5b89c65ccda8d6bc22f6b9a7b4d
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 97a5350..33ffc4f 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -547,3 +547,4 @@ test('T13381', normal, compile_fail, [''])
test('T13337', normal, compile, [''])
test('T13343', normal, compile, [''])
test('T13458', normal, compile, [''])
+test('T13474', normal, compile, [''])
More information about the ghc-commits
mailing list