Skip to content

Commit b74886a

Browse files
committed
better explain the relevance of applicative instantiation
1 parent 61b8cee commit b74886a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/codeql/ql-language-reference/modules.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,9 +179,11 @@ For example, in the previous two snippets, we relied on the predicate signature
179179
bindingset[x]
180180
signature int transformer(int x);
181181
182-
The instantiation of parameterized modules is applicative, meaning that repeated instantiation of a module using
183-
identical arguments results in the same object. This is particularly relevant for type definitions inside parameterized
184-
modules as :ref:`classes <classes>` or via :ref:`newtype <algebraic-datatypes>`.
182+
The instantiation of parameterized modules is applicative.
183+
That is, if you instantiate a parameterised module twice with identical arguments, the resulting object is the same.
184+
This is particularly relevant for type definitions inside parameterized modules as :ref:`classes <classes>`
185+
or via :ref:`newtype <algebraic-datatypes>`, because the duplication of such type definitions would result in
186+
incompatible types.
185187

186188
The following example instantiates module ``M`` inside calls to predicate ``foo`` twice.
187189
The first call is valid but the second call generates an error.

0 commit comments

Comments
 (0)