PasteRack.org
Paste # 30177
2014-10-19 15:28:02

Fork as a new paste.

Paste viewed 54 times.


Embed:

the tail of symbols

  1. #lang racket
  2.  
  3. (require (for-syntax racket/match))
  4. (require (for-syntax racket/syntax))
  5.  
  6. (define-syntax (get-module syn)
  7.   (match (syntax->list syn)
  8.     ((list _ module without symbols ...)
  9.      (datum->syntax
  10.       syn
  11.       `(require (except-in
  12.                  ,module
  13.                  ,symbols))))))
  14.  
  15. (get-module "www.rkt" without sym1 sym2 sym3)

=>

default-load-handler: cannot open module file

  module path: #<path:/home/stchang/plt601/pkgs/web-server-p

kgs/web-server-lib/web-server/default-web-root/htdocs/www.rk

t>

  path: /home/stchang/plt601/pkgs/web-server-pkgs/web-server

-lib/web-server/default-web-root/htdocs/www.rkt

  system error: No such file or directory; errno=2