在某个程序中,我定义了以下数据结构:
data IntTree = EmptyTree | InternalNode IntTree Int IntTree
deriving (show)
并且还遵循功能:
size :: IntTree -> Int
size Empty = 1
size (InternalNode IntTree int IntTree) = (size IntTree) + 13 + (size IntTree)
但是我收到以下错误(出现在每个 IntTree 引用中):
Not in scope data constructor: ´IntTree´
我在函数定义中犯了什么错误?