Fix bug in type marking when replacing variables with abstract types
Always generalize implicits before running regular generalization
Update monad tests