Test Trac #5821
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 14 Jan 2015 17:12:29 +0000 (17:12 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 14 Jan 2015 17:12:29 +0000 (17:12 +0000)
And rename the wrongly named rebindable/T5821 to T5908 (Trac #5908)

testsuite/tests/rebindable/T5908.hs [moved from testsuite/tests/rebindable/T5821.hs with 99% similarity]
testsuite/tests/rebindable/all.T
testsuite/tests/simplCore/should_compile/T5821.hs [new file with mode: 0644]
testsuite/tests/simplCore/should_compile/all.T

similarity index 99%
rename from testsuite/tests/rebindable/T5821.hs
rename to testsuite/tests/rebindable/T5908.hs
index 6adc356..32a4d4e 100644 (file)
@@ -4,7 +4,7 @@
     ExplicitForAll
   , GADTs
   , RebindableSyntax #-}
-module T5821a 
+module T5908
        ( Writer
        , runWriter
        , execWriter
index a2a37d7..70628fa 100644 (file)
@@ -30,4 +30,4 @@ test('DoParamM', reqlib('mtl'), compile_fail, [''])
 test('T5038', normal, compile_and_run, [''])
 test('T4851', normal, compile, [''])
 
-test('T5821', normal, compile, [''])
+test('T5908', normal, compile, [''])
diff --git a/testsuite/tests/simplCore/should_compile/T5821.hs b/testsuite/tests/simplCore/should_compile/T5821.hs
new file mode 100644 (file)
index 0000000..762254c
--- /dev/null
@@ -0,0 +1,11 @@
+{-# LANGUAGE TypeFamilies #-}
+{-# OPTIONS_GHC -fno-warn-redundant-constraints #-}
+module T5821 where
+
+type family T a
+type instance T Int = Bool
+
+foo :: Num a => a -> T a
+foo = undefined
+
+{-# SPECIALISE foo :: Int -> Bool #-}
index 2ce58ec..0ffe974 100644 (file)
@@ -209,3 +209,4 @@ test('T6056', only_ways(['optasm']), multimod_compile, ['T6056', '-v0 -ddump-rul
 test('T9400', only_ways(['optasm']), compile, ['-O0 -ddump-simpl -dsuppress-uniques'])
 test('T9583', only_ways(['optasm']), compile, [''])
 test('T9565', only_ways(['optasm']), compile, [''])
+test('T5821', only_ways(['optasm']), compile, [''])