Syntax Lookup
Enter some language construct you want to know more about.
This is the include keyword.
The include
keyword statically "spreads" all public values, types, modules, etc. of a given module into the current module's scope. This is sometimes useful to create supersets / mixins of different modules.
Note that
include
may make your code more complex and harder to understand when abused. Think twice before using it.
Include module example
Similarly, module signatures can also be extended by other module signatures.
Include signature example
Lastly, you can also extract module types from existing modules using module type of
.