[commit: ghc] master: Add regression test for #12850 (2316ee1)

git at git.haskell.org git at git.haskell.org
Thu May 11 13:36:13 UTC 2017


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

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

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

commit 2316ee1c42d7f4dc229295a5b5426dde40944dc1
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Thu May 11 09:33:43 2017 -0400

    Add regression test for #12850
    
    Commit e7985ed23ddc68b6a2e4af753578dc1d9e8ab4c9 happened to fix #12850, so
    let's add a regression test for the program reported in #12850.


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

2316ee1c42d7f4dc229295a5b5426dde40944dc1
 testsuite/tests/typecheck/should_compile/T12850.hs | 10 ++++++++++
 testsuite/tests/typecheck/should_compile/all.T     |  1 +
 2 files changed, 11 insertions(+)

diff --git a/testsuite/tests/typecheck/should_compile/T12850.hs b/testsuite/tests/typecheck/should_compile/T12850.hs
new file mode 100644
index 0000000..660b4c5
--- /dev/null
+++ b/testsuite/tests/typecheck/should_compile/T12850.hs
@@ -0,0 +1,10 @@
+{-# LANGUAGE ExplicitForAll, MagicHash, KindSignatures #-}
+module T12850 where
+
+import GHC.Types (RuntimeRep(..), TYPE)
+
+f :: forall (x :: TYPE 'IntRep). x -> x
+f x = x
+
+g = ()
+    where h = f 0#
diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T
index 6db86a8..2f34144 100644
--- a/testsuite/tests/typecheck/should_compile/all.T
+++ b/testsuite/tests/typecheck/should_compile/all.T
@@ -530,6 +530,7 @@ test('T12734a', normal, compile_fail, [''])
 test('T12763', normal, compile, [''])
 test('T12785a', normal, compile, [''])
 test('T12797', normal, compile, [''])
+test('T12850', normal, compile, [''])
 test('T12911', normal, compile, [''])
 test('T12925', normal, compile, [''])
 test('T12919', expect_broken(12919), compile, [''])



More information about the ghc-commits mailing list