[prev in list] [next in list] [prev in thread] [next in thread] 

List:       racket-users
Subject:    [plt-scheme] Contracts and Unit/Sigs
From:       robby () cs ! uchicago ! edu (Robby Findler)
Date:       2006-06-29 22:10:24
Message-ID: 20060629221035.B73886C181 () laime ! cs ! uchicago ! edu
[Download RAW message or body]

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic