Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

CHICKEN Packaging #2

Merged
7 changes: 6 additions & 1 deletion .gitignore
@@ -1 +1,6 @@
*~
*~
*.swp
*.import.scm
*.so
*.types
salmonella.log
19 changes: 19 additions & 0 deletions LICENSE
@@ -0,0 +1,19 @@
Copyright (C) John Cowan (2016). All Rights Reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
32 changes: 32 additions & 0 deletions README.md
@@ -0,0 +1,32 @@
# SRFI 128 - Comparators (reduced)

This repository hosts a reference implementation of SRFI 128 - Comparators
(reduced). The full documentation for this SRFI can be found on the [SRFI
Document Reference](http://srfi.schemers.org/srfi-128/). The repository hosts a
complete implementation of the SRFI, running on [CHICKEN](http://call-cc.org)
Scheme.

## File Description

While this repository is primarily to provide a reference implementation of
SRFI 128, it also currently serves as the base repository to host the library
as a CHICKEN extension (egg). Thus, there are three files that are independent
of the SRFI itself, and are as follows:

`srfi-128.meta` : This file denotes metadata about the CHICKEN extension, such
as author, license, and dependencies (and dependencies for tests).

`srfi-128.setup` : This file tells the CHICKEN package manager
(`chicken-install`) how to build the egg.

`srfi-128.release-info` : Describes the URL / different releases of the CHICKEN
extension.

Additionally, the `tests/` directory has been added to accommodate the CHICKEN
package manager (for running tests). Currently it provides a default test
runner which merely includes the tests found in the `ilists/` directory.

## License

Provided under a single clause BSD license, Copyright (C) John Cowan 2016. See
LICENSE for full details.
5 changes: 2 additions & 3 deletions comparators/comparators-test.scm
@@ -1,6 +1,6 @@
(use test)
(use comparators)
(load "r7rs-shim.scm")
(use srfi-128)
(load "../comparators/r7rs-shim.scm")

(define (print x) (display x) (newline))

Expand Down Expand Up @@ -250,7 +250,6 @@
(test-assert (exact-integer? (hash-bound)))
(test-assert (exact-integer? (hash-salt)))
(test-assert (< (hash-salt) (hash-bound)))
(test (hash-salt) (fake-salt-hash #t))
) ; end comparators/bound-salt

) ; end comparators
Expand Down
13 changes: 0 additions & 13 deletions comparators/comparators.meta

This file was deleted.

10 changes: 5 additions & 5 deletions comparators/comparators.scm
Expand Up @@ -2,7 +2,7 @@
(safe-globals)
(specialize))

(module comparators ()
(module srfi-128 ()
(import scheme)
(import (only chicken use export include case-lambda error define-record-type
make-parameter parameterize : define-type))
Expand All @@ -18,7 +18,7 @@
(export =? <? >? <=? >=?)
(export comparator-if<=>)
(export comparator-type-test-predicate comparator-equality-predicate
comparator-ordering-predicate comparator-hash-function)
comparator-ordering-predicate comparator-hash-function)
(use numbers)
(use srfi-4)
(use srfi-13)
Expand All @@ -27,9 +27,9 @@
(define-type :comparison-test: (procedure (* *) boolean))
(define-type :hash-code: fixnum)
(define-type :hash-function: (procedure (*) :hash-code:))
(include "r7rs-shim.scm")
(include "comparators-impl.scm")
(include "default.scm")
(include "comparators/r7rs-shim.scm")
(include "comparators/comparators-impl.scm")
(include "comparators/default.scm")
;; Chicken type declarations
(: comparator? (* --> boolean : :comparator:))
(: comparator-type-test-predicate (:comparator: --> :type-test:))
Expand Down
10 changes: 0 additions & 10 deletions comparators/comparators.setup

This file was deleted.

21 changes: 21 additions & 0 deletions srfi-128.meta
@@ -0,0 +1,21 @@
;; -*- Hen -*-

((egg "srfi-128.egg")
; List of files that should be bundled alongside egg
(files "comparators"
"tests"
"srfi-128.setup"
"srfi-128.meta"
"srfi-128.release-info"
"LICENSE"
"README.md")

(license "BSD")
(category data)
(depends numbers)
(test-depends test)
(author "John Cowan, Egg by Jörg F. Wittenberger / Jeremy Steward")
(synopsis "SRFI-128: Comparators (reduced)")
(email "cowan@ccil.org")
(repo "https://github.com/scheme-requests-for-implementation/srfi-128")
(version "0.1"))
3 changes: 3 additions & 0 deletions srfi-128.release-info
@@ -0,0 +1,3 @@
(repo git "git://github.com/scheme-requests-for-implementation/srfi-128.git")
(uri targz "https://codeload.github.com/scheme-requests-for-implementation/srfi-128/tar.gz/CHICKEN-{egg-release}")
(release "0.1")
10 changes: 10 additions & 0 deletions srfi-128.setup
@@ -0,0 +1,10 @@
;; -*- Hen -*-

(compile -O3 -d2 -s -J -emit-type-file "srfi-128.types" "comparators/comparators.scm")
(compile -O3 -d0 -s "comparators/comparators.scm" -unit srfi-128)
(compile -s -O2 -d0 "srfi-128.import.scm")

(install-extension
'srfi-128
'("srfi-128.types" "srfi-128.so" "srfi-128.import.so")
'((version "0.1")))
1 change: 1 addition & 0 deletions tests/run.scm
@@ -0,0 +1 @@
(include "../comparators/comparators-test.scm")