Commit 98d6a29e authored by Thomas Miedema's avatar Thomas Miedema
Browse files

Docs: delete section on Hierarchical Modules

This information is mostly useless, since hierarchical modules are valid
Haskell2010 and everybody knows how to use them.

Reviewed by: bgamari

Differential Revision: https://phabricator.haskell.org/D1835
parent 8b5ea7ce
......@@ -380,40 +380,6 @@ integer literals in binary notation with the prefix ``0b`` or ``0B``. For
instance, the binary integer literal ``0b11001001`` will be desugared into
``fromInteger 201`` when :ghc-flag:`-XBinaryLiterals` is enabled.
.. _hierarchical-modules:
Hierarchical Modules
--------------------
GHC supports a small extension to the syntax of module names: a module
name is allowed to contain a dot ``.``. This is also known as the
hierarchical module namespace extension, because it extends the
normally flat Haskell module namespace into a more flexible hierarchy of
modules.
This extension has very little impact on the language itself; modules
names are *always* fully qualified, so you can just think of the fully
qualified module name as the module name. In particular, this means
that the full module name must be given after the ``module`` keyword at
the beginning of the module; for example, the module ``A.B.C`` must
begin ::
module A.B.C
It is a common strategy to use the ``as`` keyword to save some typing
when using qualified names with hierarchical modules. For example: ::
import qualified Control.Monad.ST.Strict as ST
For details on how GHC searches for source and interface files in the
presence of hierarchical modules, see :ref:`search-path`.
GHC comes with a large collection of libraries arranged hierarchically;
see the accompanying `library
documentation <../libraries/index.html>`__. More libraries to install
are available from
`HackageDB <http://hackage.haskell.org/packages/hackage.html>`__.
.. _pattern-guards:
Pattern guards
......
......@@ -12,12 +12,6 @@ This section describes what files GHC expects to find, what files it
creates, where these files are stored, and what options affect this
behaviour.
Note that this section is written with hierarchical modules in mind (see
:ref:`hierarchical-modules`); hierarchical modules are an extension to
Haskell 98 which extends the lexical syntax of module names to include a
dot ``.``. Non-hierarchical modules are thus a special case in which none
of the module names contain dots.
Pathname conventions vary from system to system. In particular, the
directory separator is "``/``" on Unix systems and "``\``" on
Windows systems. In the sections that follow, we shall consistently use
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment