Make FamInst warning-free
[ghc-hetmet.git] / compiler / typecheck / FamInst.lhs
index 712ac39..8e8df88 100644 (file)
@@ -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