[plt-scheme] request: itemized display of expected arguments on error

From: Terrence Brannon (metaperl at urth.org)
Date: Thu Jul 15 04:16:32 EDT 2004

I had a function which expected 2 arguments receive 3 arguments. 
mzscheme listed the arguments that the function got, but

a/ it did not list each argument in its entirety
b/ I cannot tell where 1 argument ends and the next begin (see sample 
output)

Welcome to MzScheme version 207, Copyright (c) 2004 PLT Scheme, Inc.
Identifiers and symbols are initially case-sensitive.
 > (require "html-seamstress.scm")
Welcome to LAML Version 23.00 (December 12, 2003, full).
(C) Kurt Normark, Aalborg University, Denmark.
Using LAML in directory: c:/Programs/laml/
 > (point-mute-demo)
procedure ...l-seamstress.scm:75:30: expects 2 arguments, given 3: *TOP* 
(#\newline #\< html #\> (("\n" "  " (#\newline #\< head #\> (("\n" "    
" (#\newline #\< title #\> (("Point Mutation") "</" title #\>)) "\n" "  
") "</" head #\>)) "\n" "\n" "  " (#\newline #\< body #\> (("\n" "    " 
(#\newline #\< h1 #\> (("Point Mutation") "</" h1 #\>)) "\n" "\n" "\n" 
"    Hello there,\n" "    " (#\newline #\< ... "\n"
 > ruleset
((*TOP* . #<procedure:...l-seamstress.scm:75:30>) (span *preorder* . 
#<procedure:...l-seamstress.scm:90:9>) (@ ((*default* . 
#<procedure:...l-seamstress.scm:61:12>)) . 
#<procedure:...l-seamstress.scm:62:10>) (*default* . 
#<procedure:...l-seamstress.scm:64:20>) (*text* . 
#<procedure:...l-seamstress.scm:66:17>) (n_ . 
#<procedure:...l-seamstress.scm:70:10>))
 >

To summarize:
a/ it would be nice to be able to say how much of each argument should 
be listed to avoid my truncation problem
b/ it would be nice if each argument were on a separated line, such as:
[arg 1]: adsfasdf
[arg 2]: asd fasdf
aa dsfaf
a da
sdf adsf
 asdf ad
[arg 3]: asdfafsd adfa afda df

-- 
  (let recur ((lis x) (k k)) 
    (if (zero? k) (values '() lis) 
	(receive (prefix suffix) (recur (cdr lis) (- k 1)) 
	  (values (cons (car lis) prefix) suffix))))) 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20040715/2e3b2130/attachment.html>

Posted on the users mailing list.