Skip to content

Commit

Permalink
docs/modules: Update info on imports.
Browse files Browse the repository at this point in the history
  • Loading branch information
MostAwesomeDude committed Feb 9, 2018
1 parent fa7ae61 commit e30168d
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions docs/source/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Module Declaration Syntax
Module files start with a :dfn:`module header`, which is a declaration of the
form::

import "namespace/name" =~ [=> first :DeepFrozen, => second]
import "namespace/name" =~ [=> first, => second]
exports (maker, main)

with zero or more ``import`` lines and exactly one ``exports`` line.
Expand Down Expand Up @@ -79,7 +79,7 @@ All exports must pass ``DeepFrozen``::

Which means that exports can only depend on ``DeepFrozen`` imports::

import "unittest" =~ [=> unittest] # not DeepFrozen
import "unittest" =~ [=> unittest :Any] # not DeepFrozen!
exports (f)

def f() as DeepFrozen: # Exception: `unittest` in the scope of `f` isn't DeepFrozen!
Expand Down Expand Up @@ -107,8 +107,9 @@ Imports can have guards on them::
import "fries/victor" =~ [=> diamonds :DeepFrozen]
exports (freezeRay, oneLiners)

Imported names are usually guarded with ``DeepFrozen``. This allows those
imported names to be used in exported objects.
In fact, by default, imported names are automatically guarded with
``DeepFrozen``. This allows those imported names to be used in exported
objects.

.. _module_expansion:

Expand Down Expand Up @@ -165,9 +166,9 @@ The package loader provides a few Miranda import pet names to all modules.
A unit test collector. It is not ``DeepFrozen``, so unit tests are
confined to their module::

import "unittest" =~ [=> unittest]
import "unittest" =~ [=> unittest :Any]

"bench"
A benchmark collector. It is not ``DeepFrozen``::

import "bench" =~ [=> bench]
import "bench" =~ [=> bench :Any]

0 comments on commit e30168d

Please sign in to comment.