meta helper: extract sets of subtypes
implement classic pattern matching

Use first match rule and let super types
match all of sub types.