Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Make hello-schemer the primary branch #54

Open
wants to merge 27 commits into
base: hello-schemer
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
75f728f
Add LICENSE, and CONTRIBUTORS.md.
Nov 27, 2021
e9cba3e
Add (... unstable) version to a few library names
lassik Nov 27, 2021
d6c751e
Make our Chicken egg depend on the r7rs egg
lassik Nov 27, 2021
de9be92
Re-generate .egg
lassik Nov 27, 2021
6be1c1c
Fix bug in generate-wrappers
lassik Nov 27, 2021
04b6794
Depend on openssl and uri-generic eggs
lassik Nov 27, 2021
9e5ebcb
Import gemini client
lassik Nov 27, 2021
eb04d30
Make gemini client work
lassik Nov 27, 2021
196f315
Drop unneeded openssl import
lassik Nov 27, 2021
ae085ed
Grovel define-library for (include "...")
lassik Nov 29, 2021
27bc859
Spell 'lib-name' consistently
lassik Nov 29, 2021
e7203d9
Fill in source-dependencies for each egg component
lassik Nov 29, 2021
3e0938f
Omit srfi polyfills for Chicken egg
lassik Nov 29, 2021
4855d27
Grovel imports to fill in component-dependencies (#40)
lassik Nov 29, 2021
9c75018
Add unwind-protect for private use (#17)
lassik Nov 29, 2021
a15787d
Add SRFI 13 and 14 to egg deps
lassik Nov 29, 2021
d3fb980
Add string-split procedure
lassik Nov 29, 2021
c3526da
Refactor string->one-char-strings
lassik Nov 30, 2021
701b1cb
Update typecheck library
lassik Nov 30, 2021
3445a98
Add `unstable` suffix to (live port)
lassik Nov 30, 2021
87e4a39
Add `unstable` suffix to hash libraries
lassik Nov 30, 2021
335d25b
Add list<? procedure
lassik Nov 29, 2021
cd107a7
Fix bad test
lassik Nov 30, 2021
c7593f2
Add another test
lassik Nov 30, 2021
b4f4206
Check for dotted list
lassik Nov 30, 2021
75e9357
Add `unstable` suffix to (live vector)
lassik Nov 30, 2021
45328d0
Add vector<? procedure
lassik Nov 30, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update typecheck library
- Add `unstable` suffix.
- Add portable R7RS implementation.
- Add tests.
  • Loading branch information
lassik committed Dec 1, 2021
commit 701b1cbcaf65c5834a18ced07879ecbe50e3df23
9 changes: 0 additions & 9 deletions live/typecheck.r7rs.scm

This file was deleted.

7 changes: 0 additions & 7 deletions live/typecheck.sld

This file was deleted.

File renamed without changes.
11 changes: 11 additions & 0 deletions live/typecheck/live.r7rs.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
(define-syntax typecheck-bytevector
(syntax-rules ()
((_ who var)
(unless (bytevector? var)
(error "Not a bytevector" var 'who)))))

(define-syntax typecheck-string
(syntax-rules ()
((_ who var)
(unless (string? var)
(error "Not a string" var 'who)))))
9 changes: 9 additions & 0 deletions live/typecheck/unstable.sld
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
(define-library (live typecheck unstable)
(export typecheck-bytevector
typecheck-string)
(import (scheme base))
(cond-expand
(chicken
(include "live.chicken.scm"))
(else
(include "live.r7rs.scm"))))
21 changes: 21 additions & 0 deletions tests/typecheck.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
(import (scheme base)
(live typecheck unstable)
(live test))

(test-begin "live/typecheck")

(test-group "typecheck-bytevector"
(let ((foo (bytevector)))
(test-assert (begin (typecheck-bytevector just-testing foo)
#t)))
(let ((foo 123))
(test-error (typecheck-bytevector just-testing foo))))

(test-group "typecheck-string"
(let ((foo (string)))
(test-assert (begin (typecheck-string just-testing foo)
#t)))
(let ((foo 123))
(test-error (typecheck-string just-testing foo))))

(test-end)