blob: a0c124590f38d8b6253f1570888b9cccbffddc8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
tcfail179.hs:14:41: error:
• Couldn't match type ‘x’ with ‘s’
Expected: x -> s
Actual: x -> x
‘x’ is a rigid type variable bound by
a pattern with constructor:
T :: forall s x. (s -> (x -> s) -> (x, s, Int)) -> T s,
in a case alternative
at tcfail179.hs:14:14-16
‘s’ is a rigid type variable bound by
the type signature for:
run :: forall s. T s -> Int
at tcfail179.hs:12:1-17
• In the second argument of ‘g’, namely ‘id’
In the expression: g x id
In a pattern binding: (x, _, b) = g x id
• Relevant bindings include
x :: s (bound at tcfail179.hs:14:26)
g :: s -> (x -> s) -> (x, s, Int) (bound at tcfail179.hs:14:16)
ts :: T s (bound at tcfail179.hs:13:5)
run :: T s -> Int (bound at tcfail179.hs:13:1)
|