mirror of
https://github.com/anoma/juvix.git
synced 2024-12-14 08:27:03 +03:00
e43797f0a0
- Closes #2429 This pr introduces two enchancements to import statements: 1. They can have `using/hiding` list of symbols, with a behaviour analogous to the open statement. 2. They can be public. When an import is marked as public, a local module (or a series of nested local modules) is generated like this: ``` import A public; -- equivalent to import A; module A; open A public; end; ``` It is easier to understand when there is an alias. ``` import A as X.Y public; -- equivalent to import A; module X; module Y; open A public; end; end; ``` Public imports are allowed to be combined with `using/hiding` modifier and open statements with the expected behaviour. |
||
---|---|---|
.. | ||
Negative.hs | ||
Positive.hs |