(It would be nice to overload the names
processShape and processUnionShape. We
can do that by reifying the type classes
ShapeProcessor and UnionShapeProcessor as
two types that belong to the same multiparameter type class.)