Stop using deriving for types with phantom params