If I understood what Matthew said correctly, the point of the contract
requiring void is to prevent
an error when someone uses a function returning a string rather than writing to
the output port.
But in this case, response should require returning void too, right? What
confused me more than
th
For that the contract says
(output-port? . -> . void)
When it should say
(output-port? . -> . void?)
On Mar 6, 2015, at 8:16 PM, Matthew Butterick wrote:
> Curiously, the contract for `response` also requires an (-> output-port?
> void?) procedure [1]. The source code agrees. But the examples
Curiously, the contract for `response` also requires an (-> output-port?
void?) procedure [1]. The source code agrees. But the examples given in the
docs don't include a (void) return value. Yet they do work. So perhaps
there's a tiny bug where `response` is being more lenient than it's
supposed to
Hi,
I've run into some strange behavior with the interaction between
impersonators and make-keyword-procedure. I expect that when not invoked
with keywords, the result of make-keyword-procedure and a lambda with the
same form should be equivalent. Instead, they behave differently when
impersonated
I do sort of agree that the void? requirement is strange and unneeded. It’s
usually only used to indicate that a function provided by some module returns
#, but callback functions are usually specified with any as the return
value to allow precisely this sort of thing.
> On Mar 6, 2015, at 16:2
>
> From the error message, I changed the lambda to return (void) and then it
> worked.
> I think maybe the contract is wrong but frankly I don't understand much
> about contracts.
The contract, by definition, is always right ;)
In this case, `response/output` takes as its first argument a proce
Hi, starting a project of mine, I've setup a dispatch rule and a function to
return the response.
To make things simple, I've used response/output, with a lambda writing to the
output-port.
However, I've got the error:
response/output: contract violation
expected: void?
given: 11
in: the ran
At Fri, 6 Mar 2015 13:07:35 -0500, "Alexander D. Knauth" wrote:
> Is there a way to shift all installed packages to installation scope?
There is not currently a short way to do that. (The `raco pkg migrate`
tool almost works, but it cannot read and write the same installation.)
You could use func
Is there a way to shift all installed packages to installation scope?
Racket Users list:
http://lists.racket-lang.org/users
Indeed, this was a bug introduced by the levels of indirection I added to
put contracts into submodules. I'll push a fix when the tests finish.
Thanks for finding this.
Sam
On Sun, Feb 22, 2015 at 3:12 PM Sam Tobin-Hochstadt
wrote:
> This looks like a bug to me.
>
> Sam
>
> On Sun, Feb 22, 201
This is now fixed, thanks mostly to more debugging by Matthew.
Sam
On Tue, Mar 3, 2015 at 9:38 AM, Dmitry Pavlov wrote:
>
>
> On 03/03/2015 01:59 AM, Alexander D. Knauth wrote:
>>
>> Could submodules be causing it?
>> try.rkt:
>> #lang typed/racket/base
>> (provide x)
>> (define x : Integer 1)
>
11 matches
Mail list logo