On 29 July 2013 10:21, 白い熊 <guile-user_gnu....@sumou.com> wrote:

> Hello:
>
> I'm developping a program which I'd like to be able to use without
> modification with Guile as the interpreter as well as Emacs lisp and clisp.
>
>
Cond-expand macro was supposed to assist "conditional compilation",
see an example below. I am not sure if all implementations you are
interested in supply it though.

Alexei

;;;
;;; Module/package systems differ between implementaitons:
;;;
(cond-expand
 (guile
  ;;
  ;; Primary implementation:
  ;;
  (define-module (guile scheduling)
    #:use-module (ice-9 pretty-print)
    #:use-module (srfi srfi-1)          ; list manipulations
    #:export (qm-mpts->npts))
  ;; To get rid of deprecation warning make import of syncase
  ;; conditional:
  (cond-expand
   ((not guile-2) (use-modules (ice-9 syncase))) ; define-syntax
   (else)))                                      ; else nothing
 (else
  ;;
  ;; MzScheme, aka PLT Scheme,  aka Racket (needs cond-expand macro in
  ;; ~/.mzschmerc):
  ;;
  (require (lib "1.ss" "srfi"))
  (define (1+ x) (+ 1 x))
  (define (sorted? lst pred?) #t)))     ; FIXME: lies!

Reply via email to