  Let H be a Hilbert $C^*$-module over a matrix algebra A. It is proved that
any function $T:H\to H$ which preserves the absolute value of the (generalized)
inner product is of the form $Tf=\phi(f)Uf$ $(f\in H)$, where $\phi$ is a
phase-function and U is an A-linear isometry. The result gives a natural
extension of Wigner's classical unitary-antiunitary theorem for Hilbert
modules.
