[racket] importing signatures
Did you mean to provide foo:
> #lang racket
>
> (define-signature foo^ (make-foo foo?))
>
> (provide foo^)
Also you can use racket/signature like this:
> #lang racket/signature
>
> make-foo foo?
and then
> #lang racket/unit
>
> (require "sig.rkt")
> (import)
> (export sig^)
>
> (define-struct foo ())
On Jul 26, 2010, at 1:55 PM, Shriram Krishnamurthi wrote:
> Here's the file "sig":
>
> #lang racket
> (define-signature Foo (make-foo foo?))
>
> Here's another file:
>
> #lang racket/unit
> (require "sig")
> (import)
> (export Foo)
> (define-struct foo ())
>
> When I execute this, I get
>
> define-unit: unknown signature in: Foo
>
> I would have thought that the the signature is precisely what the
> (require "sig") line would have imported. I must be missing something
> in the grammar -- anyone?
>
> Shriram
> _________________________________________________
> For list-related administrative tasks:
> http://lists.racket-lang.org/listinfo/users