Typeclasses: defining, subclassing, instantiating