@@ -92,31 +92,6 @@ match_unify ctxt env (topx, xfrom) (topy, yfrom) inj holes from =
92 StateT UInfo
92 StateT UInfo
93 TC [(Name, TT Name)]
93 TC [(Name, TT Name)]
95− -- This rule is highly dubious... it certainly produces a valid answer
96− -- but it scares me. However, matching is never guaranteed to give a unique
97− -- answer, merely a valid one, so perhaps we're okay.
98− -- In other words: it may vanish without warning some day :)
99− un names x tm@(App _ (P _ f (Bind fn (Pi _ t _) sc)) a)
100− | (P (TCon _ _) _ _, _) <- unApply x,
101− holeIn env f || f `elem` holes
102− = let n' = uniqueName (sMN 0 "mv") (map fst env) in
103− checkCycle names (f, Bind n' (Lam t) x)
104− un names tm@(App _ (P _ f (Bind fn (Pi _ t _) sc)) a) x
105− | (P (TCon _ _) _ _, _) <- unApply x,
106− holeIn env f || f `elem` holes
107− = let n' = uniqueName fn (map fst env) in
108− checkCycle names (f, Bind n' (Lam t) x)
109− un names x tm@(App _ (P _ f (Bind fn (Pi _ t _) sc)) a)
110− | (P (DCon _ _ _) _ _, _) <- unApply x,
111− holeIn env f || f `elem` holes
112− = let n' = uniqueName (sMN 0 "mv") (map fst env) in
113− checkCycle names (f, Bind n' (Lam t) x)
114− un names tm@(App _ (P _ f (Bind fn (Pi _ t _) sc)) a) x
115− | (P (DCon _ _ _) _ _, _) <- unApply x,
116− holeIn env f || f `elem` holes
117− = let n' = uniqueName fn (map fst env) in
118− checkCycle names (f, Bind n' (Lam t) x)
120 un names tx@(P _ x _) tm
95 un names tx@(P _ x _) tm
121 | tx /= tm && holeIn env x || x `elem` holes
96 | tx /= tm && holeIn env x || x `elem` holes
122 = do sc 1; checkCycle names (x, tm)
97 = do sc 1; checkCycle names (x, tm)