diff options
Diffstat (limited to 'source/lux')
-rw-r--r-- | source/lux/codata/lazy.lux | 3 | ||||
-rw-r--r-- | source/lux/codata/stream.lux | 1 | ||||
-rw-r--r-- | source/lux/control/comonad.lux | 3 | ||||
-rw-r--r-- | source/lux/control/monad.lux | 3 | ||||
-rw-r--r-- | source/lux/data/io.lux | 9 | ||||
-rw-r--r-- | source/lux/data/list.lux | 3 | ||||
-rw-r--r-- | source/lux/data/maybe.lux | 6 | ||||
-rw-r--r-- | source/lux/data/text.lux | 3 | ||||
-rw-r--r-- | source/lux/meta/lux.lux | 3 | ||||
-rw-r--r-- | source/lux/meta/macro.lux | 28 | ||||
-rw-r--r-- | source/lux/meta/syntax.lux | 3 |
11 files changed, 12 insertions, 53 deletions
diff --git a/source/lux/codata/lazy.lux b/source/lux/codata/lazy.lux index 542bb9922..37fbbac64 100644 --- a/source/lux/codata/lazy.lux +++ b/source/lux/codata/lazy.lux @@ -4,8 +4,7 @@ ## You can obtain one at http://mozilla.org/MPL/2.0/. (;import lux - (lux (meta macro - ast) + (lux (meta ast) (control (functor #as F #refer #all) (monad #as M #refer #all)) (data list)) diff --git a/source/lux/codata/stream.lux b/source/lux/codata/stream.lux index a25a19b5f..e2464248c 100644 --- a/source/lux/codata/stream.lux +++ b/source/lux/codata/stream.lux @@ -8,7 +8,6 @@ (monad #as M #refer #all) (comonad #as CM #refer #all)) (meta lux - macro syntax) (data (list #as l #refer (#only @list @list& List/Monad)) (number (int #open ("i" Int/Number Int/Ord))) diff --git a/source/lux/control/comonad.lux b/source/lux/control/comonad.lux index 8e12c24c0..32e7c64c1 100644 --- a/source/lux/control/comonad.lux +++ b/source/lux/control/comonad.lux @@ -5,8 +5,7 @@ (;import lux (../functor #as F) - lux/data/list - lux/meta/macro) + lux/data/list) ## [Signatures] (defsig #export (CoMonad w) diff --git a/source/lux/control/monad.lux b/source/lux/control/monad.lux index b286545a7..883875a03 100644 --- a/source/lux/control/monad.lux +++ b/source/lux/control/monad.lux @@ -5,8 +5,7 @@ (;import lux (.. (functor #as F) - (monoid #as M)) - (lux/meta macro)) + (monoid #as M))) ## [Utils] (def (foldL f init xs) diff --git a/source/lux/data/io.lux b/source/lux/data/io.lux index 4919d2edd..a0bfda3e0 100644 --- a/source/lux/data/io.lux +++ b/source/lux/data/io.lux @@ -4,12 +4,9 @@ ## You can obtain one at http://mozilla.org/MPL/2.0/. (;import lux - (lux (meta macro - ast) - (control (functor #as F) + (lux (control (functor #as F) (monad #as M))) - (.. list - (text #as T #open ("text:" Text/Monoid)))) + (.. list)) ## [Types] (deftype #export (IO a) @@ -19,7 +16,7 @@ (defmacro #export (@io tokens state) (case tokens (\ (@list value)) - (let [blank (symbol$ ["" ""])] + (let [blank (: AST [["" -1 -1] (#;SymbolS ["" ""])])] (#;Right [state (@list (` (;_lux_lambda (~ blank) (~ blank) (~ value))))])) _ diff --git a/source/lux/data/list.lux b/source/lux/data/list.lux index b2049d419..0da0b3ecb 100644 --- a/source/lux/data/list.lux +++ b/source/lux/data/list.lux @@ -11,8 +11,7 @@ (ord #as O) (fold #as f)) (data (number (int #open ("i" Int/Number Int/Ord))) - bool) - meta/macro)) + bool))) ## [Types] ## (deftype (List a) diff --git a/source/lux/data/maybe.lux b/source/lux/data/maybe.lux index 2db3d768d..1303270a7 100644 --- a/source/lux/data/maybe.lux +++ b/source/lux/data/maybe.lux @@ -4,11 +4,9 @@ ## You can obtain one at http://mozilla.org/MPL/2.0/. (;import lux - (lux (meta macro) - (control (monoid #as m #refer #all) + (lux (control (monoid #as m #refer #all) (functor #as F #refer #all) - (monad #as M #refer #all))) - (.. list)) + (monad #as M #refer #all)))) ## [Types] ## (deftype (Maybe a) diff --git a/source/lux/data/text.lux b/source/lux/data/text.lux index f701f6079..3fad6c7aa 100644 --- a/source/lux/data/text.lux +++ b/source/lux/data/text.lux @@ -4,8 +4,7 @@ ## You can obtain one at http://mozilla.org/MPL/2.0/. (;import lux - (lux (meta macro) - (control (monoid #as m) + (lux (control (monoid #as m) (eq #as E) (ord #as O) (show #as S) diff --git a/source/lux/meta/lux.lux b/source/lux/meta/lux.lux index dd14e708d..a34f92253 100644 --- a/source/lux/meta/lux.lux +++ b/source/lux/meta/lux.lux @@ -4,8 +4,7 @@ ## You can obtain one at http://mozilla.org/MPL/2.0/. (;import lux - (.. macro - ast) + (.. ast) (lux/control (monoid #as m) (functor #as F) (monad #as M #refer (#only do)) diff --git a/source/lux/meta/macro.lux b/source/lux/meta/macro.lux deleted file mode 100644 index f554f45b4..000000000 --- a/source/lux/meta/macro.lux +++ /dev/null @@ -1,28 +0,0 @@ -## Copyright (c) Eduardo Julian. All rights reserved. -## This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. -## If a copy of the MPL was not distributed with this file, -## You can obtain one at http://mozilla.org/MPL/2.0/. - -(;import lux) - -## [Syntax] -(def #export (defmacro tokens state) - Macro - (case tokens - (#;Cons [[_ (#;FormS (#;Cons [name args]))] (#;Cons [body #;Nil])]) - (#;Right [state (#;Cons [(` ((~ [["" -1 -1] (#;SymbolS ["lux" "def"])]) ((~ name) (~@ args)) - (~ [["" -1 -1] (#;SymbolS ["lux" "Macro"])]) - (~ body))) - (#;Cons [(` ((~ [["" -1 -1] (#;SymbolS ["" "_lux_declare-macro"])]) (~ name))) - #;Nil])])]) - - (#;Cons [[_ (#;TagS ["" "export"])] (#;Cons [[_ (#;FormS (#;Cons [name args]))] (#;Cons [body #;Nil])])]) - (#;Right [state (#;Cons [(` ((~ [["" -1 -1] (#;SymbolS ["lux" "def"])]) (~ [["" -1 -1] (#;TagS ["" "export"])]) ((~ name) (~@ args)) - (~ [["" -1 -1] (#;SymbolS ["lux" "Macro"])]) - (~ body))) - (#;Cons [(` ((~ [["" -1 -1] (#;SymbolS ["" "_lux_declare-macro"])]) (~ name))) - #;Nil])])]) - - _ - (#;Left "Wrong syntax for defmacro"))) -(_lux_declare-macro defmacro) diff --git a/source/lux/meta/syntax.lux b/source/lux/meta/syntax.lux index 3bc3196e2..3d62bba2e 100644 --- a/source/lux/meta/syntax.lux +++ b/source/lux/meta/syntax.lux @@ -4,8 +4,7 @@ ## You can obtain one at http://mozilla.org/MPL/2.0/. (;import lux - (.. (macro #as m #refer #all) - ast + (.. ast (lux #as l #refer (#only Lux/Monad gensym))) (lux (control (functor #as F) (monad #as M #refer (#only do)) |