remove uncessary variable
This commit is contained in:
parent
58261b1fc4
commit
a24faf8f2d
@ -35,12 +35,11 @@ object Unify {
|
||||
}
|
||||
|
||||
def subElimRule(eq: Set[UnifyConstraint]) : Option[Set[UnifyConstraint]] = {
|
||||
var ret = eq
|
||||
eq.find(_ match{
|
||||
case UnifyLessDot(UnifyTV(a), UnifyTV(b)) => true
|
||||
case _ => false
|
||||
}).map(it => {
|
||||
subst(it.right.asInstanceOf[UnifyTV], it.left, ret.filter(it != _)) ++ Set(UnifyEqualsDot(it.right, it.left), UnifyEqualsDot(it.left, it.left))
|
||||
subst(it.right.asInstanceOf[UnifyTV], it.left, eq.filter(it != _)) ++ Set(UnifyEqualsDot(it.right, it.left), UnifyEqualsDot(it.left, it.left))
|
||||
})
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user