blob: 2e6109649b4c67047fb412fb044a4336d386f6a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
enum map
========
- a map from enum -> values
- should support both open and closed enums
- should support absent values in case of closed enums
- should support data in constant data section
two types:
type CompleteEnumMap (all values are known to exist. can only be used with closed enums)
type IncompleteEnumMap (some values might be absent)
example use case:
data String prefix = "/usr/local"
data IncompleteEnumMap<enum PrefixLocation> prefixes = {
.exec_prefix = "/usr/local/x86_64-linux-gnu"
}
|