blob: 48203a151901463ddfb3b4ce9704bde030748772 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
{-# LANGUAGE TypeFamilies #-}
-- Test type families
module ShouldCompile where
data family T a :: *
data instance T Bool = TBool !Bool
class C a where
foo :: (a -> a) -> T a -> T a
instance C Bool where
foo f (TBool x) = TBool $ f (not x)
|