(define-library (front state) (export count bump! next literal token) (import (scheme base)) (begin (define count 0) (define token 1) (define (bump!) (set! count (+ count 1)) count) (define-syntax next (syntax-rules () ((_) (bump!)))) (define-syntax literal (syntax-rules (token) ((_ token) #t) ((_ other) #f))))) (define-library (front aliases) (export (rename count shared) bump!) (import (only (front state) count bump!))) (define count 999) (define bump! #f) (define token 1) (import (prefix (front aliases) a:) (rename (except (front state) count bump!) (token renamed-token))) (define first (next)) (define second (a:bump!)) (define third (next)) (define e (environment '(only (scheme base) +))) (list first second third a:shared count (literal renamed-token) (literal token) (eval '(+ 20 22) e) (cond-expand ((and vile (library (front state))) 'present) (else 'missing)))