[plt-scheme] web server contracts

From: David Van Horn (dvanhorn at cs.uvm.edu)
Date: Fri Feb 27 10:12:29 EST 2004

I am having trouble using contracts with the web server:

(module contract-test mzscheme
   (provide interface-version timeout start)
   (require (lib "contract.ss")
            (lib "servlet-sig.ss" "web-server")
            (lib "servlet.ss" "web-server"))

   (define interface-version 'v1)
   (define timeout +inf.0)

   (define/contract start
     (request? . -> . response?)
     (lambda (initial-request)
       `(html (body (p "response"))))))


Servlet didn't load. dynamic-require: name is provided as syntax: start by 
module: |,/local/riverbot/www/servlets/contract-test|

Am I misusing contracts, or is this a bug?

Also, is there a way to get errortrace to work with a module-based servlet?

Thanks,
David



Posted on the users mailing list.