replace JS code generated by desugarer for typeclasses with PS code (2)