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
51
52
53
54
55
56
57
58
59
60
//! What a data pin carries, and the literals that can be given to one.
use ;
use TS;
/// What a data pin carries.
///
/// The vocabulary lives beside [`Value`] because the two answer to each other:
/// a literal in a configuration block has to be checkable against the pin it is
/// given to. Resolved types are never stored on wires — the compiler derives
/// them, and a second copy would go stale.
///
/// `TS` is derived here rather than on a duplicate enum in the editor: the
/// editor's view embeds this type directly, and a second enum mirroring its
/// variants would be the same fact told twice, free to drift the moment one
/// side gains a variant.
/// A literal in a node's configuration block.
///
/// Configuration entries *are* the node's data inputs: a pin either takes a
/// literal here or receives a wire, never both. Modelling them as one thing
/// removes the separate notion of a "default value on an unconnected pin" that
/// would otherwise have to exist and be kept in step.