X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypes%2FFamInstEnv.lhs;h=4f83aba811eaa5da1f191728a989355780c3b4b6;hb=6a05ec5ef5373f61b7f9f5bdc344483417fa801b;hp=ee5558397ee9656279d0e48e0a683e0989fc280d;hpb=b15724ad3cae2a14c265683e8bb6f7d639dac251;p=ghc-hetmet.git diff --git a/compiler/types/FamInstEnv.lhs b/compiler/types/FamInstEnv.lhs index ee55583..4f83aba 100644 --- a/compiler/types/FamInstEnv.lhs +++ b/compiler/types/FamInstEnv.lhs @@ -5,6 +5,13 @@ FamInstEnv: Type checked family instance declarations \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + module FamInstEnv ( FamInst(..), famInstTyCon, famInstTyVars, pprFamInst, pprFamInstHdr, pprFamInsts, @@ -89,7 +96,7 @@ instance Outputable FamInst where pprFamInst :: FamInst -> SDoc pprFamInst famInst = hang (pprFamInstHdr famInst) - 2 (ptext SLIT("--") <+> (pprDefnLoc (getSrcSpan famInst))) + 2 (ptext SLIT("--") <+> pprNameLoc (getName famInst)) pprFamInstHdr :: FamInst -> SDoc pprFamInstHdr (FamInst {fi_fam = fam, fi_tys = tys, fi_tycon = tycon}) @@ -277,7 +284,7 @@ indexed synonyms and we don't want to slow that down by needless unification. \begin{code} lookupFamInstEnvUnify :: (FamInstEnv, FamInstEnv) -> TyCon -> [Type] - -> [(FamInstMatch)] + -> [(FamInstMatch, TvSubst)] lookupFamInstEnvUnify (pkg_ie, home_ie) fam tys | not (isOpenTyCon fam) = [] @@ -318,7 +325,7 @@ lookupFamInstEnvUnify (pkg_ie, home_ie) fam tys case tcUnifyTys bind_fn tpl_tys tys of Just subst -> let rep_tys = substTyVars subst (tyConTyVars tycon) in - (item, rep_tys) : find rest + ((item, rep_tys), subst) : find rest Nothing -> find rest -- See explanation at @InstEnv.bind_fn@.