[racket] drracket and arity checks

From: Erik Pearson (erik at adaptations.com)
Date: Fri Oct 18 15:30:10 EDT 2013

Hi, I saw the recent question regarding arity mismatch reporting, but have
a more pointed question for drracket usage.

I can get a warning message from racket (command line tool) with the "-W
warning" option, and from drracket by opening the log view and filtering by
warning. However, in drracket I need to do something like create an
executable in order to generate the warning, a simple press of the Run
button doesn't do it. It appears that a simple "load" in cli "racket -W
warning" does invoke the optimizer, so I guess that is not what drracket
does (or does in a different way.)

So, is a way to get drracket to invoke the optimizer (or do a full load of
the file) or do whatever magic needs to be done when the Run button is
pressed to generate the warnings? I could use emacs, but drracket is such a
low-stress, enjoyable mode of working, especially on smallish files.

Before delivering apps I do a raco exe, raco distribute so I can get this
done somewhere in the workflow, it would just be nice to get those pesky
little arity things squashed early in the development cycle. I'm using a
lot of json data extraction and manipulation now, and like the *-ref
functions the functions I'm using have a default value in case the hash key
or list position is not found. It is easy to leave off the default value
and not have it crop up until the app is run. Ouch! My functions require
the default value argument, just so I can ensure that something is done to
handle missing data, and thus the arity check is handy to ensure that this
argument is indeed coded.

Yes, and I'm learning TR, and am starting to work on TR adapters for racket
libs and my own, which will help. But for more ad-hoc apps which may never
be TR, the drracket assistance is welcome.

Thanks,
Erik.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20131018/328242e7/attachment-0001.html>

Posted on the users mailing list.