tcfail174.hs:14:14: error:
• Couldn't match type ‘a’ with ‘a1’
because type variable ‘a1’ would escape its scope
This (rigid, skolem) type variable is bound by
the type a1 -> a1
at tcfail174.hs:14:1-14
Expected type: Capture (forall x. x -> a)
Actual type: Capture (forall a. a -> a)
• In the first argument of ‘Capture’, namely ‘g’
In the expression: Capture g
In an equation for ‘h1’: h1 = Capture g
• Relevant bindings include
h1 :: Capture a (bound at tcfail174.hs:14:1)
tcfail174.hs:17:14: error:
• Couldn't match type ‘a’ with ‘b’
‘a’ is a rigid type variable bound by
the type a -> a at tcfail174.hs:1:1
‘b’ is a rigid type variable bound by
the type signature for:
h2 :: forall b. Capture b
at tcfail174.hs:16:7
Expected type: Capture (forall x. x -> b)
Actual type: Capture (forall a. a -> a)
• In the first argument of ‘Capture’, namely ‘g’
In the expression: Capture g
In an equation for ‘h2’: h2 = Capture g
• Relevant bindings include
h2 :: Capture b (bound at tcfail174.hs:17:1)