From bbdc097c5915f48c19fe4ceee891d9ec60fba3f6 Mon Sep 17 00:00:00 2001 From: sof Date: Mon, 26 May 1997 02:35:16 +0000 Subject: [PATCH] [project @ 1997-05-26 02:34:40 by sof] Updated to reflect move of PprStyle to Outputable --- ghc/compiler/specialise/SpecUtils.lhs | 12 ++++-------- ghc/compiler/specialise/Specialise.lhs | 3 +-- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/ghc/compiler/specialise/SpecUtils.lhs b/ghc/compiler/specialise/SpecUtils.lhs index e2eec02..342e104 100644 --- a/ghc/compiler/specialise/SpecUtils.lhs +++ b/ghc/compiler/specialise/SpecUtils.lhs @@ -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 diff --git a/ghc/compiler/specialise/Specialise.lhs b/ghc/compiler/specialise/Specialise.lhs index dd67f09..433d8af 100644 --- a/ghc/compiler/specialise/Specialise.lhs +++ b/ghc/compiler/specialise/Specialise.lhs @@ -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-} -- 1.7.10.4