Re: [racket-users] Is there a way to format keys/values like raise-arguments-error

2021-09-09 Thread Laurent
Maybe take a look at the text-table package. On Wed, 8 Sep 2021, 14:41 David Storrs, wrote: > raise-arguments-errors produces neatly stacked key/value pairs with > whitespace arranged such that values line up even when keys are of > different lengths. Is there an easy way to get that for

[racket-users] Re: Is there a way to format keys/values like raise-arguments-error

2021-09-09 Thread kamist...@gmail.com
I am not really aware of a function that does this you could try digging into the implementation of raise-arguments-error, usually I roll my own implementation depending on what I really want to output. racket/format and its ~a, ~v, etc. have a lot of useful optional keyword arguments like

Re: [racket-users] How to set up rackunit tests to test the REPL?

2021-09-09 Thread Ryan Culpepper
This is one of the few (IMO) legitimate uses of `eval`. Your test suite should create a namespace, set it up by requiring your language's module, and then eval interactions expressed as quoted S-expressions or syntax objects. Here's a basic example for testing `match`: #lang racket/base