我试图了解haskell中的ad多态性,即相同的函数为不同的参数类型提供不同的行为。foo x = -xfoo TrueNo instance for (MyClass Bool b0) arising from a use ofexpression: foo True
In an equation for `it': it = fo
an expression was epected of type (string * int) list
我还是个新手,所以据我所知,'a‘和'b是泛型类型,它们需要被定义为string和int,然后才能被附加到我觉得这种理解并不完全准确,因为如果是这样的话,case id应该已经被定义为string,而int_of_string head应该是</e