@@ -31,7 +31,7 @@ unify ctxt env topx topy =
31 case runStateT (un False [] topx topy) (UI 0 [] []) of
31 case runStateT (un False [] topx topy) (UI 0 [] []) of
32 OK (v, UI _ inj []) -> return (filter notTrivial v, inj, [])
32 OK (v, UI _ inj []) -> return (filter notTrivial v, inj, [])
33-- Error e@(CantUnify False _ _ _ _ _) -> tfail e
33-- Error e@(CantUnify False _ _ _ _ _) -> tfail e
35 let topxn = normalise ctxt env topx
35 let topxn = normalise ctxt env topx
36 topyn = normalise ctxt env topy in
36 topyn = normalise ctxt env topy in
37-- trace ("Unifying " ++ show (topx, topy) ++ "\n\n==>\n" ++ show (topxn, topyn) ++ "\n\n" ++ show res ++ "\n\n") $
37-- trace ("Unifying " ++ show (topx, topy) ++ "\n\n==>\n" ++ show (topxn, topyn) ++ "\n\n" ++ show res ++ "\n\n") $
@@ -129,7 +129,7 @@ unify ctxt env topx topy =
130 combine bnames hf ha)
130 combine bnames hf ha)
131 where hnormalise [] _ _ t = t
131 where hnormalise [] _ _ t = t
132− hnormalise ns ctxt env t = hnf ctxt env t
132+ hnormalise ns ctxt env t = normalise ctxt env t
133 checkHeads (P (DCon _ _) x _) (P (DCon _ _) y _)
133 checkHeads (P (DCon _ _) x _) (P (DCon _ _) y _)
134 | x /= y = unifyFail appx appy
134 | x /= y = unifyFail appx appy
135 checkHeads (P (TCon _ _) x _) (P (TCon _ _) y _)
135 checkHeads (P (TCon _ _) x _) (P (TCon _ _) y _)