The workaround for ~ is general too(completely general if you use a rewriter)