我正在使用
请提供解决方案。
ghci
,这段代码部分newtype Gold = Gold Int
deriving (Eq, Ord, Show, Num)
显示错误为
Can't make a derived instance of 'Num Gold':
'Num' is not a derivable class
Try GeneralizedNewTypeDeriving for GHC's newtype-deriving extension in the newtype declaration for 'Gold'
请提供解决方案。
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
。 - leftaroundabout