Commit d4b98004 authored by simonpj's avatar simonpj
Browse files

[project @ 2004-03-11 14:29:59 by simonpj]

Add sanity check
parent 9182cbf4
......@@ -299,7 +299,10 @@ lookup_inst_env env key_cls key_tys
-- Does not match, so next check whether the things unify
-- [see notes about overlapping instances above]
-> case unifyTyListsX (key_vars `unionVarSet` tpl_tyvars) key_tys tpl of
-> ASSERT( not (key_vars `intersectsVarSet` tpl_tyvars) )
-- Unification will break badly if the variables overlap
-- They shouldn't because we allocate separate uniques for them
case unifyTyListsX (key_vars `unionVarSet` tpl_tyvars) key_tys tpl of
Just _ -> find rest ms (dfun_id:us)
Nothing -> find rest ms us
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment