match: almost-working type-based dispatch idea