I don't understand why there is an error in these functions:

```
countEqualPairs:: Eq a => [a] -> Int
countEqualPairs (s:ss) = foldr test s ss
test :: Eq a => a -> a -> Int
test s c = if (c == s) then 1 else 0
```

Error Message:

`Could not deduce (a ~ Int) from the context (Eq a) bound by the type signature for countEqualPairs :: Eq a => [a] -> Int at Blatt06.hs:30:20-37 `a' is a rigid type variable bound by the type signature for countEqualPairs :: Eq a => [a] -> Int at Blatt06.hs:30:20 Relevant bindings include ss :: [a] (bound at Blatt06.hs:31:20) s :: a (bound at Blatt06.hs:31:18) countEqualPairs :: [a] -> Int (bound at Blatt06.hs:31:1) In the second argument of `foldr', namely `s' In the expression: foldr test s ss`

Anybody there who can explain, what I got wrong?

Thanks!