From 8d41d9552d77fd1ca73b8ca88fafb8ca009bfc01 Mon Sep 17 00:00:00 2001 From: Evan Czaplicki Date: Wed, 27 Apr 2016 15:23:26 -0700 Subject: [PATCH] Fix #1192 where mismatched type alias produce bad errors https://imgflip.com/i/1380es --- src/Type/Unify.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Type/Unify.hs b/src/Type/Unify.hs index 42590d889..79faa3c70 100644 --- a/src/Type/Unify.hs +++ b/src/Type/Unify.hs @@ -519,8 +519,8 @@ unifyAlias context name args realVar otherContent = Alias otherName otherArgs otherRealVar -> if name == otherName then - do merge context otherContent - zipWithM_ (subUnify context) (map snd args) (map snd otherArgs) + do zipWithM_ (subUnify context) (map snd args) (map snd otherArgs) + merge context otherContent else subUnify context realVar otherRealVar