Corrected a bug in unifyArgs where errors that occur while processing arguments were being ignored

This commit is contained in:
Neil Brown 2008-05-17 19:42:49 +00:00
parent e72e537c47
commit ddb9ba2fd3

View File

@ -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"