blob: ffe1a698eb1a54088d7fbc4d6316d4fb1db69ebc (
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
... This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
... If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
(.require
[library
[lux (.except of)
[abstract
[monad (.only do)]]
[data
["[0]" text (.only)
["%" \\format]]
[collection
["[0]" list (.use "[1]#[0]" mix functor)]
["[0]" set (.only Set)]]]
["[0]" meta (.only)
["[0]" symbol]
["[0]" code (.only)
["<[1]>" \\parser]]
[macro
[syntax (.only syntax)]]]]])
(type .public Coverage
(Set Symbol))
(def .public of
(let [symbol (is (-> Symbol Code)
(function (_ symbol)
(` (is Symbol
[(, (code.text (symbol.module symbol)))
(, (code.text (symbol.short symbol)))]))))]
(syntax (_ [name <code>.global])
(do meta.monad
[_ (meta.export name)]
(in (list (symbol name)))))))
(def separator
Text
(text.of_char 31))
(def .public encoded
(-> (List Text) Text)
(text.interposed ..separator))
(def .public (decoded module encoding)
(-> Text Text Coverage)
(|> encoding
(text.all_split_by ..separator)
(list#mix (function (_ short it)
(set.has [module short] it))
(set.empty symbol.hash))))
|