X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FFamInst.lhs;h=8e8df882d32d3f44a5022cadde3e1ae3f32c9bf8;hb=e1cae1230d5b334c045d0c568d5bf7d02a26dbd7;hp=712ac39524e40e99f8c40a5dcd1f3c4c7ed4ac5a;hpb=5a3ada9ce8887154faf81954b8b45dbb882fe264;p=ghc-hetmet.git diff --git a/compiler/typecheck/FamInst.lhs b/compiler/typecheck/FamInst.lhs index 712ac39..8e8df88 100644 --- a/compiler/typecheck/FamInst.lhs +++ b/compiler/typecheck/FamInst.lhs @@ -5,8 +5,6 @@ module FamInst ( checkFamInstConsistency, tcExtendLocalFamInstEnv ) where -#include "HsVersions.h" - import HscTypes import FamInstEnv import TcMType @@ -18,8 +16,9 @@ import Name import Module import SrcLoc import Outputable -import UniqFM +import LazyUniqFM import FiniteMap +import FastString import Maybe import Monad @@ -174,7 +173,7 @@ checkForConflicts inst_envs famInst Nothing -> panic "FamInst.checkForConflicts" Just (tc, tys) -> tc `mkTyConApp` tys } - ; (tvs', _, tau') <- tcInstSkolType FamInstSkol ty + ; (_, _, tau') <- tcInstSkolType FamInstSkol ty ; let (fam, tys') = tcSplitTyConApp tau' @@ -202,11 +201,13 @@ checkForConflicts inst_envs famInst rhs1 = substTy subst $ synTyConType tycon1 rhs2 = substTy subst $ synTyConType tycon2 +conflictInstErr :: FamInst -> FamInst -> TcRn () conflictInstErr famInst conflictingFamInst = addFamInstLoc famInst $ - addErr (hang (ptext SLIT("Conflicting family instance declarations:")) + addErr (hang (ptext (sLit "Conflicting family instance declarations:")) 2 (pprFamInsts [famInst, conflictingFamInst])) +addFamInstLoc :: FamInst -> TcRn a -> TcRn a addFamInstLoc famInst thing_inside = setSrcSpan (mkSrcSpan loc loc) thing_inside where