T7748a.hs:16:24: error:
• Couldn't match expected type ‘a’
with actual type ‘Maybe (Maybe (r -> ()))’
‘a’ is a rigid type variable bound by
the type signature for:
test :: forall a r. a -> r -> ()
at T7748a.hs:11:1-20
• In the pattern: Just (Just p)
In a case alternative: Just (Just p) -> p
In the expression:
case zd of {
Nothing -> const ()
Just Nothing -> const ()
Just (Just p) -> p }
• Relevant bindings include
g :: r -> () (bound at T7748a.hs:13:16)
f :: r -> () (bound at T7748a.hs:13:8)
zd :: a (bound at T7748a.hs:12:6)
test :: a -> r -> () (bound at T7748a.hs:12:1)