The problem is how you call complR. Perhaps your definition is not what you want. Carefully study the type complR:
complR :: Ord a => Set a -> Rel a -> Rel a
Substitute in the definition Rel a = Set (a, a):
complR :: Ord a => Set a -> Set (a, a) -> Set (a, a)
, :
complR (Set [(4, 5), (3, 3)]) (Set [(1, 3)])
, Num b => Set (b, b), , a ~ Num b =>(b, b), , Num b => Set ((b, b), (b, b)). Set [(1, 3)] , Num b => b Num b => (b, b), , .
? complR ,
complR :: Ord a => Rel a -> Rel a -> Rel a
,
complR (Set [3, 4, 5]) (Set [(1, 3)])
, , .
, :
complR (Set [(5, 4), (3, 3)] :: Set (Int, Int)) (Set [(1, 3)] :: Rel Int)
( GHC)
Couldn't match type `Int' with `(Int, Int)'
Expected type: Rel (Int, Int)
Actual type: Rel Int
In the second argument of `complR', namely
`(Set [(1, 3)] :: Rel Int)'
In the expression:
complR
(Set [(5, 4), (3, 3)] :: Set (Int, Int)) (Set [(1, 3)] :: Rel Int)
In an equation for `it':
it
= complR
(Set [(5, 4), (3, 3)] :: Set (Int, Int)) (Set [(1, 3)] :: Rel Int)
" Int (Int, Int)", , , , . " : Rel (Int, Int)... complR", , - .
, Hugs GHC. . Hugs 2006 , GHC - . Hugs , , 8 , Haskell Platform, GHC .