如何解决必须在实例定义中完全应用类型同义词这一事实?

时间:2017-11-29 07:38:33

标签: haskell

class Foo (x :: * -> * -> *) where

data Bar a b

instance Foo Bar

type Baz a b = Either (Bar a b) b

instance Foo Baz -- does not work as Foo is a type synonym and not fully applied

对于给定的示例,是否可以在不添加Either (Bar a b) b或更改newtype的情况下为Foo定义实例?

0 个答案:

没有答案