src/Pure/unify.ML
changeset 2753 bcde71e5f371
parent 2193 b7e59795c75b
child 3991 4cb2f2422695
--- a/src/Pure/unify.ML	Fri Mar 07 10:24:26 1997 +0100
+++ b/src/Pure/unify.ML	Fri Mar 07 10:26:02 1997 +0100
@@ -146,7 +146,7 @@
 	| occur (Free _)  = false
 	| occur (Var (w,_))  = 
 	    if mem_ix (w, !seen) then false
-	    else if v=w then true
+	    else if eq_ix(v,w) then true
 	      (*no need to lookup: v has no assignment*)
 	    else (seen := w:: !seen;  
 	          case  Envir.lookup(env,w)  of
@@ -209,7 +209,7 @@
 	| occur (Free _)  = NoOcc
 	| occur (Var (w,_))  = 
 	    if mem_ix (w, !seen) then NoOcc
-	    else if v=w then Rigid
+	    else if eq_ix(v,w) then Rigid
 	    else (seen := w:: !seen;  
 	          case  Envir.lookup(env,w)  of
 		      None    => NoOcc
@@ -218,7 +218,7 @@
 	| occur (t as f$_) =  (*switch to nonrigid search?*)
 	   (case head_of_in (env,f) of
 	      Var (w,_) => (*w is not assigned*)
-		if v=w then Rigid  
+		if eq_ix(v,w) then Rigid  
 		else  nonrigid t
 	    | Abs(_,_,body) => nonrigid t (*not in normal form*)
 	    | _ => occomb t)
@@ -593,7 +593,7 @@
   let val t = Envir.norm_term env t0  and  u = Envir.norm_term env u0
   in  case  (head_of t, head_of u) of
       (Var(v,T), Var(w,U)) =>  (*Check for identical variables...*)
-	if v=w then		(*...occur check would falsely return true!*)
+	if eq_ix(v,w) then     (*...occur check would falsely return true!*)
 	    if T=U then (env, add_tpair (rbinder, (t,u), tpairs))
 	    else raise TERM ("add_ffpair: Var name confusion", [t,u])
 	else if xless(v,w) then (*prefer to update the LARGER variable*)