diff --git a/testsuite/tests/typecheck/should_compile/StaticPtrTypeFamily.hs b/testsuite/tests/typecheck/should_compile/StaticPtrTypeFamily.hs new file mode 100644 index 0000000000000000000000000000000000000000..96a776ecec82acf5f2faa2e1e107f9d1fdb91894 --- /dev/null +++ b/testsuite/tests/typecheck/should_compile/StaticPtrTypeFamily.hs @@ -0,0 +1,17 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE ScopedTypeVariables #-} +{-# LANGUAGE StaticPointers #-} +{-# LANGUAGE TypeFamilies #-} + +module StaticPtrTypeFamily where + +import Data.Typeable +import GHC.StaticPtr + +type family F a + +caller :: forall a. (Typeable a, Typeable (F a)) => a -> F a -> () +caller a fa = deRefStaticPtr (static func) a fa + +func :: a -> F a -> () +func _ _ = () diff --git a/testsuite/tests/typecheck/should_compile/all.T b/testsuite/tests/typecheck/should_compile/all.T index 8b31c8b3ccb8591be48d611953c6c96057118b33..4da7a858cb9db6a16be8e62678edf8a58d188416 100644 --- a/testsuite/tests/typecheck/should_compile/all.T +++ b/testsuite/tests/typecheck/should_compile/all.T @@ -804,6 +804,6 @@ test('T20584b', normal, compile, ['']) test('T20588b', [extra_files(['T20588b.hs', 'T20588b.hs-boot', 'T20588b_aux.hs'])], multimod_compile, ['T20588b_aux.hs', '-v0']) test('T20588d', [extra_files(['T20588d.hs', 'T20588d.hs-boot', 'T20588d_aux.hs'])], multimod_compile, ['T20588d_aux.hs', '-v0']) test('T20661', [extra_files(['T20661.hs', 'T20661.hs-boot', 'T20661_aux.hs'])], multimod_compile, ['T20661_aux.hs', '-v0']) - test('T20873', normal, compile, ['']) test('T20873b', [extra_files(['T20873b_aux.hs'])], multimod_compile, ['T20873b', '-v0']) +test('StaticPtrTypeFamily', normal, compile, [''])