aboutsummaryrefslogtreecommitdiff
path: root/source/lux.lux
diff options
context:
space:
mode:
authorEduardo Julian2015-08-03 19:54:53 -0400
committerEduardo Julian2015-08-03 19:54:53 -0400
commitddc471806fba8fe179d52b4781f0a66d871b5e99 (patch)
tree4f749d0135a22a69ea742eb7b03ac740a993ee69 /source/lux.lux
parent90399879ee7cc61e6333f7e81141441d32fcdb2e (diff)
- Type definitions inside the compiler data now hold the type itself.
- Value definitions inside the compiler data now hold the value itself. - Fixed a few bugs.
Diffstat (limited to 'source/lux.lux')
-rw-r--r--source/lux.lux24
1 files changed, 17 insertions, 7 deletions
diff --git a/source/lux.lux b/source/lux.lux
index 3670a9e52..d3dd374d5 100644
--- a/source/lux.lux
+++ b/source/lux.lux
@@ -220,14 +220,16 @@
#Nil])])])))
## (deftype (DefData' m)
-## (| #TypeD
-## (#ValueD Type)
+## (| (#TypeD Type)
+## (#ValueD (, Type Unit))
## (#MacroD m)
## (#AliasD Ident)))
(_lux_def DefData'
(#AllT [(#Some #Nil) "lux;DefData'" ""
- (#VariantT (#Cons [["lux;TypeD" (#TupleT #Nil)]
- (#Cons [["lux;ValueD" Type]
+ (#VariantT (#Cons [["lux;TypeD" Type]
+ (#Cons [["lux;ValueD" (#TupleT (#Cons [Type
+ (#Cons [Unit
+ #Nil])]))]
(#Cons [["lux;MacroD" (#BoundT "")]
(#Cons [["lux;AliasD" Ident]
#Nil])])])]))]))
@@ -1710,7 +1712,7 @@
(_lux_case pattern
(#Meta _ (#FormS (#Cons (#Meta _ (#SymbolS macro-name)) macro-args)))
(do Lux/Monad
- [expansion (macro-expand-all (form$ (list& (symbol$ macro-name) body macro-args)))
+ [expansion (macro-expand (form$ (list& (symbol$ macro-name) body macro-args)))
expansions (map% Lux/Monad expander (as-pairs expansion))]
(;return (list:join expansions)))
@@ -2621,8 +2623,8 @@
(#Some _ def-data)
(case def-data
- #TypeD (#Some Type)
- (#ValueD type) (#Some type)
+ (#TypeD _) (#Some Type)
+ (#ValueD [type _]) (#Some type)
(#MacroD m) (#Some Macro)
(#AliasD name') (find-in-defs name' state))))))
## (def (find-in-defs name state)
@@ -3048,3 +3050,11 @@
_
(fail "Wrong syntax for loop")))
+
+## (defmacro #export (extend tokens)
+## (case tokens
+## (\ (list (#Meta _ (#SymbolS name))))
+
+
+## _
+## (fail "Wrong syntax for extend")))