From 1c93f003f73116202b1f964b0d1b6d3f07b69fb0 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 14 Sep 2021 02:01:49 -0400 Subject: No more "^slots". --- stdlib/source/library/lux.lux | 39 --------------------------------------- 1 file changed, 39 deletions(-) (limited to 'stdlib/source/library/lux.lux') diff --git a/stdlib/source/library/lux.lux b/stdlib/source/library/lux.lux index c488444dd..862c84fff 100644 --- a/stdlib/source/library/lux.lux +++ b/stdlib/source/library/lux.lux @@ -4339,45 +4339,6 @@ {#None} (failure "Wrong syntax for loop")))) -(macro: .public (^slots tokens) - (case tokens - (^ (list& [_ {#Form (list [_ {#Tuple (list& hslot' tslots')}])}] body branches)) - (do meta_monad - [slots (: (Meta [Symbol (List Symbol)]) - (case (: (Maybe [Symbol (List Symbol)]) - (do maybe_monad - [hslot (..identifier_name hslot') - tslots (monad#each maybe_monad ..identifier_name tslots')] - (in [hslot tslots]))) - {#Some slots} - (in_meta slots) - - {#None} - (failure "Wrong syntax for ^slots"))) - .let [[hslot tslots] slots] - hslot (..normal hslot) - tslots (monad#each meta_monad ..normal tslots) - output (..type_slot hslot) - g!_ (..identifier "_") - .let [[idx tags exported? type] output - slot_pairings (list#each (: (-> Symbol [Text Code]) - (function (_ [module name]) - [name (local_identifier$ name)])) - (list& hslot tslots)) - pattern (|> tags - (list#each (: (-> Symbol (List Code)) - (function (_ [module name]) - (let [tag (identifier$ [module name])] - (case (plist#value name slot_pairings) - {#Some binding} (list tag binding) - {#None} (list tag g!_)))))) - list#conjoint - tuple$)]] - (in_meta (list& pattern body branches))) - - _ - (failure "Wrong syntax for ^slots"))) - (def: (with_expansions' label tokens target) (-> Text (List Code) Code (List Code)) (case target -- cgit v1.2.3