blob: dd5676826dd473556020ff7f154b4eafc6b372d1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
{-# LANGUAGE RankNTypes, ScopedTypeVariables, PolyKinds #-}
module T14066d where
import Data.Proxy
g :: (forall c b (a :: c). (Proxy a, Proxy c, b)) -> ()
g _ = ()
f :: forall b. b -> (Proxy Maybe, ())
f x = (fstOf3 y :: Proxy Maybe, g y)
where
y :: (Proxy a, Proxy c, b) -- this should NOT generalize over b
-- meaning the call to g is ill-typed
y = (Proxy, Proxy, x)
fstOf3 (x, _, _) = x
|