我有这个
data Something = Something Integer deriving (MyClass, Show)
class MyClass a where
hello :: MyClass a => a -> a
instance MyClass Integer where
hello i = i + 1
main = print . hello $ Something 3
Run Code Online (Sandbox Code Playgroud)
但MyClass不可导出.为什么?
haskell ×1