3
如何导出我的数据族实例的构造函数?我已经试过各种方法都没有成功(见注释代码):导出数据族实例构造函数
module Test (
--Foo() (..)
--type Foo() (..)
--UnitBar
) where
class Foo a where
data Bar a :: *
instance Foo() where
data Bar() = UnitBar
我已经能够successfuly出口的构造,唯一的方法做了
module Test where
注意括号的缺失。这种方法的缺点是太多的信息了!
尝试'module Test(Bar(..))where' – viorior