diff --git a/README.rst b/README.rst index bd5e1bf..599f054 100644 --- a/README.rst +++ b/README.rst @@ -71,28 +71,28 @@ and execution will cease. .. code:: scheme - (include-lib "deps/calrissian/include/monads.lfe") + (include-lib "calrissian/include/monads.lfe") (defun dostuff () - (do-m (monad 'error) - (input <- (fetch-input)) ;; fetch-input -> (tuple 'ok result) | (tuple 'error reason) - (parsed <- (parse-input input)) ;; parse-input -> (tuple 'ok result) | (tuple 'error reason) - (store-data parsed))) ;; store-data -> 'ok | (tuple 'error reason) + (do-m (monad 'error) + (input <- (fetch-input)) ;; fetch-input -> (tuple 'ok result) | (tuple 'error reason) + (parsed <- (parse-input input)) ;; parse-input -> (tuple 'ok result) | (tuple 'error reason) + (store-data parsed))) ;; store-data -> 'ok | (tuple 'error reason) Without the error monad, the code might have looked like this: .. code:: scheme (defun dostuff () - (case (fetch-input) - ((tuple 'error reason) - (tuple 'error reason)) - ((tuple 'ok input) - (case (parse-input input) - ((tuple 'error reason) - (tuple 'error reason)) - ((tuple 'ok parsed) - (store-data parsed)))))) + (case (fetch-input) + ((tuple 'error reason) + (tuple 'error reason)) + ((tuple 'ok input) + (case (parse-input input) + ((tuple 'error reason) + (tuple 'error reason)) + ((tuple 'ok parsed) + (store-data parsed)))))) .. Links .. ----- diff --git a/resources/make/common.mk b/resources/make/common.mk index 2a2e4d9..e062f14 100644 --- a/resources/make/common.mk +++ b/resources/make/common.mk @@ -9,7 +9,7 @@ OUT_DIR = ./ebin TEST_DIR = ./test TEST_OUT_DIR = ./.eunit SCRIPT_PATH=$(DEPS)/lfe/bin:.:./bin:"$(PATH)":/usr/local/bin -ERL_LIBS=$(shell $(LFETOOL) info erllibs) +ERL_LIBS=$(shell pwd):$(shell $(LFETOOL) info erllibs) EMPTY = ifeq ($(shell which lfetool),$EMPTY) LFETOOL=$(BIN_DIR)/lfetool