diff --git a/doc/gf-modules.html b/doc/gf-modules.html index 74cabe654..0a085ac49 100644 --- a/doc/gf-modules.html +++ b/doc/gf-modules.html @@ -660,12 +660,97 @@ is possible, as always, between modules of the same type.
+ +A module that opens an interface is therefore +incomplete, and has to be completed with an +instance of the interface to become complete. To make +this situation clear, GF requires any module that opens an +interface to be marked as incomplete. Thus +the module +
+ incomplete concrete DocMarkup of Doc = open Markup in {
+ ...
+ }
+
+uses the interface Markup to place markup in
+chosen places in its linearization rules, but the
+implementation of markup - whether in HTML or in LaTeX - is
+left unspecified. This is a powerful way of sharing
+the code of a whole module.
+
++ +Another terminology for incomplete modules is +parametrized modules or functors. +The interface gives the list of parameters +that the functor depends on. +
+ concrete DocHTML of Doc = DocMarkup with (Markup = MarkupHTML) ; ++Instantiation of Markup with MarkupLatex is +another one-liner. + +
+ +If more interfaces than one are instantiated, a comma-separated +list of equations in parentheses is used, e.g. +
+ concrete RulesIta = CategoriesIta ** RulesRomance with + (TypesRomance = TypesIta), (SyntaxRomance = SyntaxIta) ; ++(an example from the GF resource grammar library, where languages for +Romance languages share two interfaces). +All interfaces that are opened in the completed model +must be completed. + +
+ +Notice that the completion of an incomplete module +may at the same time extend modules of the same type (which need +not be completions). But it cannot add new judgements. +