diff options
author | Eduardo Julian | 2021-08-24 05:23:45 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-08-24 05:23:45 -0400 |
commit | 36303d6cb2ce3ab9e36d045b9516c997bd461862 (patch) | |
tree | b9d2f1495143054d61d9af129f36833624db9dac /lux-jvm/source/luxc/lang/host/jvm.lux | |
parent | ec1f31b5a1492d5e0ab260397291d4449483bbd9 (diff) |
Outsourced the syntax for labelled type definitions to macros.
Diffstat (limited to 'lux-jvm/source/luxc/lang/host/jvm.lux')
-rw-r--r-- | lux-jvm/source/luxc/lang/host/jvm.lux | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/lux-jvm/source/luxc/lang/host/jvm.lux b/lux-jvm/source/luxc/lang/host/jvm.lux index e24922771..305d04f8c 100644 --- a/lux-jvm/source/luxc/lang/host/jvm.lux +++ b/lux-jvm/source/luxc/lang/host/jvm.lux @@ -94,32 +94,32 @@ options (<code>.tuple (<>.many <code>.local_identifier))]) (let [g!type (code.local_identifier type) g!none (code.local_identifier none) - g!tags+ (list/map code.local_tag options) + g!tags+ (list/each code.local_tag options) g!_left (code.local_identifier "_left") g!_right (code.local_identifier "_right") - g!options+ (list/map (function (_ option) - (` (def: .public (~ (code.local_identifier option)) - (~ g!type) - (|> (~ g!none) - (with@ (~ (code.local_tag option)) #1))))) - options)] + g!options+ (list/each (function (_ option) + (` (def: .public (~ (code.local_identifier option)) + (~ g!type) + (|> (~ g!none) + (with@ (~ (code.local_tag option)) #1))))) + options)] (in (list& (` (type: .public (~ g!type) - (~ (code.record (list/map (function (_ tag) - [tag (` .Bit)]) - g!tags+))))) + (~ (code.record (list/each (function (_ tag) + [tag (` .Bit)]) + g!tags+))))) (` (def: .public (~ g!none) (~ g!type) - (~ (code.record (list/map (function (_ tag) - [tag (` #0)]) - g!tags+))))) + (~ (code.record (list/each (function (_ tag) + [tag (` #0)]) + g!tags+))))) (` (def: .public ((~ (code.local_identifier ++)) (~ g!_left) (~ g!_right)) (-> (~ g!type) (~ g!type) (~ g!type)) - (~ (code.record (list/map (function (_ tag) - [tag (` (or (value@ (~ tag) (~ g!_left)) - (value@ (~ tag) (~ g!_right))))]) - g!tags+))))) + (~ (code.record (list/each (function (_ tag) + [tag (` (or (value@ (~ tag) (~ g!_left)) + (value@ (~ tag) (~ g!_right))))]) + g!tags+))))) g!options+)))) |