[racket] Creating a module language extending typed/racket
Thanks! That gets me a little closer - to the next problem, at least.
My module language provides some typed functions; when using those
functions in my newly typed module language, the type checker
complains that it doesn't have the type info. Any ideas?
-> (module testimport typed/racket
(: testfun (-> String Symbol))
(define (testfun str)
'out)
(provide (all-defined-out)))
-> (module testlang racket/base
(require typed/racket 'testimport)
(provide (all-from-out typed/racket 'testimport)))
-> (module testmod 'testlang
(testfun 'test))
; Type Checker: missing type for identifier;
; consider using `require/typed' to import it
; identifier: idY6
; from module: (quote testimport)
; in: #%expression
; [,bt for context]
On Thu, Jun 5, 2014 at 3:23 PM, Alexander D. Knauth
<alexander at knauth.org> wrote:
> This works:
> (module testlang racket/base
> (require typed/racket)
> (provide (all-from-out typed/racket))
> )
>
> I have no idea why the other one doesn’t though.
>
> On Jun 5, 2014, at 3:59 PM, Michael Ballantyne <michael.ballantyne at gmail.com> wrote:
>
>> Hey all,
>> I'd like to switch a module language I've created and the code written
>> in it to typed racket. I can't figure out how to reexport all the
>> typed/racket bindings like I can for normal racket, though. If I try
>> this in the repl:
>>
>> (module testlang typed/racket (provide (all-from-out typed/racket)))
>>
>> I get this error:
>>
>> ; Type Checker: Error in macro expansion -- provide: for-meta not supported by
>> ; Typed Racket
>> ; in: ((all-from-out typed/racket))
>> ; [,bt for context]
>>
>> Whereas
>>
>> (module testlang racket (provide (all-from-out racket)))
>>
>> works fine.
>>
>> Can anyone point me towards the right way to make a module language
>> that slightly modifies typed racket?
>>
>> Thanks!
>> ____________________
>> Racket Users list:
>> http://lists.racket-lang.org/users
>