blob: 89cd80437159599189ffa37c0a26440b12bd010b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
tcfail179.hs:14:39:
Couldn't match expected type ‛s’ with actual type ‛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
‛s’ is a rigid type variable bound by
the type signature for run :: T s -> Int at tcfail179.hs:12:8
Relevant bindings include
run :: T s -> Int (bound at tcfail179.hs:13:1)
ts :: T s (bound at tcfail179.hs:13:5)
g :: s -> (x -> s) -> (x, s, Int) (bound at tcfail179.hs:14:16)
x :: x (bound at tcfail179.hs:14:26)
In the first argument of ‛g’, namely ‛x’
In the expression: g x id
In a pattern binding: (x, _, b) = g x id
|