Can I make a class be private to its package

I have class p.A in file p/A.hx and class p.B in file p/B.hx. I’d like A to be visible from packages other than p, but I’d like B to be visible only from inside of package p. Can this be done?

In Java I would mark A as public (public class A { … } ) and B as default visibility (class B { … }). In Haxe it seems that classes are public by default and if I mark them as private, then they are private to their module rather than to their package. The allow annotation seems to apply to the fields rather than to the classes.

Unfortunately you can’t do that in Haxe.