At the time, I offered a solution that is no longer applicable in a world with polykinded Typeable.
But, if we change the definition of Data.Dynamic to
data Dynamic where
Dynamic :: Typeable a => a -> Dynamic
from its current magic implementation in terms of unsafeCoerce and a manually held typeRep, then
fromDynamic becomes a trivial application of Data.Typeable.cast and dynApply becomes easier,
This would enable us to implement Data.Dynamic with its full constructor exposed without losing safety.
In lieu of supplying the constructor, we could offer a form of
withDyn :: Dynamic -> (forall a. Typeable a => a -> r) -> r
but I'd rather expose the constructor rather than needlessly Church encode as the kind of code/user that needs this is the kind that would bemoan needless performance barriers in the name of nebulous encapsulation benefits.
Now it becomes possible to write code that does polymorphic things underneath the Dynamic wrapper, such as Lennart's example once more, but now in a principled way.