summaryrefslogtreecommitdiff
path: root/monad
diff options
context:
space:
mode:
authorrekado <rekado@elephly.net>2014-10-30 20:22:54 +0100
committerrekado <rekado@elephly.net>2014-10-30 20:22:54 +0100
commit77cb84cd32cf8e4e7645c25bc580ceec7921eec5 (patch)
tree75f91e66f75f6e14f5606ef48f24984a92126785 /monad
parent55c479f841df1db6400802b7953de833b6fc038d (diff)
rename 'with-monad:' to 'with-monad'HEADmaster
Diffstat (limited to 'monad')
-rw-r--r--monad/core.scm12
-rw-r--r--monad/either.scm2
-rw-r--r--monad/maybe.scm2
-rw-r--r--monad/state.scm2
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))