我有一些这样的代码: {-# LANGUAGE AllowAmbiguousTypes #-}classb v) => Baz a b baz _ _ = ()
instance Bar Int String 现在我实际上想要使用那个Baz实例,所以我写道: test :: Proxy String -> Proxy Int -> ()
test
在GHC 8.0.1中,我遇到了一种奇怪的情况,用种类索引(?)在类型和类型签名中引入foralls的GADT会产生不同的类型检查行为。考虑以下数据类型:-- Same thing happens when we replace ExplicitForAll但是,如果我们想在构造函数x中指定G的类型,就会得到一个类型</em