Towards integrating into the typechecker.  We still need to do improvement.