[plt-scheme] provide/contract

From: Carl Eastlund (cce at ccs.neu.edu)
Date: Tue Oct 28 00:55:31 EDT 2008

The image? predicate is part of the HtDP student languages themselves.
 You can require it like this:

(require (only-in lang/htdp-advanced image?))

On Mon, Oct 27, 2008 at 11:30 PM, Stephen Bloch <sbloch at adelphi.edu> wrote:
> Trying to learn about these enforced-contract things by adding
> "provide/contract" to some of my teachpacks.  For example,
> (provide/contract (show-pinhole (-> image? image?))
>                               (crop-top (-> image? number? image?))
>                               (image-beside? (->* (image? image?) () #:rest
> (listof image?) image?)
>                               ...)
> Unfortunately, this doesn't pass a syntax check: as soon as there is even
> one (simple, like show-pinhole) provide/contract involving images, it says
> "unbound variable in module in: image?"  This is especially puzzling as I've
> been using image-library functions throughout the rest of the source file
> with no difficulty; it seems only provide/contract that can't find them.
>  I've already got
> ..
> (require (lib "image.ss" "htdp"))
> ..
> (provide (all-from (lib "image.ss" "htdp")))
> ..
> What more do I have to do for provide/contract to know what an "image?" is?
> Stephen Bloch
> sbloch at adelphi.edu

Posted on the users mailing list.