diff options
author | Masaya Tojo <masaya@tojo.tokyo> | 2024-06-13 02:11:07 +0900 |
---|---|---|
committer | Masaya Tojo <masaya@tojo.tokyo> | 2024-06-13 02:11:07 +0900 |
commit | ca1584a5c87c2952af08c74ce80b1cb2a75a1d19 (patch) | |
tree | 6a6f5ebde7bb00f8bd74501ecac563c5a1dc51f6 | |
parent | 653b204b583da363a97464960a00f1bd0dbed865 (diff) |
Rename modules from (<feature name> ... make) to (<feature name>)
-rw-r--r-- | algebraic-structures.alternative.scm (renamed from algebraic-structures.alternative.make.scm) | 2 | ||||
-rw-r--r-- | algebraic-structures.applicative.scm (renamed from algebraic-structures.applicative.make.scm) | 2 | ||||
-rw-r--r-- | algebraic-structures.foldable.scm (renamed from algebraic-structures.foldable.make.scm) | 2 | ||||
-rw-r--r-- | algebraic-structures.functor.make.scm | 3 | ||||
-rw-r--r-- | algebraic-structures.functor.scm | 3 | ||||
-rw-r--r-- | algebraic-structures.group.scm (renamed from algebraic-structures.group.make.scm) | 2 | ||||
-rw-r--r-- | algebraic-structures.monad.scm (renamed from algebraic-structures.monad.make.scm) | 2 | ||||
-rw-r--r-- | algebraic-structures.monoid.fold.scm | 4 | ||||
-rw-r--r-- | algebraic-structures.monoid.make.fold.scm | 4 | ||||
-rw-r--r-- | algebraic-structures.monoid.make.scm | 3 | ||||
-rw-r--r-- | algebraic-structures.monoid.scm | 3 | ||||
-rw-r--r-- | examples/optional.scm | 12 | ||||
-rw-r--r-- | examples/state.scm | 12 | ||||
-rw-r--r-- | tests/run.scm | 34 |
14 files changed, 44 insertions, 44 deletions
diff --git a/algebraic-structures.alternative.make.scm b/algebraic-structures.alternative.scm index 29f8352..c397304 100644 --- a/algebraic-structures.alternative.make.scm +++ b/algebraic-structures.alternative.scm @@ -1,4 +1,4 @@ -(functor ((algebraic-structures alternative make) (A (pure map map2 alt empty))) +(functor ((algebraic-structures alternative) (A (pure map map2 alt empty))) (pure map map2 alt empty guard) (import (except scheme map apply) (only (chicken base) void) diff --git a/algebraic-structures.applicative.make.scm b/algebraic-structures.applicative.scm index 10a5663..ac3028a 100644 --- a/algebraic-structures.applicative.make.scm +++ b/algebraic-structures.applicative.scm @@ -1,4 +1,4 @@ -(functor ((algebraic-structures applicative make) (A (pure map map2))) +(functor ((algebraic-structures applicative) (A (pure map map2))) (pure map map2 map* apply) (import (rename scheme (map scheme:map) (apply scheme:apply)) (only (chicken base) sub1 add1 foldl case-lambda) diff --git a/algebraic-structures.foldable.make.scm b/algebraic-structures.foldable.scm index 197eb48..3ab1f6e 100644 --- a/algebraic-structures.foldable.make.scm +++ b/algebraic-structures.foldable.scm @@ -1,4 +1,4 @@ -(functor ((algebraic-structures foldable make) (F (foldl foldr))) +(functor ((algebraic-structures foldable) (F (foldl foldr))) (foldl foldr length find any every ->list) (import (except scheme length) F (only (chicken base) add1 call/cc)) diff --git a/algebraic-structures.functor.make.scm b/algebraic-structures.functor.make.scm deleted file mode 100644 index c095717..0000000 --- a/algebraic-structures.functor.make.scm +++ /dev/null @@ -1,3 +0,0 @@ -(functor ((algebraic-structures functor make) (F (map))) - (map) - (import F)) diff --git a/algebraic-structures.functor.scm b/algebraic-structures.functor.scm new file mode 100644 index 0000000..70d5496 --- /dev/null +++ b/algebraic-structures.functor.scm @@ -0,0 +1,3 @@ +(functor ((algebraic-structures functor) (F (map))) + (map) + (import F)) diff --git a/algebraic-structures.group.make.scm b/algebraic-structures.group.scm index 7568ac9..6e38eaf 100644 --- a/algebraic-structures.group.make.scm +++ b/algebraic-structures.group.scm @@ -1,4 +1,4 @@ -(functor ((algebraic-structures group make) (M (<> unit inv))) +(functor ((algebraic-structures group) (M (<> unit inv))) (<> unit inv pow) (import M scheme diff --git a/algebraic-structures.monad.make.scm b/algebraic-structures.monad.scm index b06b908..fd5ff82 100644 --- a/algebraic-structures.monad.make.scm +++ b/algebraic-structures.monad.scm @@ -1,4 +1,4 @@ -(functor ((algebraic-structures monad make) (M (pure map map2 >>=))) +(functor ((algebraic-structures monad) (M (pure map map2 >>=))) (pure map map2 >>= do) (import (rename scheme (map scheme:map) (do scheme:do)) M) diff --git a/algebraic-structures.monoid.fold.scm b/algebraic-structures.monoid.fold.scm new file mode 100644 index 0000000..b18c03c --- /dev/null +++ b/algebraic-structures.monoid.fold.scm @@ -0,0 +1,4 @@ +(functor ((algebraic-structures monoid fold) (M (<> unit)) (F (foldl foldr))) (fold) + (import scheme M F) + + (define (fold x) (foldl <> unit x))) diff --git a/algebraic-structures.monoid.make.fold.scm b/algebraic-structures.monoid.make.fold.scm deleted file mode 100644 index 0334ab6..0000000 --- a/algebraic-structures.monoid.make.fold.scm +++ /dev/null @@ -1,4 +0,0 @@ -(functor ((algebraic-structures monoid make fold) (M (<> unit)) (F (foldl foldr))) (fold) - (import scheme M F) - - (define (fold x) (foldl <> unit x))) diff --git a/algebraic-structures.monoid.make.scm b/algebraic-structures.monoid.make.scm deleted file mode 100644 index 58575ba..0000000 --- a/algebraic-structures.monoid.make.scm +++ /dev/null @@ -1,3 +0,0 @@ -(functor ((algebraic-structures monoid make) (F (<> unit))) - (<> unit) - (import F)) diff --git a/algebraic-structures.monoid.scm b/algebraic-structures.monoid.scm new file mode 100644 index 0000000..936d0f1 --- /dev/null +++ b/algebraic-structures.monoid.scm @@ -0,0 +1,3 @@ +(functor ((algebraic-structures monoid) (F (<> unit))) + (<> unit) + (import F)) diff --git a/examples/optional.scm b/examples/optional.scm index ff444de..a15fe16 100644 --- a/examples/optional.scm +++ b/examples/optional.scm @@ -46,13 +46,13 @@ [($ opt:<some> x) (f x)] [($ opt:<none>) (opt:none)]))) -(import (only (algebraic-structures functor make)) - (only (algebraic-structures applicative make)) - (only (algebraic-structures monad make))) +(import (only (algebraic-structures functor)) + (only (algebraic-structures applicative)) + (only (algebraic-structures monad))) -(module (data optional functor) = ((algebraic-structures functor make) (data optional monad base))) -(module (data optional applicative) = ((algebraic-structures applicative make) (data optional monad base))) -(module (data optional monad) = ((algebraic-structures monad make) (data optional monad base))) +(module (data optional functor) = ((algebraic-structures functor) (data optional monad base))) +(module (data optional applicative) = ((algebraic-structures applicative) (data optional monad base))) +(module (data optional monad) = ((algebraic-structures monad) (data optional monad base))) (import (prefix (data optional) opt:) (prefix (data optional functor) opt:) diff --git a/examples/state.scm b/examples/state.scm index b1aedc6..21efc1b 100644 --- a/examples/state.scm +++ b/examples/state.scm @@ -35,12 +35,12 @@ [(x* . st**) ((f x) st*)]) (cons x* st**))))) -(import (only (algebraic-structures functor make)) - (only (algebraic-structures applicative make)) - (only (algebraic-structures monad make))) -(module (data state functor) = ((algebraic-structures functor make) (data state))) -(module (data state applicative) = ((algebraic-structures applicative make) (data state))) -(module (data state monad) = ((algebraic-structures monad make) (data state))) +(import (only (algebraic-structures functor)) + (only (algebraic-structures applicative)) + (only (algebraic-structures monad))) +(module (data state functor) = ((algebraic-structures functor) (data state))) +(module (data state applicative) = ((algebraic-structures applicative) (data state))) +(module (data state monad) = ((algebraic-structures monad) (data state))) (import (prefix (data state) st:) (prefix (data state functor) st:) diff --git a/tests/run.scm b/tests/run.scm index 2a5c941..0d76cda 100644 --- a/tests/run.scm +++ b/tests/run.scm @@ -4,9 +4,9 @@ (test-begin "monoid") -(import (algebraic-structures monoid make)) +(import (algebraic-structures monoid)) -(module (mod7 monoid) = (algebraic-structures monoid make) +(module (mod7 monoid) = (algebraic-structures monoid) (import scheme (chicken module) (chicken base)) @@ -31,8 +31,8 @@ (test-begin "group") -(import (algebraic-structures group make)) -(module (mod7 group) = (algebraic-structures group make) +(import (algebraic-structures group)) +(module (mod7 group) = (algebraic-structures group) (import scheme (chicken base) (chicken module) @@ -67,9 +67,9 @@ (test-begin "foldable") -(import (algebraic-structures foldable make)) +(import (algebraic-structures foldable)) -(module (data list foldable) = (algebraic-structures foldable make) +(module (data list foldable) = (algebraic-structures foldable) (import (chicken module)) (reexport (only (chicken base) foldl foldr))) @@ -97,7 +97,7 @@ (test-begin "monoid.fold") -(module (product monoid) = (algebraic-structures monoid make) +(module (product monoid) = (algebraic-structures monoid) (import scheme (chicken base) (chicken module)) @@ -112,8 +112,8 @@ (define unit 1)) -(import (algebraic-structures monoid make fold)) -(module (product fold) = ((algebraic-structures monoid make fold) (product monoid) (data list foldable))) +(import (algebraic-structures monoid fold)) +(module (product fold) = ((algebraic-structures monoid fold) (product monoid) (data list foldable))) (import (prefix (product monoid) product:)) (import (prefix (product fold) product:)) @@ -124,8 +124,8 @@ (test-begin "functor") -(import (algebraic-structures functor make)) -(module (data list functor) = (algebraic-structures functor make) +(import (algebraic-structures functor)) +(module (data list functor) = (algebraic-structures functor) (import scheme (chicken module)) (export map)) @@ -137,8 +137,8 @@ (test-begin "applicative") -(import (algebraic-structures applicative make)) -(module (data list applicative) = (algebraic-structures applicative make) +(import (algebraic-structures applicative)) +(module (data list applicative) = (algebraic-structures applicative) (import (except scheme map) (chicken module) (srfi 1) @@ -185,8 +185,8 @@ (test-begin "monad") -(import (algebraic-structures monad make)) -(module (data list monad) = (algebraic-structures monad make) +(import (algebraic-structures monad)) +(module (data list monad) = (algebraic-structures monad) (import (except scheme map) (chicken module) (srfi 1)) @@ -215,8 +215,8 @@ (test-begin "alternative") -(import (algebraic-structures alternative make)) -(module (data list alternative) = (algebraic-structures alternative make) +(import (algebraic-structures alternative)) +(module (data list alternative) = (algebraic-structures alternative) (import (except scheme map) (chicken module) (chicken base) |