aboutsummaryrefslogtreecommitdiff
path: root/notes/import_groups.txt
blob: 492477e0322f88f759572a0b4ec1237269fe74cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33

Import groups
=============

See also use_lines.txt

As a less verbose alternative to per-file imports, there could be some kind
of "import groups" feature.

In the per-module imports.txt file (or whatever filename will be used):

    # Common imports (always imported)
    std String
    std List

    group Backend
        binary BinBuffer
    end

    group Parser
        mini_ll MLLParser
    end

And in .slul files:

    use group Backend

Alternative solutions
---------------------

* Have per-directory imports.txt/dependencies.index files
  (require it to be present in all modules?)

* Have sub-modules, and no per-file imports at all.