aboutsummaryrefslogtreecommitdiff
path: root/make
diff options
context:
space:
mode:
authorJoel Martin <github@martintribe.org>2014-04-01 23:12:33 -0500
committerJoel Martin <github@martintribe.org>2014-04-01 23:12:33 -0500
commit1617910ad342a55762f3ddabb975849d843cff85 (patch)
tree7d5ec5c3865370fa3cf477b772a79a7b9c6dc109 /make
parent7e872ecfc0b00c3675d64b748a5f1e8754c85b7e (diff)
downloadmal-1617910ad342a55762f3ddabb975849d843cff85.tar.gz
mal-1617910ad342a55762f3ddabb975849d843cff85.zip
All: remove slurp-do, use str around slurp instead.
Diffstat (limited to 'make')
-rw-r--r--make/step6_file.mk4
-rw-r--r--make/step7_quote.mk4
-rw-r--r--make/step8_macros.mk4
-rw-r--r--make/step9_interop.mk4
-rw-r--r--make/stepA_more.mk4
5 files changed, 5 insertions, 15 deletions
diff --git a/make/step6_file.mk b/make/step6_file.mk
index da6de04..0c72a9c 100644
--- a/make/step6_file.mk
+++ b/make/step6_file.mk
@@ -110,13 +110,11 @@ $(call _ref,read-string,$(call function,$$(call READ_STR,$$(1))))
$(call _ref,eval,$(call function,$$(call EVAL,$$(1),$$(REPL_ENV))))
_slurp = $(call string,$(call _read_file,$(1)))
-_slurp_do = $(call string,(do $(call _read_file,$(1))))
$(call _ref,slurp,$(call function,$$(call _slurp,$$(call str_decode,$$($$(1)_value)))))
-$(call _ref,slurp-do,$(call function,$$(call _slurp_do,$$(call str_decode,$$($$(1)_value)))))
# Defined in terms of the language itself
$(call do,$(call REP, (def! not (fn* (a) (if a false true))) ))
-$(call do,$(call REP, (def! load-file (fn* (f) (eval (read-string (slurp-do f))))) ))
+$(call do,$(call REP, (def! load-file (fn* (f) (eval (read-string (str "(do " (slurp f) ")"))))) ))
# Load and eval any files specified on the command line
$(if $(MAKECMDGOALS),\
diff --git a/make/step7_quote.mk b/make/step7_quote.mk
index a8695da..2a14c11 100644
--- a/make/step7_quote.mk
+++ b/make/step7_quote.mk
@@ -127,13 +127,11 @@ $(call _ref,read-string,$(call function,$$(call READ_STR,$$(1))))
$(call _ref,eval,$(call function,$$(call EVAL,$$(1),$$(REPL_ENV))))
_slurp = $(call string,$(call _read_file,$(1)))
-_slurp_do = $(call string,(do $(call _read_file,$(1))))
$(call _ref,slurp,$(call function,$$(call _slurp,$$(call str_decode,$$($$(1)_value)))))
-$(call _ref,slurp-do,$(call function,$$(call _slurp_do,$$(call str_decode,$$($$(1)_value)))))
# Defined in terms of the language itself
$(call do,$(call REP, (def! not (fn* (a) (if a false true))) ))
-$(call do,$(call REP, (def! load-file (fn* (f) (eval (read-string (slurp-do f))))) ))
+$(call do,$(call REP, (def! load-file (fn* (f) (eval (read-string (str "(do " (slurp f) ")"))))) ))
# Load and eval any files specified on the command line
$(if $(MAKECMDGOALS),\
diff --git a/make/step8_macros.mk b/make/step8_macros.mk
index 2b4e33b..910acb0 100644
--- a/make/step8_macros.mk
+++ b/make/step8_macros.mk
@@ -150,13 +150,11 @@ $(call _ref,read-string,$(call function,$$(call READ_STR,$$(1))))
$(call _ref,eval,$(call function,$$(call EVAL,$$(1),$$(REPL_ENV))))
_slurp = $(call string,$(call _read_file,$(1)))
-_slurp_do = $(call string,(do $(call _read_file,$(1))))
$(call _ref,slurp,$(call function,$$(call _slurp,$$(call str_decode,$$($$(1)_value)))))
-$(call _ref,slurp-do,$(call function,$$(call _slurp_do,$$(call str_decode,$$($$(1)_value)))))
# Defined in terms of the language itself
$(call do,$(call REP, (def! not (fn* (a) (if a false true))) ))
-$(call do,$(call REP, (def! load-file (fn* (f) (eval (read-string (slurp-do f))))) ))
+$(call do,$(call REP, (def! load-file (fn* (f) (eval (read-string (str "(do " (slurp f) ")"))))) ))
# Load and eval any files specified on the command line
$(if $(MAKECMDGOALS),\
diff --git a/make/step9_interop.mk b/make/step9_interop.mk
index a3d2b5e..6de228d 100644
--- a/make/step9_interop.mk
+++ b/make/step9_interop.mk
@@ -154,13 +154,11 @@ $(call _ref,read-string,$(call function,$$(call READ_STR,$$(1))))
$(call _ref,eval,$(call function,$$(call EVAL,$$(1),$$(REPL_ENV))))
_slurp = $(call string,$(call _read_file,$(1)))
-_slurp_do = $(call string,(do $(call _read_file,$(1))))
$(call _ref,slurp,$(call function,$$(call _slurp,$$(call str_decode,$$($$(1)_value)))))
-$(call _ref,slurp-do,$(call function,$$(call _slurp_do,$$(call str_decode,$$($$(1)_value)))))
# Defined in terms of the language itself
$(call do,$(call REP, (def! not (fn* (a) (if a false true))) ))
-$(call do,$(call REP, (def! load-file (fn* (f) (eval (read-string (slurp-do f))))) ))
+$(call do,$(call REP, (def! load-file (fn* (f) (eval (read-string (str "(do " (slurp f) ")"))))) ))
# Load and eval any files specified on the command line
$(if $(MAKECMDGOALS),\
diff --git a/make/stepA_more.mk b/make/stepA_more.mk
index ec32d85..48c0cb2 100644
--- a/make/stepA_more.mk
+++ b/make/stepA_more.mk
@@ -170,15 +170,13 @@ $(call _ref,read-string,$(call function,$$(call READ_STR,$$(1))))
$(call _ref,eval,$(call function,$$(call EVAL,$$(1),$$(REPL_ENV))))
_slurp = $(call string,$(call _read_file,$(1)))
-_slurp_do = $(call string,(do $(call _read_file,$(1))))
$(call _ref,slurp,$(call function,$$(call _slurp,$$(call str_decode,$$($$(1)_value)))))
-$(call _ref,slurp-do,$(call function,$$(call _slurp_do,$$(call str_decode,$$($$(1)_value)))))
# Defined in terms of the language itself
$(call do,$(call REP, (def! not (fn* (a) (if a false true))) ))
$(call do,$(call REP, (defmacro! cond (fn* (& xs) (if (> (count xs) 0) (list 'if (first xs) (if (> (count xs) 1) (nth xs 1) (throw "odd number of forms to cond")) (cons 'cond (rest (rest xs))))))) ))
$(call do,$(call REP, (defmacro! or (fn* (& xs) (if (empty? xs) nil (if (= 1 (count xs)) (first xs) `(let* (or_FIXME ~(first xs)) (if or_FIXME or_FIXME (or ~@(rest xs)))))))) ))
-$(call do,$(call REP, (def! load-file (fn* (f) (eval (read-string (slurp-do f))))) ))
+$(call do,$(call REP, (def! load-file (fn* (f) (eval (read-string (str "(do " (slurp f) ")"))))) ))
# Load and eval any files specified on the command line
$(if $(MAKECMDGOALS),\