[project @ 1997-05-26 02:34:40 by sof]
authorsof <unknown>
Mon, 26 May 1997 02:35:16 +0000 (02:35 +0000)
committersof <unknown>
Mon, 26 May 1997 02:35:16 +0000 (02:35 +0000)
Updated to reflect move of PprStyle to Outputable

ghc/compiler/specialise/SpecUtils.lhs
ghc/compiler/specialise/Specialise.lhs

index e2eec02..342e104 100644 (file)
@@ -23,7 +23,7 @@ module SpecUtils (
 IMP_Ubiq(){-uitous-}
 
 import CmdLineOpts     ( opt_SpecialiseOverloaded, opt_SpecialiseUnboxed,
-                         opt_SpecialiseAll
+                         opt_SpecialiseAll, opt_PprUserLength
                        )
 import Bag             ( isEmptyBag, bagToList, Bag )
 import Class           ( GenClass{-instance NamedThing-}, SYN_IE(Class),
@@ -37,7 +37,7 @@ import Id             ( idType, isDictFunId, isConstMethodId_maybe,
                        )
 import Maybes          ( maybeToBool, catMaybes, firstJust )
 import Name            ( OccName, pprOccName, modAndOcc, NamedThing(..) )
-import PprStyle                ( PprStyle(..) )
+import Outputable      ( PprStyle(..), Outputable(..) )
 import PprType         ( pprGenType, pprParendGenType, pprMaybeTy,
                          TyCon{-ditto-}, GenType{-ditto-}, GenTyVar, GenClassOp
                        )
@@ -52,10 +52,6 @@ import Util          ( equivClasses, zipWithEqual, cmpPString,
                          assertPanic, panic{-ToDo:rm-}
                        )
 
-#if __GLASGOW_HASKELL__ >= 202
-import Outputable       ( Outputable(..) )
-#endif
-
 cmpType = panic "SpecUtils.cmpType (ToDo: get rid of)"
 mkSameSpecCon = panic "SpecUtils.mkSameSpecCon (ToDo)"
 getInstIdModule = panic "SpecUtils.getInstIdModule (ToDo)"
@@ -283,7 +279,7 @@ pp_tyspec :: PprStyle -> Doc -> (OccName, TyCon, [Maybe Type]) -> Doc
 pp_tyspec sty pp_mod (_, tycon, tys)
   = hsep [pp_mod,
           text "{-# SPECIALIZE data",
-          ppr PprForUser tycon, hsep (map (pprParendGenType sty) spec_tys),
+          ppr (PprForUser opt_PprUserLength) tycon, hsep (map (pprParendGenType sty) spec_tys),
           text "-} {- Essential -}"
           ]
   where
@@ -330,7 +326,7 @@ pp_idspec sty pp_mod (_, id, tys, is_err)
   | otherwise
   = hsep [pp_mod,
           text "{-# SPECIALIZE",
-          ppr PprForUser id, ptext SLIT("::"),
+          ppr (PprForUser opt_PprUserLength) id, ptext SLIT("::"),
           pprGenType sty spec_ty,
           text "#-}", pp_essential ]
   where
index dd67f09..433d8af 100644 (file)
@@ -43,8 +43,7 @@ import Id             ( idType, isDefaultMethodId_maybe, toplevelishId,
 import Literal         ( Literal{-instance Outputable-} )
 import Maybes          ( catMaybes, firstJust, maybeToBool )
 import Name            ( isLocallyDefined )
-import Outputable      ( interppSP, Outputable(..){-instance * []-} )
-import PprStyle                ( PprStyle(..) )
+import Outputable      ( PprStyle(..), interppSP, Outputable(..){-instance * []-} )
 import PprType         ( pprGenType, pprParendGenType, pprMaybeTy,
                          GenType{-instance Outputable-}, GenTyVar{-ditto-},
                          TyCon{-ditto-}