1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-04 06:23:13 +03:00
juvix/tests/positive/PublicImports
Jan Mas Rovira e43797f0a0
Generalize import syntax (#2819)
- 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.
2024-06-21 15:02:30 +02:00
..
M.juvix Generalize import syntax (#2819) 2024-06-21 15:02:30 +02:00
Main.juvix Generalize import syntax (#2819) 2024-06-21 15:02:30 +02:00
Package.juvix Generalize import syntax (#2819) 2024-06-21 15:02:30 +02:00