[plt-scheme] [scribble] custom evaluator

From: Eric Tanter (etanter at dcc.uchile.cl)
Date: Sat May 1 13:17:01 EDT 2010

Hi again,

I'm trying to use an evaluator for interactions that uses the plai language. 

I figured out how to create such an evaluator and use it, eg.:
#lang scheme
(require scheme/sandbox)
(define plai-eval (make-evaluator 'plai '(define-type Bar (bar (x number?)))))
(plai-eval '(let ((x 10))
              (bar x)))
--> (bar 10)

Now, in Scribble:

#lang scribble/manual
@(require scribble/eval)
@(require scheme/sandbox)
@(define plai-eval (make-evaluator 'plai '(define-type Bar (bar (x number?)))))
  #:eval plai-eval
  (let ((x 10))
    (bar x))]

string=?: expects type <string> as 2nd argument, given: #f; other arguments were: ""

 === context ===
/Applications/_Extra/Devel/PLT Scheme v4.2.5/collects/scribble/eval.ss:83:6: loop
/Applications/_Extra/Devel/PLT Scheme v4.2.5/collects/scribble/eval.ss:78:2: interleave
/Users/etanter/Develop/Scheme/Scribble/test2.scrbl: [running body]
/Applications/_Extra/Devel/PLT Scheme v4.2.5/collects/scheme/private/map.ss:18:11: map
/Applications/_Extra/Devel/PLT Scheme v4.2.5/collects/scribble/run.ss: [running body]
/Applications/_Extra/Devel/PLT Scheme v4.2.5/collects/scribble/tools/drscheme-buttons.ss:24:3
/Applications/_Extra/Devel/PLT Scheme v4.2.5/collects/scheme/private/more-scheme.ss:158:2: call-with-break-parameterization
/Applications/_Extra/Devel/PLT Scheme v4.2.5/collects/scheme/private/more-scheme.ss:274:2: call-with-exception-handler

Any idea of what I am doing wrong?


-- Éric

Posted on the users mailing list.