[racket] Redex: how do you interpret this typesetting error?

From: Asumu Takikawa (asumu at ccs.neu.edu)
Date: Tue Sep 25 15:13:39 EDT 2012

Hi all,

I'm trying to define a Redex lw rewriter that will typeset substitution
nicely, but I'm getting an error that I don't know how to interpret.
I've gotten this before in the past with other rewriters and I've never
been able to figure it out.

Here is the definition of the rewriter and the error that I get:

(define (subst-rewriter lws)
  (define e (list-ref lws 2))
  (define x (list-ref lws 3))
  (define v (list-ref lws 4))
  (list e "[" v " / " x "]"))

adjust-spacing: for subst; loc-wrapper takes up too many columns. Expected it to not pass 17, but it went to 20
  context...:
   /home/asumu/plt/racket-git/collects/redex/private/core-layout.rkt:308:4: loop
   /home/asumu/plt/racket-git/collects/redex/private/core-layout.rkt:308:4: loop
   /home/asumu/plt/racket-git/collects/redex/private/core-layout.rkt:308:4: loop
   /home/asumu/plt/racket-git/collects/redex/private/core-layout.rkt:201:4: ar/e
   /home/asumu/plt/racket-git/collects/redex/private/core-layout.rkt:166:2: apply-rewrites
   /home/asumu/plt/racket-git/collects/redex/private/core-layout.rkt:157:2: lw->pict
   /home/asumu/plt/racket-git/collects/redex/private/pict.rkt:144:0
   /home/asumu/plt/racket-git/collects/redex/private/../../racket/private/map.rkt:26:19: loop
   /home/asumu/plt/racket-git/collects/redex/private/pict.rkt:108:0: do-reduction-relation->pict
   /home/asumu/docs/control-proxy/paper/typesetting.rkt: [running body]
   /home/asumu/docs/control-proxy/paper/model.scrbl: [traversing imports]
   /home/asumu/docs/control-proxy/paper/control-proxy.scrbl: [traversing imports]
   /home/asumu/plt/racket-git/collects/scribble/../racket/private/map.rkt:26:19: loop
   /home/asumu/plt/racket-git/collects/scribble/run.rkt: [running body]

Any idea how I can work around this?

Cheers,
Asumu

Posted on the users mailing list.