[plt-scheme] provide/contract

From: Stephen Bloch (sbloch at adelphi.edu)
Date: Tue Oct 28 09:32:51 EDT 2008

On Oct 27, 2008, at 11:37 PM, Will Farr wrote:

> Do you include the (require ...) line for image.ss *before* you have
> the (provide/contract ...) form?  I've found contracts to be sensitive
> to the order in which things are defined---any function definitions
> used in the contracts (in this case image?, in my normal use case a
> structure predicate) must be defined before the (provide/contract ...)
> form is encountered.  I don't really know why this is the case, but I
> assume it's hard to fix, or the PLT people would have fixed it
> already.

Yes, I tried reordering things in that way.  No dice.  And I thought  
perhaps the
(provide (all-from (lib "image.ss" "htdp")))
needed to come before the provide/contract too, on grounds that an  
externally visible contract needs to be based on externally visible  
types.  That didn't seem to help either.



Stephen Bloch
sbloch at adelphi.edu



Posted on the users mailing list.