diff options
-rw-r--r-- | testsuite/tests/typecheck/should_run/T13435.hs | 14 | ||||
-rw-r--r-- | testsuite/tests/typecheck/should_run/T13435.stdout | 1 | ||||
-rwxr-xr-x | testsuite/tests/typecheck/should_run/all.T | 1 |
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, ['']) |