diff --git a/cyclone.scm b/cyclone.scm index 5be04c16..ba708900 100644 --- a/cyclone.scm +++ b/cyclone.scm @@ -1,9 +1,11 @@ -;; Cyclone Scheme -;; Copyright (c) 2014, Justin Ethier -;; All rights reserved. -;; -;; This module contains a front-end for the compiler itself. -;; +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module contains a front-end for the compiler itself. +;;;; (import (scheme base) (scheme case-lambda) (scheme eval) diff --git a/gc.c b/gc.c index 73f1fab6..a43405e6 100644 --- a/gc.c +++ b/gc.c @@ -1,5 +1,7 @@ /** * Cyclone Scheme + * https://github.com/justinethier/cyclone + * * Copyright (c) 2015-2016, Justin Ethier * All rights reserved. * diff --git a/generate-c.scm b/generate-c.scm index 955c5e96..30484acd 100644 --- a/generate-c.scm +++ b/generate-c.scm @@ -1,11 +1,13 @@ -;; Cyclone Scheme -;; Copyright (c) 2015, Justin Ethier -;; All rights reserved. -;; -;; This module automatically generates the following files: -;; -;; - dispatch.c => Used by apply to call native C functions. -;; +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module automatically generates the following files: +;;;; +;;;; - dispatch.c => Used by apply to call native C functions. +;;;; (import (scheme base) (scheme file) (scheme write)) diff --git a/icyc.scm b/icyc.scm index 5dadccf6..5f9fff28 100644 --- a/icyc.scm +++ b/icyc.scm @@ -1,9 +1,11 @@ -;; Cyclone Scheme -;; Copyright (c) 2014, Justin Ethier -;; All rights reserved. -;; -;; This module contains a simple Read-Eval-Print Loop -;; +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module contains a simple Read-Eval-Print Loop +;;;; (import (scheme cyclone common) (scheme base) (scheme char) diff --git a/runtime.c b/runtime.c index 07a06d55..a91f344a 100644 --- a/runtime.c +++ b/runtime.c @@ -1,5 +1,7 @@ /** * Cyclone Scheme + * https://github.com/justinethier/cyclone + * * Copyright (c) 2014-2016, Justin Ethier * All rights reserved. * diff --git a/scheme/base.sld b/scheme/base.sld index f1bb878d..d2798520 100644 --- a/scheme/base.sld +++ b/scheme/base.sld @@ -1,3 +1,11 @@ +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module contains the base library from r7rs. +;;;; (define-library (scheme base) ;; In the future, may include this here: (include "../srfi/9.scm") (export diff --git a/scheme/case-lambda.sld b/scheme/case-lambda.sld index 955c0c17..9a69af14 100644 --- a/scheme/case-lambda.sld +++ b/scheme/case-lambda.sld @@ -1,3 +1,8 @@ +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; A case-lambda implementation, based off the one from chibi scheme. +;;;; (define-library (scheme case-lambda) (import (scheme base)) (export diff --git a/scheme/char.sld b/scheme/char.sld index f336e4c8..5b0d7eb5 100644 --- a/scheme/char.sld +++ b/scheme/char.sld @@ -1,3 +1,11 @@ +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module contains the char library from r7rs. +;;;; (define-library (scheme char) (export char-alphabetic? diff --git a/scheme/cxr.sld b/scheme/cxr.sld index d0b8a2f6..dc58cf3d 100644 --- a/scheme/cxr.sld +++ b/scheme/cxr.sld @@ -1,3 +1,13 @@ +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; A stub for the cxr library from r7rs. +;;;; At least for now, the actual cxr functions are primitives in the runtime, +;;;; so this library does not need to be imported to use them. +;;;; (define-library (scheme cxr) (export caaaaar) (begin diff --git a/scheme/cyclone/cgen.sld b/scheme/cyclone/cgen.sld index a21d3885..efc02048 100644 --- a/scheme/cyclone/cgen.sld +++ b/scheme/cyclone/cgen.sld @@ -1,10 +1,11 @@ -;; -;; Cyclone Scheme -;; Copyright (c) 2014, Justin Ethier -;; All rights reserved. -;; -;; This module compiles scheme code to a Cheney-on-the-MTA C runtime. -;; +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module compiles scheme code to a Cheney-on-the-MTA C runtime. +;;;; (define-library (scheme cyclone cgen) (import (scheme base) (scheme char) diff --git a/scheme/cyclone/common.sld b/scheme/cyclone/common.sld index 57bf60e5..f4b22a94 100644 --- a/scheme/cyclone/common.sld +++ b/scheme/cyclone/common.sld @@ -1,3 +1,11 @@ +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module contains definitions used by the compiler and interpreter. +;;;; (define-library (scheme cyclone common) (export *Cyc-version-banner* diff --git a/scheme/cyclone/libraries.sld b/scheme/cyclone/libraries.sld index 063d58b5..88dff058 100644 --- a/scheme/cyclone/libraries.sld +++ b/scheme/cyclone/libraries.sld @@ -1,17 +1,18 @@ -;; -;; Cyclone Scheme -;; Copyright (c) 2014, Justin Ethier -;; All rights reserved. -;; -;; This module implements r7rs libraries. In our compiler, these are used to -;; encapsulate C modules. -;; -;; Initially, this a quicky-and-dirty (for now) implementation of r7rs libraries. -;; -;; TODO: go through functions and ensure consistent naming conventions. -;; probably should also clean up some of the function names, this is -;; not a very clean or nice API at the moment. -;; +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module implements r7rs libraries. In our compiler, these are used to +;;;; encapsulate C modules. +;;;; +;;;; Initially, this a quicky-and-dirty (for now) implementation of r7rs libraries. +;;;; +;;;; TODO: go through functions and ensure consistent naming conventions. +;;;; probably should also clean up some of the function names, this is +;;;; not a very clean or nice API at the moment. +;;;; (define-library (scheme cyclone libraries) (import (scheme base) (scheme read) diff --git a/scheme/cyclone/macros.sld b/scheme/cyclone/macros.sld index 197ae63c..a9af6be7 100644 --- a/scheme/cyclone/macros.sld +++ b/scheme/cyclone/macros.sld @@ -1,3 +1,11 @@ +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module contains code to deal with macros. +;;;; (define-library (scheme cyclone macros) (import (scheme base) (scheme write) ;; Debug only diff --git a/scheme/cyclone/transforms.sld b/scheme/cyclone/transforms.sld index 4e830418..9eb37c11 100644 --- a/scheme/cyclone/transforms.sld +++ b/scheme/cyclone/transforms.sld @@ -1,11 +1,12 @@ -;; -;; Cyclone Scheme -;; Copyright (c) 2014, Justin Ethier -;; All rights reserved. -;; -;; This module performs Scheme-to-Scheme transformations, and also contains -;; various utility functions used by the compiler. -;; +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module performs Scheme-to-Scheme transformations, and also contains +;;;; various utility functions used by the compiler. +;;;; (define-library (scheme cyclone transforms) (import (scheme base) diff --git a/scheme/cyclone/util.sld b/scheme/cyclone/util.sld index 05dd45d2..ede75b80 100644 --- a/scheme/cyclone/util.sld +++ b/scheme/cyclone/util.sld @@ -1,10 +1,11 @@ -;; -;; Cyclone Scheme -;; Copyright (c) 2015, Justin Ethier -;; All rights reserved. -;; -;; This module contains various utility functions. -;; +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module contains various utility functions. +;;;; (define-library (scheme cyclone util) (import (scheme base) (scheme char)) diff --git a/scheme/eval.sld b/scheme/eval.sld index d5354990..2c48cf29 100644 --- a/scheme/eval.sld +++ b/scheme/eval.sld @@ -1,10 +1,12 @@ -;; Cyclone Scheme -;; Copyright (c) 2014, Justin Ethier -;; All rights reserved. -;; -;; The Cyclone interpreter, based on the meta-circular evaluator from SICP 4.1: -;; http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-26.html#%_sec_4.1 -;; +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; The Cyclone interpreter, based on the meta-circular evaluator from SICP 4.1: +;;;; http://mitpress.mit.edu/sicp/full-text/book/book-Z-H-26.html#%_sec_4.1 +;;;; (define-library (scheme eval) (import (scheme cyclone util) diff --git a/scheme/file.sld b/scheme/file.sld index 510a67b2..7537cf2e 100644 --- a/scheme/file.sld +++ b/scheme/file.sld @@ -1,3 +1,11 @@ +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module contains the file library from r7rs. +;;;; (define-library (scheme file) (export call-with-input-file diff --git a/scheme/inexact.sld b/scheme/inexact.sld index 86d02736..074bc4ff 100644 --- a/scheme/inexact.sld +++ b/scheme/inexact.sld @@ -1,3 +1,11 @@ +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module contains the inexact library from r7rs. +;;;; (define-library (scheme inexact) (export acos diff --git a/scheme/lazy.sld b/scheme/lazy.sld index 8099416f..f47430a1 100644 --- a/scheme/lazy.sld +++ b/scheme/lazy.sld @@ -1,3 +1,11 @@ +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module contains the lazy library from r7rs. +;;;; (define-library (scheme lazy) (import (scheme base)) (export diff --git a/scheme/load.sld b/scheme/load.sld index 139e9fc7..979072ef 100644 --- a/scheme/load.sld +++ b/scheme/load.sld @@ -1,3 +1,11 @@ +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module contains the load library from r7rs. +;;;; (define-library (scheme load) (export load) diff --git a/scheme/process-context.sld b/scheme/process-context.sld index 9a17e064..f838dbe9 100644 --- a/scheme/process-context.sld +++ b/scheme/process-context.sld @@ -1,3 +1,11 @@ +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module contains the process-context r7rs. +;;;; (define-library (scheme process-context) (export command-line diff --git a/scheme/read.sld b/scheme/read.sld index 512e06e1..05acda9b 100644 --- a/scheme/read.sld +++ b/scheme/read.sld @@ -1,9 +1,11 @@ -;; Cyclone Scheme -;; Copyright (c) 2014, Justin Ethier -;; All rights reserved. -;; -;; This module contains the s-expression parser and supporting functions. -;; +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module contains the s-expression parser and supporting functions. +;;;; (define-library (scheme read) (import (scheme base) (scheme char)) diff --git a/scheme/time.sld b/scheme/time.sld index c7d11c43..d1768662 100644 --- a/scheme/time.sld +++ b/scheme/time.sld @@ -1,3 +1,11 @@ +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module contains the time library from r7rs. +;;;; (define-library (scheme time) (export current-second diff --git a/scheme/write.sld b/scheme/write.sld index 6492f1bc..cb7cc679 100644 --- a/scheme/write.sld +++ b/scheme/write.sld @@ -1,3 +1,11 @@ +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module contains the write library from r7rs. +;;;; (define-library (scheme write) (export display diff --git a/srfi/18.sld b/srfi/18.sld index 2da3db1f..83da0d34 100644 --- a/srfi/18.sld +++ b/srfi/18.sld @@ -1,3 +1,11 @@ +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This module implements the multithreading API from SRFI 18. +;;;; (define-library (srfi 18) (import (scheme base)) (export diff --git a/srfi/9.sld b/srfi/9.sld index c85d594c..9fd82feb 100644 --- a/srfi/9.sld +++ b/srfi/9.sld @@ -1,7 +1,11 @@ -;; TODO: this does not work yet, need (begin) to be able to inject -;; define's in its outer scope -;; -;;; This is based on the implementation of SRFI 9 from chibi scheme +;;;; Cyclone Scheme +;;;; https://github.com/justinethier/cyclone +;;;; +;;;; Copyright (c) 2014-2016, Justin Ethier +;;;; All rights reserved. +;;;; +;;;; This is based on the implementation of SRFI 9 from chibi scheme. +;;;; (define-library (srfi 9) (export record?