summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Eisenberg <rae@cs.brynmawr.edu>2017-03-17 11:22:19 -0400
committerRichard Eisenberg <rae@cs.brynmawr.edu>2017-03-17 11:23:14 -0400
commit66d174a9650c3099e2e694f71b43c2dac89b21b1 (patch)
tree53af966ea377c0ba35229f827e99f51ed27e23f4
parent3cfee57abf00f794e7962e2a60efd9d7d8baf06f (diff)
downloadhaskell-66d174a9650c3099e2e694f71b43c2dac89b21b1.tar.gz
Test #13435 in typecheck/should_run/T13435
-rw-r--r--testsuite/tests/typecheck/should_run/T13435.hs14
-rw-r--r--testsuite/tests/typecheck/should_run/T13435.stdout1
-rwxr-xr-xtestsuite/tests/typecheck/should_run/all.T1
3 files changed, 16 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_run/T13435.hs b/testsuite/tests/typecheck/should_run/T13435.hs
new file mode 100644
index 0000000000..95ee946fa0
--- /dev/null
+++ b/testsuite/tests/typecheck/should_run/T13435.hs
@@ -0,0 +1,14 @@
+{-# Language FlexibleInstances, TypeFamilies, TypeInType, MagicHash #-}
+
+module Main where
+
+import Data.Kind
+import GHC.Exts
+
+class Shw (a :: TYPE rep) where
+ shw :: a -> String
+
+instance Int# ~ a => Shw (a :: TYPE IntRep) where
+ shw a = "I#" ++ show (I# a)
+
+main = putStrLn (shw 3#)
diff --git a/testsuite/tests/typecheck/should_run/T13435.stdout b/testsuite/tests/typecheck/should_run/T13435.stdout
new file mode 100644
index 0000000000..ae451c28ab
--- /dev/null
+++ b/testsuite/tests/typecheck/should_run/T13435.stdout
@@ -0,0 +1 @@
+I#3
diff --git a/testsuite/tests/typecheck/should_run/all.T b/testsuite/tests/typecheck/should_run/all.T
index 61db61e3d0..60b5fae7bd 100755
--- a/testsuite/tests/typecheck/should_run/all.T
+++ b/testsuite/tests/typecheck/should_run/all.T
@@ -120,3 +120,4 @@ test('EtaExpandLevPoly', normal, compile_and_run, [''])
test('TestTypeableBinary', normal, compile_and_run, [''])
test('Typeable1', normal, compile_fail, [''])
test('TypeableEq', normal, compile_and_run, [''])
+test('T13435', normal, compile_and_run, [''])