# \[ANN\] DispatchDoctor.jl 🩺 – offers you a prescription for type stability

**URL:** <https://discourse.julialang.org/t/ann-dispatchdoctor-jl-offers-you-a-prescription-for-type-stability/114837>\
**Category:** Package Announcements\
**Created:** [May 28, 2024, 1:07pm UTC](https://discourse.julialang.org/t/ann-dispatchdoctor-jl-offers-you-a-prescription-for-type-stability/114837 "2024-05-28T13:07:16Z")\
**Posts on this page:** 1\
**Showing post:** 20

<div class="post-metadata">

**Author:** ![MilesCranmer](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/milescranmer/32/21070_2.png) [@MilesCranmer](https://discourse.julialang.org/u/MilesCranmer)\
**Post date:** [May 29, 2024, 9:03am UTC](https://discourse.julialang.org/t/ann-dispatchdoctor-jl-offers-you-a-prescription-for-type-stability/114837/20 "2024-05-29T09:03:14Z")

</div>

Awesome 🙂

* * *

By the way, does anybody have a workaround for using `@stable` directly on the top-level block of a Julia module?

I would like to do:

```julia
module MyPackage
@stable begin # Wrap entire package
  
# pkg code...

# with some reexports:
using Reexport: @reexport
@reexport using MySubmodule: A, B, C
  
end
end

```

However, for this, it says `@reexport` is undefined. I looked more into this and it seems macros aren’t allowed to have their definition in a regular block:

```julia
begin
    macro m(ex); ex; end
    @m 1
end

```

This gives the same error. (e.g., [Macros not imported within blocks](https://discourse.julialang.org/t/macros-not-imported-within-blocks/47009))

So, to this, my question is: how can I apply `@stable` to the top-level block of a module, from within the module itself?

Basically I want for

```julia
@stable begin

end

```

to get “merged” into the same block it sits in, rather than creating a new block.

---

_[View the full topic](https://discourse.julialang.org/t/ann-dispatchdoctor-jl-offers-you-a-prescription-for-type-stability/114837)._
