-- | Substitute within a 'ThetaType'
substTheta :: TvSubst -> ThetaType -> ThetaType
substTheta subst theta
  | isEmptyTvSubst subst = theta
  | otherwise            = map (substTy subst) theta
substTheta :: TvSubst -> ThetaType -> ThetaType
substTheta subst theta
  | isEmptyTvSubst subst = theta
  | otherwise            = map (substTy subst) theta
substTheta subst theta
  | isEmptyTvSubst subst = theta
  | otherwise            = map (substTy subst) theta