HomeAboutCodePastes

Paste on 2022-02-12T17:55:10

(define-syntax with-egg
  (er-macro-transformer
   (lambda (e r c)
     (let ((egg (cadr e))
           (body (cddr e)))
       (import (chicken file) (chicken pathname) (chicken platform))
       (if (file-exists? (make-pathname (repository-path) (symbol->string egg) "egg-info"))
           `(begin
              ,@body)
           `(warning "Egg isn't installed" ',egg))))))

plain