- let Just reconstructed_type = termType term
- subst = computeRTTIsubst (idType id) (reconstructed_type)
- return (term',subst)
+ let reconstructed_type = termType term
+ mb_subst <- withSession cms $ \hsc_env ->
+ improveRTTIType hsc_env (idType id) (reconstructed_type)
+ return (term', fromMaybe emptyTvSubst mb_subst)