aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/target/jvm/attribute/constant.lux
blob: 6e20c2ad158470a87181eb00e2f0f7562770c6fa (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
(.using
 [library
  [lux (.except)
   [abstract
    [equivalence (.only Equivalence)]]
   [data
    [binary
     [\\format (.only Writer)]]]]]
 ["[0]" ///
  [constant (.only Value)]
  ["[1][0]" index (.only Index)]
  [encoding
   ["[1][0]" unsigned (.only U2 U4)]]])

(type: .public (Constant a)
  (Index (Value a)))

(def: .public equivalence
  (All (_ a) (Equivalence (Constant a)))
  ///index.equivalence)

(def: .public length
  ///index.length)

(def: .public writer
  (All (_ a) (Writer (Constant a)))
  ///index.writer)