Don't import FastString in HsVersions.h
[ghc-hetmet.git] / compiler / prelude / TysPrim.lhs
index 908cbaa..6b02116 100644 (file)
@@ -4,6 +4,13 @@
 \section[TysPrim]{Wired-in knowledge about primitive types}
 
 \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 TysPrim(
        alphaTyVars, betaTyVars, alphaTyVar, betaTyVar, gammaTyVar, deltaTyVar,
        alphaTy, betaTy, gammaTy, deltaTy,
@@ -57,10 +64,11 @@ import Type         ( mkTyConApp, mkTyConTy, mkTyVarTys, mkTyVarTy,
                          Kind, mkArrowKinds, mkArrowKind,
                          TyThing(..)
                        )
-import SrcLoc          ( noSrcLoc )
+import SrcLoc
 import Unique          ( mkAlphaTyVarUnique, pprUnique )
 import PrelNames
-import FastString      ( FastString, mkFastString )
+import StaticFlags
+import FastString
 import Outputable
 
 import Char            ( ord, chr )
@@ -150,7 +158,7 @@ alphaTyVars is a list of type variables for use in templates:
 tyVarList :: Kind -> [TyVar]
 tyVarList kind = [ mkTyVar (mkInternalName (mkAlphaTyVarUnique u) 
                                (mkTyVarOcc (mkFastString name))
-                               noSrcLoc) kind
+                               noSrcSpan) kind
                 | u <- [2..],
                   let name | c <= 'z'  = [c]
                            | otherwise = 't':show u
@@ -304,7 +312,8 @@ anyPrimTyCon1 = mkLiftedPrimTyCon anyPrimTyCon1Name kind 0 PtrRep
 mkAnyPrimTyCon :: Unique -> Kind -> TyCon
 -- Grotesque hack alert: the client gives the unique; so equality won't work
 mkAnyPrimTyCon uniq kind 
-  = pprTrace "Urk! Inventing strangely-kinded Any TyCon:" (ppr uniq <+> ppr kind)
+  = WARN( opt_PprStyle_Debug, ptext SLIT("Urk! Inventing strangely-kinded Any TyCon:") <+> ppr uniq <+> ppr kind )
+       -- See Note [Strangely-kinded void TyCons] in TcHsSyn
     tycon
   where
      name  = mkPrimTc (mkFastString ("Any" ++ showSDoc (pprUnique uniq))) uniq tycon