Haskell Language Defining Your Own Module


If we have a file called Business.hs, we can define a Business module that can be import-ed, like so:

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

A deeper hierarchy is of course possible; see the Hierarchical module names example.