diff options
Diffstat (limited to 'testsuite/tests/typecheck/should_run/T3500a.hs')
-rw-r--r-- | testsuite/tests/typecheck/should_run/T3500a.hs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/tests/typecheck/should_run/T3500a.hs b/testsuite/tests/typecheck/should_run/T3500a.hs new file mode 100644 index 0000000000..c3adeb0c61 --- /dev/null +++ b/testsuite/tests/typecheck/should_run/T3500a.hs @@ -0,0 +1,18 @@ +{-# LANGUAGE FlexibleContexts #-} +{-# LANGUAGE TypeFamilies #-} + +module Main where + +type family F a :: * +type instance F Int = (Int, ()) + +class C a +instance C () +instance (C (F a), C b) => C (a, b) + +f :: C (F a) => a -> Int +f _ = 2 + +main :: IO () +main = print (f (3 :: Int)) + |