(library (rnrs (6))         
    ;; Macros defined in core expander:
    begin if lambda quote set! and or
    define define-syntax let-syntax letrec-syntax
    _ ...
    ;; Derived syntax:
    let let* letrec letrec* let-values let*-values
    case cond else =>
    quasiquote unquote unquote-splicing
    syntax-rules identifier-syntax

    ;; R5RS primitives:
    * + - / < <= = > >= abs acos append apply asin atan 
    boolean? call-with-current-continuation 
    call-with-values car cdr caar cadr cdar cddr
    caaar caadr cadar caddr cdaar cdadr cddar cdddr caaaar caaadr caadar caaddr cadaar
    cadadr caddar cadddr cdaaar cdaadr cdadar cdaddr cddaar cddadr cdddar cddddr
    ceiling char? char->integer
    complex? cons cos 
    denominator dynamic-wind 
    eq? equal? eqv? even? exact? exp expt floor for-each
    gcd imag-part inexact? integer->char integer?
    lcm length list list->string
    list->vector list-ref list-tail list? log magnitude make-polar
    make-rectangular make-string make-vector map max min
    negative? not null? number->string number? numerator
    odd? pair? 
    positive? procedure? rational? rationalize
    real-part real? reverse round
    sin sqrt string string->list string->number string->symbol
    string-copy string-length string-ref string<=? string<?
    string=? string>=? string>? string? substring symbol->string symbol? tan
    truncate values vector vector->list
    vector-fill! vector-length vector-ref vector-set! vector? zero?    

    ;; R6RS additional procedures:
    real-valued? rational-valued? integer-valued? exact inexact finite? infinite?
    nan? div mod div-and-mod div0 mod0 div0-and-mod0 exact-integer-sqrt boolean=?
    symbol=? string-for-each vector-map vector-for-each error assertion-violation

    char=? char<? char>? char<=? char>=?

    ;; From (rnrs unicode)
    char-upcase char-downcase char-titlecase char-foldcase	
    char-ci=? char-ci<? char-ci>? char-ci<=? char-ci>=? 
    char-alphabetic? char-numeric? char-whitespace? char-upper-case? char-lower-case? 
    string-upcase string-downcase string-titlecase string-foldcase
    string-ci=? string-ci<? string-ci>? string-ci<=? string-ci>=?
    string-normalize-nfd string-normalize-nfkd string-normalize-nfc string-normalize-nfkc

    ;; From (rnrs control)
    when unless do case-lambda
    ;; From (rnrs lists)
    find for-all exists filter partition fold-left fold-right
    remp remove remq remv memp assp
    memv member memq assoc assv assq
    ;; From (rnrs io simple)
    call-with-input-file call-with-output-file 
    close-input-port close-output-port current-input-port current-output-port
    display eof-object? newline open-input-file open-output-file peek-char
    read read-char with-input-from-file with-output-to-file write write-char   

    ;; syntax-case
    identifier? bound-identifier=? free-identifier=?
    generate-temporaries datum->syntax syntax->datum 
    syntax-violation syntax syntax-case quasisyntax 
    unsyntax unsyntax-splicing with-syntax 

    ;; hash-tables
    ;; enumerations

   (import (for (except (rnrs base) syntax-rules identifier-syntax _ ... set!) run expand)
           (for (only (rnrs base) set!)                                        run expand)
	   (for (only (rnrs base) syntax-rules identifier-syntax)              run expand)        
           (for (rnrs unicode)                                                 run expand)
        ;; (for (rnrs bytevectors)                                             run expand)  ; Not implemented
           (for (rnrs lists)                                                   run expand)
	;; (for (rnrs sorting)                                                 run expand)  ; Implemented, but in terms of SRFIs...
           (for (rnrs control)                                                 run expand)
	;; (for (rnrs records syntactic)                                       run expand)  ; Not implemented
	   (for (rnrs records procedural)                                      run expand)
	   (for (rnrs records inspection)                                      run expand)
        ;; (for (rnrs exceptions)                                              run expand)  ; Not implemented
	;; (for (rnrs conditions)                                              run expand)  ; Not implemented
        ;; (for (rnrs io ports)                                                run expand)  ; Not implemented
           (for (rnrs io simple)                                               run expand)
	   (for (rnrs files)                                                   run expand)
           (for (rnrs programs)                                                run expand)
        ;; (for (rnrs arithmetic fixnums)                                      run expand)  ; Not implemented
        ;; (for (rnrs arithmetic flonums)                                      run expand)  ; Not implemented
           (for (rnrs arithmetic bitwise)                                      run expand)
           (for (rnrs syntax-case)                                             run expand)
        ;; (for (rnrs hash-tables)                                             run expand)
	;; (for (rnrs enumerations)                                            run expand)
   ) ;; rnrs