summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_compile/T12850.hs
diff options
context:
space:
mode:
authorRyan Scott <ryan.gl.scott@gmail.com>2017-05-11 09:33:43 -0400
committerRyan Scott <ryan.gl.scott@gmail.com>2017-05-11 09:34:27 -0400
commit2316ee1c42d7f4dc229295a5b5426dde40944dc1 (patch)
treec831a3111b9ac45fc5181e74f1d4aefe8c403796 /testsuite/tests/typecheck/should_compile/T12850.hs
parenta67cfc790256884be9ce784b1439556308db3c53 (diff)
downloadhaskell-2316ee1c42d7f4dc229295a5b5426dde40944dc1.tar.gz
Add regression test for #12850
Commit e7985ed23ddc68b6a2e4af753578dc1d9e8ab4c9 happened to fix #12850, so let's add a regression test for the program reported in #12850.
Diffstat (limited to 'testsuite/tests/typecheck/should_compile/T12850.hs')
-rw-r--r--testsuite/tests/typecheck/should_compile/T12850.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_compile/T12850.hs b/testsuite/tests/typecheck/should_compile/T12850.hs
new file mode 100644
index 0000000000..660b4c5723
--- /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#