-\begin{code}
-lookupFamInstEnvExact :: (FamInstEnv -- External package inst-env
- ,FamInstEnv) -- Home-package inst-env
- -> TyCon -> [Type] -- What we are looking for
- -> Maybe FamInst
-lookupFamInstEnvExact (pkg_ie, home_ie) fam tys
- = home_matches `mplus` pkg_matches
- where
- rough_tcs = roughMatchTcs tys
- all_tvs = all isNothing rough_tcs
- home_matches = lookup home_ie
- pkg_matches = lookup pkg_ie
+We return the matching family instances and the type instance at which it
+matches. For example, if we lookup 'T [Int]' and have a family instance