diff options
Diffstat (limited to 'monad')
-rw-r--r-- | monad/core.scm | 12 | ||||
-rw-r--r-- | monad/either.scm | 2 | ||||
-rw-r--r-- | monad/maybe.scm | 2 | ||||
-rw-r--r-- | monad/state.scm | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/monad/core.scm b/monad/core.scm index 1e1252e..05d1a59 100644 --- a/monad/core.scm +++ b/monad/core.scm @@ -1,6 +1,6 @@ (define-module (monad core) #:use-module (srfi srfi-9) - #:export (make-monad with-monad: monad? monad-bind monad-return)) + #:export (make-monad with-monad monad? monad-bind monad-return)) (define-record-type monad (make-monad bind return) @@ -10,13 +10,13 @@ (define-syntax-parameter >>= (lambda (s) - (syntax-violation '>>= ">>= (bind) used outside of 'with-monad:'" s))) + (syntax-violation '>>= ">>= (bind) used outside of 'with-monad'" s))) (define-syntax-parameter return (lambda (s) - (syntax-violation 'return "return used outside of 'with-monad:'" s))) + (syntax-violation 'return "return used outside of 'with-monad'" s))) -(define-syntax with-monad: +(define-syntax with-monad (lambda (x) (syntax-case x (<-) ((_ monad action) @@ -28,10 +28,10 @@ (return (identifier-syntax (monad-return monad)))) (>>= action (lambda (res) - (with-monad: monad exp ...))))) + (with-monad monad exp ...))))) ((_ monad action exp ...) #'(syntax-parameterize ((>>= (identifier-syntax (monad-bind monad))) (return (identifier-syntax (monad-return monad)))) (>>= action (lambda (_) - (with-monad: monad exp ...)))))))) + (with-monad monad exp ...)))))))) diff --git a/monad/either.scm b/monad/either.scm index 91725b2..e52eaa4 100644 --- a/monad/either.scm +++ b/monad/either.scm @@ -2,7 +2,7 @@ #:use-module (monad core) #:use-module (srfi srfi-9) #:use-module (ice-9 match) - #:re-export (with-monad:) + #:re-export (with-monad) #:export (either-monad Left Right)) diff --git a/monad/maybe.scm b/monad/maybe.scm index fdf4de7..075d456 100644 --- a/monad/maybe.scm +++ b/monad/maybe.scm @@ -2,7 +2,7 @@ #:use-module (monad core) #:use-module (srfi srfi-9) #:use-module (ice-9 match) - #:re-export (with-monad:) + #:re-export (with-monad) #:export (maybe-monad Just just? from-just Nothing)) diff --git a/monad/state.scm b/monad/state.scm index 86a5c75..12275d1 100644 --- a/monad/state.scm +++ b/monad/state.scm @@ -1,6 +1,6 @@ (define-module (monad state) #:use-module (monad core) - #:re-export (with-monad:) + #:re-export (with-monad) #:export (state-monad run-state get put modify)) |