[plt-scheme] Contracts and Unit/Sigs

From: Robby Findler (robby at cs.uchicago.edu)
Date: Thu Jun 29 18:10:24 EDT 2006

You could use a compound-unit and catch the exception:

  (lambda (unit@)
    (with-handlers ([exn? (lambda (x) #f)])
      (compound-unit/sig
        (import) (link [s : sig^ (unit@)]) (export))
      #t))

(but this requires that the unit@ have fixed imports too, of course)

Robby

At Thu, 29 Jun 2006 18:04:59 -0400, "Jay McCarthy" wrote:
> I have unit/sig?, but I don't seem to have (match-signature? unit@ sig^).
> 
> I see (verify-signature-match where exact? dest-context dest-sig
> src-context src-sig), but there must be something easier right?
> 
> Jay
> 
> -- 
> Jay McCarthy <jay at cs.brown.edu>
> http://jay.makeoutcity.com/
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme


Posted on the users mailing list.