diff options
author | Eduardo Julian | 2020-10-07 20:53:30 -0400 |
---|---|---|
committer | Eduardo Julian | 2020-10-07 20:53:30 -0400 |
commit | 24ba990800665299b551e66d1bc3d89c96ff6c55 (patch) | |
tree | 4aade042f9fe69e1c9a28e728f5cd6ddeaba13d5 /stdlib/source/lux/abstract | |
parent | ce7614f00a134cb61b4a6f88cfea33461a7bf478 (diff) |
Re-named "Cursor" type to "Location".
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/lux/abstract/comonad.lux | 6 | ||||
-rw-r--r-- | stdlib/source/lux/abstract/monad.lux | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/stdlib/source/lux/abstract/comonad.lux b/stdlib/source/lux/abstract/comonad.lux index 874b96913..14515da25 100644 --- a/stdlib/source/lux/abstract/comonad.lux +++ b/stdlib/source/lux/abstract/comonad.lux @@ -24,8 +24,6 @@ {#.doc "The CoFree CoMonad."} [a (F (CoFree F a))]) -(def: _cursor Cursor ["" 0 0]) - (macro: #export (be tokens state) {#.doc (doc "A co-monadic parallel to the 'do' macro." (let [square (function (_ n) (* n n))] @@ -46,7 +44,7 @@ (if (|> bindings list.size (n.% 2) (n.= 0)) (let [[module short] (name-of ..be) gensym (: (-> Text Code) - (|>> ($_ "lux text concat" module " " short " ") [""] #.Identifier [_cursor])) + (|>> ($_ "lux text concat" module " " short " ") [""] #.Identifier [.dummy-location])) g!_ (gensym "_") g!map (gensym "map") g!split (gensym "split") @@ -64,7 +62,7 @@ (list.reverse (list.as-pairs bindings)))] (#.Right [state (list (case ?name (#.Some name) - (let [name [_cursor (#.Identifier ["" name])]] + (let [name [.dummy-location (#.Identifier ["" name])]] (` ({(~ name) ({[(~ g!map) (~' unwrap) (~ g!split)] (~ body')} diff --git a/stdlib/source/lux/abstract/monad.lux b/stdlib/source/lux/abstract/monad.lux index 4c03e937c..c2b19362d 100644 --- a/stdlib/source/lux/abstract/monad.lux +++ b/stdlib/source/lux/abstract/monad.lux @@ -50,8 +50,6 @@ (-> (m (m a)) (m a))) join)) -(def: _cursor Cursor ["" 0 0]) - (macro: #export (do tokens state) {#.doc (doc "Macro for easy concatenation of monadic operations." (do monad @@ -72,7 +70,7 @@ (if (|> bindings list@size .int ("lux i64 %" +2) ("lux i64 =" +0)) (let [[module short] (name-of ..do) gensym (: (-> Text Code) - (|>> ($_ "lux text concat" module " " short " ") [""] #.Identifier [_cursor])) + (|>> ($_ "lux text concat" module " " short " ") [""] #.Identifier [.dummy-location])) g!_ (gensym "_") g!map (gensym "map") g!join (gensym "join") @@ -90,7 +88,7 @@ (reverse (as-pairs bindings)))] (#.Right [state (list (case ?name (#.Some name) - (let [name [_cursor (#.Identifier ["" name])]] + (let [name [.dummy-location (#.Identifier ["" name])]] (` ({(~ name) ({[(~ g!map) (~' wrap) (~ g!join)] (~ body')} |