diff --git a/TODO b/TODO index 330f88a1..ff8ffb7f 100644 --- a/TODO +++ b/TODO @@ -13,6 +13,10 @@ Working TODO list: - Constructs require for self-hosting - modify main cyclone.scm program to compile + 1) Need to add support: + Error: Unbound variable(s): (command-line-arguments string-ref) + + 2) Need to either allow code to read an import after macro expansion, or have another main module for self-hosting - eval there is no concept of macro expansion, probably other deficiencies as well diff --git a/cyclone.scm b/cyclone.scm index cb7026e5..7eb2748c 100644 --- a/cyclone.scm +++ b/cyclone.scm @@ -5,14 +5,24 @@ ;; This module contains a front-end for the compiler itself. ;; -;; TODO: will need to read these from env somehow. -;; for now they are just hard-coded, but that won't work for an install -(define (cyc:get-lib-dir) "/home/justin/Documents/cyclone/") -(define (cyc:get-clib-dir) "/home/justin/Documents/cyclone/") -(define (cyc:get-include-dir) "/home/justin/Documents/cyclone/") +; TODO: +;(import (scheme base) +; (scheme file) +; (scheme read) +; (scheme write) +; (scheme cyclone util) +; (scheme cyclone cgen) +; (scheme cyclone transforms) +; (scheme cyclone libraries)) (cond-expand (chicken + ;; TODO: will need to read these from env somehow. + ;; for now they are just hard-coded, but that won't work for an install + (define (cyc:get-lib-dir) "/home/justin/Documents/cyclone/") + (define (cyc:get-clib-dir) "/home/justin/Documents/cyclone/") + (define (cyc:get-include-dir) "/home/justin/Documents/cyclone/") + ;; END TODO (require-extension extras) ;; pretty-print (require-extension chicken-syntax) ;; when (require-extension srfi-1) ;; every @@ -21,16 +31,17 @@ (load (string-append (cyc:get-lib-dir) "libraries.so")) (load (string-append (cyc:get-lib-dir) "transforms.so")) (load (string-append (cyc:get-lib-dir) "cgen.so"))) -; (husk -; (import (husk pretty-print)) -; ;; TODO: load files -; ) - (else - (load (string-append (cyc:get-lib-dir) "parser.scm")) - (load (string-append (cyc:get-lib-dir) "util.scm")) - (load (string-append (cyc:get-lib-dir) "libraries.scm")) - (load (string-append (cyc:get-lib-dir) "transforms.scm")) - (load (string-append (cyc:get-lib-dir) "cgen.scm")))) + (else #f)) +;; (husk +;; (import (husk pretty-print)) +;; ;; TODO: load files +;; ) +; (else +; (load (string-append (cyc:get-lib-dir) "parser.scm")) +; (load (string-append (cyc:get-lib-dir) "util.scm")) +; (load (string-append (cyc:get-lib-dir) "libraries.scm")) +; (load (string-append (cyc:get-lib-dir) "transforms.scm")) +; (load (string-append (cyc:get-lib-dir) "cgen.scm")))) ;; Code emission. diff --git a/libraries.scm b/libraries.scm index 78d2e5eb..4e9effd1 100644 --- a/libraries.scm +++ b/libraries.scm @@ -17,6 +17,8 @@ ;; this is problematic as it has to work for the bootstrap and the actual cyclone comp. ;; although I suppose it would be OK if you have to bootstrap from a hardcoded dir (define (cyc:get-lib-dir) "/home/justin/Documents/cyclone/") +(define (cyc:get-clib-dir) "/home/justin/Documents/cyclone/") +(define (cyc:get-include-dir) "/home/justin/Documents/cyclone/") (define (library? ast) (tagged-list? 'define-library ast)) diff --git a/scheme/base.sld b/scheme/base.sld index 582e731c..6705dbc1 100644 --- a/scheme/base.sld +++ b/scheme/base.sld @@ -1,6 +1,8 @@ (define-library (scheme base) (export *Cyc-version-banner* + *c-file-header-comment* + *version-banner* ; TODO: need filter for the next two. also, they really belong in SRFI-1, not here ;delete ;delete-duplicates diff --git a/scheme/cyclone/libraries.sld b/scheme/cyclone/libraries.sld index 5f1e2a77..89fd211c 100644 --- a/scheme/cyclone/libraries.sld +++ b/scheme/cyclone/libraries.sld @@ -4,6 +4,9 @@ (scheme cyclone util) ) (export + cyc:get-clib-dir + cyc:get-lib-dir + cyc:get-include-dir library? lib:name lib:name->string