diff options
author | Eduardo Julian | 2018-12-27 01:13:32 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-12-27 01:13:32 -0400 |
commit | e8a0d92c252e8cb87a5fdbb206cb9c4905516f53 (patch) | |
tree | 77695654765c76d9e0a9791b0eb3a636e6d6d301 /stdlib/source/lux/host/jvm/index.lux | |
parent | 0a8bfe10834784d69205fb8d1e36cc44dc2d66b8 (diff) |
- Some improvements to Index.
- Some improvements to Constant.
- Some improvements to Pool.
- WIP: Attribute
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/host/jvm/index.lux | 32 |
1 files changed, 24 insertions, 8 deletions
diff --git a/stdlib/source/lux/host/jvm/index.lux b/stdlib/source/lux/host/jvm/index.lux index 60d6211c6..3bf7e150b 100644 --- a/stdlib/source/lux/host/jvm/index.lux +++ b/stdlib/source/lux/host/jvm/index.lux @@ -1,17 +1,33 @@ (.module: [lux #* + [control + ["." equivalence (#+ Equivalence)]] [data [format - [binary (#+ Format)]]]] + ["." binary (#+ Format)]]] + [type + abstract]] [// ["//." encoding (#+ U2)]]) -(type: #export Index U2) +(abstract: #export (Index kind) + {} -(def: #export index - (-> Nat Index) - //encoding.to-u2) + U2 -(def: #export format - (Format Index) - //encoding.u2-format) + (def: #export index + (All [kind] (-> U2 (Index kind))) + (|>> :abstraction)) + + (def: #export Equivalence<Index> + (All [kind] (Equivalence (Index kind))) + (:: equivalence.Contravariant<Equivalence> map-1 + (|>> :representation) + //encoding.Equivalence<U2>)) + + (def: #export format + (All [kind] (Format (Index kind))) + (binary.adapt (|>> :abstraction) + (|>> :representation) + //encoding.u2-format)) + ) |