summaryrefslogtreecommitdiff
path: root/testsuite/tests/typecheck/should_run/T3500a.hs
blob: c3adeb0c61ae585fab99ed3395885f7e5a2bf0d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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))