Test Trac #12950
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 21 Dec 2016 12:26:12 +0000 (12:26 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 21 Dec 2016 12:26:24 +0000 (12:26 +0000)
testsuite/tests/deSugar/should_compile/T12950.hs [new file with mode: 0644]
testsuite/tests/deSugar/should_compile/all.T

diff --git a/testsuite/tests/deSugar/should_compile/T12950.hs b/testsuite/tests/deSugar/should_compile/T12950.hs
new file mode 100644 (file)
index 0000000..a7fd2e3
--- /dev/null
@@ -0,0 +1,17 @@
+{-# LANGUAGE TypeFamilies #-}
+
+{-# OPTIONS_GHC -O #-}
+
+module T12950 where
+
+class C a where
+  type TF a; m :: a -> TF a
+
+instance C Int where
+  type TF Int = String; m = show
+
+overloaded :: C a => a -> (a,TF a)
+{-# INLINABLE overloaded #-}
+overloaded a = (a,m a)
+
+{-# SPECIALIZE overloaded :: Int -> (Int,TF Int) #-}
index a731602..6d026db 100644 (file)
@@ -106,3 +106,4 @@ test('DsStrictWarn', normal, compile, [''])
 test('T10662', normal, compile, ['-Wall'])
 test('T11414', normal, compile, [''])
 test('T12944', normal, compile, [''])
+test('T12950', normal, compile, [''])