Haskell Language Modules Defining Your Own Module


Example

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.