From ddb9ba2fd363a71d3057225766fd591559ef989b Mon Sep 17 00:00:00 2001 From: Neil Brown Date: Sat, 17 May 2008 19:42:49 +0000 Subject: [PATCH] Corrected a bug in unifyArgs where errors that occur while processing arguments were being ignored --- frontends/TypeUnification.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/frontends/TypeUnification.hs b/frontends/TypeUnification.hs index e9e86bb..276bd72 100644 --- a/frontends/TypeUnification.hs +++ b/frontends/TypeUnification.hs @@ -174,8 +174,10 @@ unifyType te1 te2 ++ " with non-numeric type" (_,_) -> return $ Left $ return "different types" where - unifyArgs (x:xs) (y:ys) = do unifyType x y - unifyArgs xs ys + unifyArgs (x:xs) (y:ys) = do r <- unifyType x y + case r of + Left _ -> return r + Right _ -> unifyArgs xs ys unifyArgs [] [] = return $ Right () unifyArgs _ _ = return $ Left $ return "different lengths"