Corrected a bug in unifyArgs where errors that occur while processing arguments were being ignored
This commit is contained in:
parent
e72e537c47
commit
ddb9ba2fd3
|
@ -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"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user