Let's introduce a type alias for this PartialFunction type:

    type FromTree = PartialFunction[Tree, OpTree]

Then we can just say

    sealed trait OpTreeCompanion extends FromTree