Mixing different #lang in one application

38 views
Skip to first unread message

Alain De Vos

unread,
Feb 10, 2020, 3:56:24 PM2/10/20
to Racket Users
I want to create a gui app.
But then I need:
#lang racket/gui
But when i click a button i want type control in the functions so i need :
#lang typed/racket
Are there solutions ?

Sam Tobin-Hochstadt

unread,
Feb 10, 2020, 4:19:04 PM2/10/20
to Alain De Vos, Racket Users
Yes, you can use Typed Racket together with racket/gui -- there's a
`typed/racket/gui` module that you can `require`, and also you can
simply write the handler functions in `#lang typed/racket` and
`require` them into your GUI application code.

Sam
> --
> You received this message because you are subscribed to the Google Groups "Racket Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to racket-users...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/racket-users/4b579c9d-b9d0-4d8b-9d60-5be31d6449fd%40googlegroups.com.

Sean Bailey

unread,
Feb 10, 2020, 5:24:22 PM2/10/20
to Alain De Vos, Racket Users
If I’m not mistaken, you can do `(require typed/racket/gui)` within a `#lang typed/racket` program. That’s thanks to the wonderful typed-racket-more package.

Best,

Sean
Reply all
Reply to author
Forward
0 new messages