diff options
Diffstat (limited to 'stdlib/source/library/lux/abstract/comonad.lux')
-rw-r--r-- | stdlib/source/library/lux/abstract/comonad.lux | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/stdlib/source/library/lux/abstract/comonad.lux b/stdlib/source/library/lux/abstract/comonad.lux index 20e24bcb5..d649ea244 100644 --- a/stdlib/source/library/lux/abstract/comonad.lux +++ b/stdlib/source/library/lux/abstract/comonad.lux @@ -26,19 +26,19 @@ (macro: .public (be tokens state) (case (: (Maybe [(Maybe Text) Code (List Code) Code]) (case tokens - (^ (list [_ {#.Tuple (list [_ {#.Identifier ["" name]}] comonad)}] [_ {#.Tuple bindings}] body)) - {#.Some [{#.Some name} comonad bindings body]} + (^ (list [_ {.#Tuple (list [_ {.#Identifier ["" name]}] comonad)}] [_ {.#Tuple bindings}] body)) + {.#Some [{.#Some name} comonad bindings body]} - (^ (list comonad [_ {#.Tuple bindings}] body)) - {#.Some [#.None comonad bindings body]} + (^ (list comonad [_ {.#Tuple bindings}] body)) + {.#Some [{.#None} comonad bindings body]} _ - #.None)) - {#.Some [?name comonad bindings body]} + {.#None})) + {.#Some [?name comonad bindings body]} (if (|> bindings list.size (n.% 2) (n.= 0)) (let [[module short] (name_of ..be) identifier (: (-> Text Code) - (|>> ($_ "lux text concat" module " " short " ") [""] #.Identifier [location.dummy])) + (|>> ($_ "lux text concat" module " " short " ") [""] {.#Identifier} [location.dummy])) g!_ (identifier "_") g!each (identifier "each") g!disjoint (identifier "disjoint") @@ -47,30 +47,30 @@ (with_expansions [<default> (` (|> (~ value) (~ g!disjoint) ((~ g!each) (function ((~ g!_) (~ var)) (~ body')))))] (let [[var value] binding] (case var - [_ {#.Identifier ["" _]}] + [_ {.#Identifier ["" _]}] <default> - [_ {#.Identifier _}] + [_ {.#Identifier _}] (` ((~ var) (~ value) (~ body'))) _ <default>))))) body (list.reversed (list.pairs bindings)))] - {#.Right [state (list (case ?name - {#.Some name} - (let [name [location.dummy {#.Identifier ["" name]}]] + {.#Right [state (list (case ?name + {.#Some name} + (let [name [location.dummy {.#Identifier ["" name]}]] (` (.case (~ comonad) (~ name) (.case (~ name) [(~ g!each) (~' out) (~ g!disjoint)] (~ body'))))) - #.None + {.#None} (` (.case (~ comonad) [(~ g!each) (~' out) (~ g!disjoint)] (~ body')))))]}) - {#.Left "'be' bindings must have an even number of parts."}) + {.#Left "'be' bindings must have an even number of parts."}) - #.None - {#.Left "Wrong syntax for 'be'"})) + {.#None} + {.#Left "Wrong syntax for 'be'"})) |