blob: c6da88bea7d217fa0346fb0ec70d03f75a1aa4f7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{-# LANGUAGE TypeFamilyDependencies #-}
module T6018failclosed2 where
-- this one is a strange beast. Last equation is unreachable and thus it is
-- removed. It is then impossible to typecheck barapp and thus we generate an
-- error
type family Bar a = r | r -> a where
Bar Int = Bool
Bar Bool = Int
Bar Bool = Char
bar :: Bar a -> Bar a
bar x = x
barapp :: Char
barapp = bar 'c'
|