Hi,

I'm hitting the same issue again, except that now that I use Typed Racket, 
and after I do the 

> ,rr "code.rkt"
> ,r "code.rkt"

dance, if I `provide` a new function in code.rkt, then it complains that it 
is missing type for the identifier, and says that I should consider using 
`require/typed` to import it. But code.rkt is #lang typed/racket, and I 
don't want to specify every type again! 

So 

1. how can I get Typed Racket to reload a file (I started it with `racket 
-I typed/racket`)
2. is there a way to avoid the Step 1: > ,rr "code.rkt" Step 2: > ,r 
"code.rkt" dance even for standard Racket?

Or what workflow do people use to reload files quickly (that does not 
depend on Emacs/Racket-mode)?

Cheers,
Marc
On Tuesday, October 8, 2019 at 1:32:20 PM UTC+2, Marc Kaufmann wrote:
>
> Hi,
>
> according to the docs (
> https://docs.racket-lang.org/xrepl/index.html#%28xrepl._require-reloadable%29)
>  
> I would have assumed that when I do 
>
> > ,require-reloadable "code.rkt"
>
> that I can use whatever "code.rkt" provides, the same way as when I do
>
> > ,require "code.rkt"
>
> However, when I do just the ,require-reloadable I have to follow it up 
> with a simple ,require for the provides to be available. Example: if code 
> has (provide my-function), then I have (where ,rr is the short-form for 
> ,require-reloadable and ,r for ,require):
>
> > ,rr "code.rkt"                
> > (my-function args)
> ; my-function: undefined;
> ...
> > ,r "code.rkt"
> > (my-function args)
> ; Works fine, and seems like I can reload it afterwards
>
> Is this how it should be - and if so, why? Might be worth pointing out in 
> the docs if this behavior is expected, as I kept closing and restarting the 
> repl to reload my changes since I couldn't get ,require-reloadable to work.
>
> Cheers,
> Marc
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/13ef69a3-cf22-40b5-8b74-5a3c30b815d2%40googlegroups.com.

Reply via email to