Skip to content

Commit

Permalink
Update library (srfi 45) to not depend on (scheme r4rs essential)
Browse files Browse the repository at this point in the history
Signed-off-by: yamacir-kit <[email protected]>
  • Loading branch information
yamacir-kit committed Oct 2, 2023
1 parent 37f3396 commit c013be4
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ Procedures for each standard are provided by the following R7RS-style libraries:
cmake -B build -DCMAKE_BUILD_TYPE=Release
cd build
make package
sudo apt install build/meevax_0.5.1_amd64.deb
sudo apt install build/meevax_0.5.2_amd64.deb
```

or
Expand Down Expand Up @@ -131,9 +131,9 @@ sudo rm -rf /usr/local/share/meevax

| Target Name | Description
|-------------|-------------
| `all` | Build shared-library `libmeevax.0.5.1.so` and executable `meevax`
| `all` | Build shared-library `libmeevax.0.5.2.so` and executable `meevax`
| `test` | Test executable `meevax`
| `package` | Generate debian package `meevax_0.5.1_amd64.deb`
| `package` | Generate debian package `meevax_0.5.2_amd64.deb`
| `install` | Copy files into `/usr/local` directly

## Usage
Expand All @@ -158,7 +158,7 @@ See [LICENSE](./LICENSE).
## References

| Authors | Year | Title | Journal Title / Publisher | Pages |
|-------------------------------------------------------------------------------------------------------|:----:|-------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|
|-------------------------------------------------------------------------------------------------------|:----:|-------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------:|
| <a id="McCarthy-1960" ></a> John McCarthy | 1960 | [Recursive functions of symbolic expressions and their computation by machine, Part I](https://dl.acm.org/doi/10.1145/367177.367199) | [Communications of the ACM, Volume 3, Issue 4](https://dl.acm.org/toc/cacm/1960/3/4) | 184&#x2011;195 |
| <a id="Landin-1964" ></a> P. J. Landin | 1964 | [The Mechanical Evaluation of Expressions](https://academic.oup.com/comjnl/article/6/4/308/375725) | [The Computor Journal, Volume 6, Issue 4](https://academic.oup.com/comjnl/issue/6/4) | 308&#x2011;320 |
| <a id="Henderson-1980" ></a> Peter Henderson | 1980 | [Functional Programming: Application and Implementation](https://archive.org/details/functionalprogra0000hend/mode/2up) | Prentice Hall | |
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.5.1
0.5.2
12 changes: 8 additions & 4 deletions basis/srfi-45.ss
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
(define-library (srfi 45) ; Based on r7rs reference implementation.
(import (only (meevax core) define-syntax)
(import (only (meevax boolean) not)
(only (meevax comparator) eq?)
(only (meevax core) define define-syntax if lambda quote)
(only (meevax list) list)
(only (meevax macro-transformer) er-macro-transformer)
(scheme r4rs essential))
(only (meevax pair) pair? cons car cdr cadr cddr set-car! set-cdr!))

(export delay eager force lazy promise?)

Expand All @@ -11,8 +14,9 @@
(cons <promise> (cons done? value)))

(define (promise? x)
(and (pair? x)
(eq? <promise> (car x))))
(if (pair? x)
(eq? <promise> (car x))
#f))

(define promise-done? cadr)

Expand Down
2 changes: 1 addition & 1 deletion configure/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ See [LICENSE](./LICENSE).
## References

| Authors | Year | Title | Journal Title / Publisher | Pages |
|-------------------------------------------------------------------------------------------------------|:----:|-------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|----------------|
|-------------------------------------------------------------------------------------------------------|:----:|-------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------:|
| <a id="McCarthy-1960" ></a> John McCarthy | 1960 | [Recursive functions of symbolic expressions and their computation by machine, Part I](https://dl.acm.org/doi/10.1145/367177.367199) | [Communications of the ACM, Volume 3, Issue 4](https://dl.acm.org/toc/cacm/1960/3/4) | 184&#x2011;195 |
| <a id="Landin-1964" ></a> P. J. Landin | 1964 | [The Mechanical Evaluation of Expressions](https://academic.oup.com/comjnl/article/6/4/308/375725) | [The Computor Journal, Volume 6, Issue 4](https://academic.oup.com/comjnl/issue/6/4) | 308&#x2011;320 |
| <a id="Henderson-1980" ></a> Peter Henderson | 1980 | [Functional Programming: Application and Implementation](https://archive.org/details/functionalprogra0000hend/mode/2up) | Prentice Hall | |
Expand Down

0 comments on commit c013be4

Please sign in to comment.