Tweak unification algorithm to preserve old behavior more.

(This fixes lots of trivially-broken regression tests.)
This commit is contained in:
Brian Huffman 2018-06-20 15:06:27 -07:00
parent bae811376c
commit 29f401bbcb

View File

@ -124,7 +124,7 @@ bindVar v@(TVBound {}) t
where k = kindOf v
bindVar x@(TVFree _ _ xscope _) (TVar y@(TVFree _ _ yscope _))
| xscope `Set.isSubsetOf` yscope = return (singleSubst y (TVar x), [])
| xscope `Set.isProperSubsetOf` yscope = return (singleSubst y (TVar x), [])
bindVar x@(TVFree _ k inScope _d) t
| not (k == kindOf t) = uniError $ UniKindMismatch k (kindOf t)