The monk who ignored his visiting wife and infant son The following story comes in Udana 1.8.

It is about a monk by the name of Sanghamaji, who, when seated under a tree, was visited by his former wife, carrying their infant son. She tried several times to get his attention, and having failed, left the son at his feet and went a short distance away, to observe his reaction. The monk neither reacted, nor said anything to the woman or her child. She then took back the child and left the scene, while lamenting about her former husband's lack of feelings for them, saying "the monk doesn't even care about his son."

The Buddha, who witnessed this supernaturally, praised the monk, saying (I paraphrase here) that he showed equanimity and is free from attachment, and is therefore a brahman.

We can say that the monk displayed equanimity (upekkha), but then seemed to lack compassion (karuna).

In the essay entitled "Toward a Threshold of Understanding", Bhikkhu Bodhi discusses this:


  The Pali word that the Pope interprets as "indifference" is presumably
  upekkha. The real meaning of this word is equanimity, not indifference
  in the sense of unconcern for others. As a spiritual virtue, upekkha
  means equanimity in the face of the fluctuations of worldly fortune.
  It is evenness of mind, unshakeable freedom of mind, a state of inner
  equipoise that cannot be upset by gain and loss, honor and dishonor,
  praise and blame, pleasure and pain. Upekkha is freedom from all
  points of self-reference; it is indifference only to the demands of
  the ego-self with its craving for pleasure and position, not to the
  well-being of one's fellow human beings. True equanimity is the
  pinnacle of the four social attitudes that the Buddhist texts call the
  "divine abodes": boundless loving-kindness, compassion, altruistic
  joy, and equanimity. The last does not override and negate the
  preceding three, but perfects and consummates them.


How do we interpret the actions (or non-actions) of Sanghamaji?

Did he lack compassion? Should he not have addressed his former wife compassionately, and given her an explanation of the Dhamma, and the path to the end of suffering?

The sutta does not say if he ensured that the welfare of his wife and son is taken care of, before leaving the lay life of a householder.
Upekkha is freedom from all points of self-reference; it is indifference only to the demands of the ego-self with its craving for
  pleasure and position, not to the well-being of one's fellow human
  beings. True equanimity is the pinnacle of the four social attitudes
  that the Buddhist texts call the "divine abodes": boundless
  loving-kindness, compassion, altruistic joy, and equanimity. The last
  does not override and negate the preceding three, but perfects and
  consummates them.


BB's explanation here sounds exaggerated &amp; too lofty. Metta is arguably the pinnacle of the social attitudes and equanimity governs the other social attitudes. A lingusistic root of 'upekha' is 'to look'. It means 'to observe others, looking to help others, but always knowing others are the heirs to their actions'. That is, equanimity understands you can only help others when they are willing to help themselves.  


  Did he lack compassion?


He did not lack compassion. Compassion is non-cruelty &amp; wishing to help others overcome suffering. The ex-wife was not seeking to end suffering but craving to get her former husband back. If the wife walked away from the child &amp; never returned to the child, the monk abandoning the child would have been cruelty. But this did not occur. The monk obviously had compassion but governed his compassion with equanimity, testing the kamma or motivation of his former wife. The former wife returned to look after her child, therefore the wife followed her personal path, which was motherhood. 


  Should he not have addressed his former wife compassionately, and
  given her an explanation of the Dhamma, and the path to the end of
  suffering?


Absolutely not because the Dhamma says Dhamma is only taught to those who ask for it (AN 9.5). 

This story is an excellent example of the practice of equanimity, namely, observantly looking on to help another person according to the kamma or personal disposition of the other person. The wife demonstrated motherhood was her want &amp; destiny. If (hypothetically) the wife completely abandoned the child &amp; there was no one else to look after the child, the monk would have looked after the child himself, similar to how Rahula was ordained as a novice at 7 years of age.