X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypes%2FFamInstEnv.lhs;h=215eaa28ed9baecd38ef757de68be8f08429fa26;hb=0e86b6601ea17d89c7f46b3a902093d4c6020da8;hp=8751e40cef8e38f9bc8dcf1d5cd0b363f61048d6;hpb=9670d6643e55adeb15f998a0efd5799d499ea2a4;p=ghc-hetmet.git diff --git a/compiler/types/FamInstEnv.lhs b/compiler/types/FamInstEnv.lhs index 8751e40..215eaa2 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, @@ -95,7 +102,7 @@ pprFamInstHdr :: FamInst -> SDoc pprFamInstHdr (FamInst {fi_fam = fam, fi_tys = tys, fi_tycon = tycon}) = pprTyConSort <+> pprHead where - pprHead = pprTypeApp (parenSymOcc (getOccName fam) (ppr fam)) tys + pprHead = pprTypeApp fam (ppr fam) tys pprTyConSort | isDataTyCon tycon = ptext SLIT("data instance") | isNewTyCon tycon = ptext SLIT("newtype instance") | isSynTyCon tycon = ptext SLIT("type instance") @@ -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@.