定义自己的模块
如果我们有一个名为 Business.hs 的文件,我们可以定义一个 Business-ed 的 Business 模块,如下所示:
module Business (
Person (..), -- ^ Export the Person type and all its constructors and field names
employees -- ^ Export the employees function
) where
-- begin types, function definitions, etc
更深层次的结构当然是可能的; 请参阅 Hierarchical module names 示例。