[plt-scheme] redex: recursive metafunctions

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sat May 2 13:17:21 EDT 2009

Well, the contract is written on the metafunction and since there are
no HO contracts, I didn't include that in the error message (altho if
you still think it would help, I could).

But as for the other, that is what you got. The function was called like this:




On Sat, May 2, 2009 at 11:34 AM, Eric Tanter <etanter at dcc.uchile.cl> wrote:
>>> I get an error "collect-d: (collect-d) is not in my domain"
>>> The defintion of collect-d is:
>>> (define-metafunction λenv
>>>  collect-d : (env (x v s) ...) -> (env (x v s) ...)
>>>  ((collect-d (env)) (env))
>>>  ((collect-d (env (x_0 v_0 (b_0 true)) (x_1 v_1 s_1) ...))
>>>  (env-append (env (x_0 v_0 (b_0 true))) (collect-d (x_1 v_1 s_1) ...)))
>> The recursive call just above looks like it is missing "(env ..)"
>> around its argument.
> Just wondering: since the contract of the metafunction is clear, couldn't it
> be possible to report more precisely what the problem is (similarly to
> contract violations), something along the lines of:
> "collect-d broken contract: expected (env (x v s) ...) given (x v s) (other
> arguments were ...)"
> ?
> -- Éric

Posted on the users mailing list.