[project @ 1997-06-05 09:27:30 by sof]
[ghc-hetmet.git] / ghc / compiler / types / PprType.lhs
index 5990131..6a2f827 100644 (file)
@@ -25,8 +25,12 @@ module PprType(
  ) where
 
 IMP_Ubiq()
+#if defined(__GLASGOW_HASKELL__) && __GLASGOW_HASKELL__ <= 201
 IMPORT_DELOOPER(IdLoop)
---IMPORT_DELOOPER(TyLoop)      -- for paranoia checking
+#else
+import {-# SOURCE #-} Id
+#endif
+
 
 -- friends:
 -- (PprType can see all the representations it's trying to print)
@@ -41,14 +45,14 @@ import Usage                ( pprUVar, GenUsage(..), SYN_IE(Usage), SYN_IE(UVar) )
 
 -- others:
 import CStrings                ( identToC )
-import CmdLineOpts     ( opt_OmitInterfacePragmas )
+import CmdLineOpts     ( opt_OmitInterfacePragmas, opt_PprUserLength )
 import Maybes          ( maybeToBool )
 import Name    {-      (  nameString, Name{-instance Outputable-}, 
                           OccName, pprOccName, getOccString
                        ) -}
-import Outputable      ( ifPprShowAll, interpp'SP, Outputable(..) )
+import Outputable      ( PprStyle(..), codeStyle, userStyle, ifaceStyle,
+                         ifPprShowAll, interpp'SP, Outputable(..) )
 import PprEnv
-import PprStyle                ( PprStyle(..), codeStyle, userStyle, ifaceStyle )
 import Pretty
 import UniqFM          ( addToUFM_Directly, lookupUFM_Directly{-, ufmToList ToDo:rm-},
                          Uniquable(..) )
@@ -59,7 +63,7 @@ import Util
 \begin{code}
 instance (Eq tyvar, Outputable tyvar,
          Eq uvar,  Outputable uvar  ) => Outputable (GenType tyvar uvar) where
-    ppr PprQuote ty = quotes (pprGenType PprForUser ty)
+    ppr PprQuote ty = quotes (pprGenType (PprForUser opt_PprUserLength) ty)
     ppr sty ty = pprGenType sty ty
 
 instance Outputable TyCon where
@@ -73,16 +77,16 @@ instance Outputable ty => Outputable (GenClassOp ty) where
     ppr sty clsop = pprGenClassOp sty clsop
 
 instance Outputable (GenTyVar flexi) where
-    ppr PprQuote ty = quotes (pprGenTyVar PprForUser ty)
+    ppr PprQuote ty = quotes (pprGenTyVar (PprForUser opt_PprUserLength) ty)
     ppr sty tv = pprGenTyVar sty tv
 
 -- and two SPECIALIZEd ones:
 instance Outputable {-Type, i.e.:-}(GenType TyVar UVar) where
-    ppr PprQuote ty  = quotes (pprGenType PprForUser ty)
+    ppr PprQuote ty  = quotes (pprGenType (PprForUser opt_PprUserLength) ty)
     ppr other_sty ty = pprGenType other_sty ty
 
 instance Outputable {-TyVar, i.e.:-}(GenTyVar Usage) where
-    ppr PprQuote ty   = quotes (pprGenTyVar PprForUser ty)
+    ppr PprQuote ty   = quotes (pprGenTyVar (PprForUser opt_PprUserLength) ty)
     ppr other_sty  ty = pprGenTyVar other_sty ty
 \end{code}