[project @ 1997-05-26 02:00:31 by sof]
authorsof <unknown>
Mon, 26 May 1997 02:12:07 +0000 (02:12 +0000)
committersof <unknown>
Mon, 26 May 1997 02:12:07 +0000 (02:12 +0000)
Updated to reflect move of PprStyle to Outputable

13 files changed:
ghc/compiler/absCSyn/CLabel.lhs
ghc/compiler/absCSyn/HeapOffs.lhs
ghc/compiler/absCSyn/PprAbsC.lhs
ghc/compiler/codeGen/CgBindery.lhs
ghc/compiler/codeGen/CgCase.lhs
ghc/compiler/codeGen/CgClosure.lhs
ghc/compiler/codeGen/CgExpr.lhs
ghc/compiler/codeGen/CgMonad.lhs
ghc/compiler/codeGen/CgRetConv.lhs
ghc/compiler/codeGen/ClosureInfo.lhs
ghc/compiler/nativeGen/MachCode.lhs
ghc/compiler/nativeGen/StixPrim.lhs
ghc/compiler/reader/ReadPrefix.lhs

index ef14727..603f0a0 100644 (file)
@@ -65,16 +65,12 @@ import Id           ( externallyVisibleId, cmpId_withSpecDataCon,
                          SYN_IE(Id)
                        )
 import Maybes          ( maybeToBool )
-import PprStyle                ( PprStyle(..) )
+import Outputable      ( Outputable(..), PprStyle(..) )
 import PprType         ( showTyCon, GenType{-instance Outputable-} )
 import TyCon           ( TyCon{-instance Eq-} )
 import Unique          ( showUnique, pprUnique, Unique{-instance Eq-} )
 import Pretty
 import Util            ( assertPanic{-, pprTraceToDo:rm-}, Ord3(..) )
-#if __GLASGOW_HASKELL__ >= 202
-import Outputable       ( Outputable(..) )
-#endif
-
 \end{code}
 
 things we want to find out:
index efc8414..5878e08 100644 (file)
@@ -40,7 +40,7 @@ import Maybes         ( catMaybes )
 import SMRep
 import Pretty          -- ********** NOTE **********
 import Util            ( panic )
-import PprStyle         ( PprStyle )
+import Outputable       ( PprStyle )
 \end{code}
 
 %************************************************************************
index dfbd75e..049ebd2 100644 (file)
@@ -46,7 +46,6 @@ import FiniteMap      ( addToFM, emptyFM, lookupFM, FiniteMap )
 import HeapOffs                ( isZeroOff, subOff, pprHeapOffset )
 import Literal         ( showLiteral, Literal(..) )
 import Maybes          ( maybeToBool, catMaybes )
-import PprStyle                ( PprStyle(..) )
 import Pretty
 import PrimOp          ( primOpNeedsWrapper, pprPrimOp, PrimOp(..) )
 import PrimRep         ( isFloatingRep, showPrimRep, PrimRep(..) )
@@ -57,7 +56,7 @@ import Unique         ( pprUnique, Unique{-instance NamedThing-} )
 import UniqSet         ( emptyUniqSet, elementOfUniqSet,
                          addOneToUniqSet, SYN_IE(UniqSet)
                        )
-import Outputable      ( printDoc )
+import Outputable      ( PprStyle(..), printDoc )
 import Util            ( nOfThem, panic, assertPanic )
 
 infixr 9 `thenTE`
index a5feb79..9fbdb2c 100644 (file)
@@ -38,7 +38,7 @@ import ClosureInfo    ( mkLFImported, mkConLFInfo, mkLFArgument, LambdaFormInfo )
 import HeapOffs                ( SYN_IE(VirtualHeapOffset),
                          SYN_IE(VirtualSpAOffset), SYN_IE(VirtualSpBOffset)
                        )
-import Id              ( idPrimRep, toplevelishId, isDataCon,
+import Id              ( idPrimRep, toplevelishId, 
                          mkIdEnv, rngIdEnv, SYN_IE(IdEnv),
                          idSetToList,
                          GenId{-instance NamedThing-}, SYN_IE(Id)
@@ -50,7 +50,7 @@ import Name           ( isLocallyDefined, isWiredInName,
 #ifdef DEBUG
 import PprAbsC         ( pprAmode )
 #endif
-import PprStyle                ( PprStyle(..) )
+import Outputable      ( PprStyle(..) )
 import Pretty          ( Doc )
 import PrimRep          ( PrimRep )
 import StgSyn          ( SYN_IE(StgArg), SYN_IE(StgLiveVars), GenStgArg(..) )
index ed5cc8e..07d9f48 100644 (file)
@@ -54,8 +54,7 @@ import Id             ( idPrimRep, toplevelishId,
                        )
 import Literal          ( Literal )
 import Maybes          ( catMaybes )
-import Outputable       ( Outputable(..) )
-import PprStyle                ( PprStyle(..) )
+import Outputable       ( Outputable(..), PprStyle(..) )
 import PprType         ( GenType{-instance Outputable-} )
 import Pretty          ( Doc )
 import PrimOp          ( primOpCanTriggerGC, PrimOp(..),
index 39d484c..4e96e75 100644 (file)
@@ -60,8 +60,7 @@ import Id             ( idType, idPrimRep,
                        )
 import ListSetOps      ( minusList )
 import Maybes          ( maybeToBool )
-import Outputable      ( Outputable(..){-instances-} ) -- ToDo:rm
-import PprStyle                ( PprStyle(..) )
+import Outputable      ( Outputable(..){-instances-}, PprStyle(..) )
 import PprType         ( GenType{-instance Outputable-}, TyCon{-ditto-} )
 import Pretty          ( Doc, hcat, char, ptext, hsep, text )
 import PrimRep         ( isFollowableRep, PrimRep(..) )
@@ -979,7 +978,7 @@ mkWrapperArgTypeCategories wrapper_ty wrap_info
     do_one (WwPrim, _) = 'P'
     do_one (WwEnum, _) = 'E'
     do_one (WwStrict, arg_ty_char) = arg_ty_char
-    do_one (WwUnpack _ _, arg_ty_char)
+    do_one (WwUnpack _ _ _, arg_ty_char)
       = if arg_ty_char `elem` "CIJFDTS"
        then toLower arg_ty_char
        else if arg_ty_char == '+' then 't'
index d90f988..5026a31 100644 (file)
@@ -45,7 +45,7 @@ import Id             ( dataConTyCon, idPrimRep, getIdArity,
                        )
 import IdInfo          ( ArityInfo(..) )
 import Name            ( isLocallyDefined )
-import PprStyle                ( PprStyle(..) )
+import Outputable      ( PprStyle(..), Outputable(..) )
 import Pretty          ( Doc )
 import PrimOp          ( primOpCanTriggerGC, primOpHeapReq, HeapRequirement(..),
                          getPrimOpResultInfo, PrimOp(..), PrimOpResultInfo(..)
@@ -54,9 +54,6 @@ import PrimRep                ( getPrimRepSize, PrimRep(..) )
 import TyCon           ( tyConDataCons, maybeTyConSingleCon  )
 import Maybes          ( assocMaybe, maybeToBool )
 import Util            ( panic, isIn, pprPanic, assertPanic )
-#if __GLASGOW_HASKELL__ >= 202
-import Outputable       ( Outputable(..) )
-#endif
 \end{code}
 
 This module provides the support code for @StgToAbstractC@ to deal
index c7e18cd..bd7c9d6 100644 (file)
@@ -68,7 +68,7 @@ import Id             ( idType,
                          SYN_IE(Id)
                        )
 import Maybes          ( maybeToBool )
-import PprStyle                ( PprStyle(..) )
+import Outputable      ( PprStyle(..), Outputable(..) )
 import PprType         ( GenType{-instance Outputable-} )
 import Pretty          ( Doc, vcat, hsep, ptext )
 import PrimRep         ( getPrimRepSize, PrimRep(..) )
@@ -76,9 +76,6 @@ import StgSyn         ( SYN_IE(StgLiveVars) )
 import Type            ( typePrimRep )
 import UniqSet         ( elementOfUniqSet )
 import Util            ( sortLt, panic, pprPanic )
-#if __GLASGOW_HASKELL__ >= 202
-import Outputable       ( Outputable(..) )
-#endif
 
 infixr 9 `thenC`       -- Right-associative!
 infixr 9 `thenFC`
index 60597a7..7389c0d 100644 (file)
@@ -39,7 +39,7 @@ import Id             ( isDataCon, dataConRawArgTys,
                          SYN_IE(Id)
                        )
 import Maybes          ( catMaybes )
-import PprStyle                ( PprStyle(..) )
+import Outputable      ( PprStyle(..), Outputable(..) )
 import PprType         ( TyCon{-instance Outputable-} )
 import PrimOp          ( primOpCanTriggerGC,
                          getPrimOpResultInfo, PrimOpResultInfo(..),
@@ -50,11 +50,8 @@ import TyCon         ( tyConDataCons, tyConFamilySize )
 import Type            ( typePrimRep )
 import Pretty          ( Doc )
 import Util            ( zipWithEqual, mapAccumL, isn'tIn,
-                         pprError, pprTrace, panic, assertPanic
+                         pprError, pprTrace, panic, assertPanic, assertPprPanic
                        )
-#if __GLASGOW_HASKELL__ >= 202
-import Outputable       ( Outputable(..) )
-#endif
 \end{code}
 
 %************************************************************************
@@ -121,7 +118,7 @@ then it gives up, returning @ReturnInHeap@.
 dataReturnConvAlg :: DataCon -> DataReturnConvention
 
 dataReturnConvAlg data_con
-  = ASSERT(isDataCon data_con)
+  = ASSERT2(isDataCon data_con, (ppr PprDebug data_con))
     case leftover_kinds of
        []    ->        ReturnInRegs reg_assignment
        other ->        ReturnInHeap    -- Didn't fit in registers
index 6a7f408..e43d936 100644 (file)
@@ -87,21 +87,18 @@ import Id           ( idType, getIdArity,
 import IdInfo          ( ArityInfo(..) )
 import Maybes          ( maybeToBool )
 import Name            ( getOccString )
-import PprStyle                ( PprStyle(..) )
+import Outputable      ( PprStyle(..), Outputable(..) )
 import PprType         ( getTyDescription, GenType{-instance Outputable-} )
 import Pretty          --ToDo:rm
 import PrelInfo                ( maybeCharLikeTyCon, maybeIntLikeTyCon )
 import PrimRep         ( getPrimRepSize, separateByPtrFollowness, PrimRep )
 import SMRep           -- all of it
 import TyCon           ( TyCon{-instance NamedThing-} )
-import Type            ( isPrimType, splitForAllTy, splitFunTyExpandingDictsAndPeeking,
+import Type            ( isPrimType, splitFunTyExpandingDictsAndPeeking,
                          mkFunTys, maybeAppSpecDataTyConExpandingDicts,
                          SYN_IE(Type)
                        )
 import Util            ( isIn, mapAccumL, panic, pprPanic, assertPanic )
-#if __GLASGOW_HASKELL__ >= 202
-import Outputable       ( Outputable(..) )
-#endif
 \end{code}
 
 The ``wrapper'' data type for closure information:
index 5b5833a..0f5f08a 100644 (file)
@@ -35,7 +35,7 @@ import AbsCUtils      ( magicIdPrimRep )
 import CLabel          ( isAsmTemp, CLabel )
 import Maybes          ( maybeToBool, expectJust )
 import OrdList         -- quite a bit of it
-import PprStyle
+import Outputable      ( PprStyle(..) )
 import Pretty          ( ptext, rational )
 import PrimRep         ( isFloatingRep, PrimRep(..) )
 import PrimOp          ( PrimOp(..), showPrimOp )
index ad04c1d..c7c4883 100644 (file)
@@ -28,7 +28,7 @@ import PrimOp         ( PrimOp(..), isCompareOp, showPrimOp,
                        )
 import PrimRep         ( PrimRep(..), isFloatingRep )
 import OrdList         ( OrdList )
-import PprStyle                ( PprStyle(..) )
+import Outputable      ( PprStyle(..) )
 import SMRep           ( SMRep(..), SMSpecRepKind, SMUpdateKind )
 import Stix
 import StixMacro       ( heapCheck )
index 2fb3028..4c7c829 100644 (file)
@@ -24,22 +24,19 @@ import HsSyn
 import HsTypes         ( HsTyVar(..) )
 import HsPragmas       ( noDataPragmas, noClassPragmas, noInstancePragmas, noGenPragmas )
 import RdrHsSyn         
+import BasicTypes      ( Fixity(..), FixityDirection(..), NewOrData(..) )
 import PrefixToHs
 
+import CmdLineOpts      ( opt_PprUserLength )
 import ErrUtils                ( addErrLoc, ghcExit )
 import FiniteMap       ( elemFM, FiniteMap )
 import Name            ( OccName(..), SYN_IE(Module) )
 import Lex             ( isLexConId )
-import PprStyle                ( PprStyle(..) )
+import Outputable      ( Outputable(..), PprStyle(..) )
 import PrelMods
 import Pretty
 import SrcLoc          ( mkGeneratedSrcLoc, noSrcLoc, SrcLoc )
 import Util            ( nOfThem, pprError, panic )
-
-#if __GLASGOW_HASKELL__ >= 202
-import Outputable       ( Outputable(..) )
-#endif
-
 \end{code}
 
 %************************************************************************
@@ -433,7 +430,7 @@ wlkPat pat
                 let
                     err = addErrLoc loc "Illegal pattern `application'"
                                     (\sty -> hsep (map (ppr sty) (lpat:lpats)))
-                    msg = show (err PprForUser)
+                    msg = show (err (PprForUser opt_PprUserLength))
                 in
 #if __GLASGOW_HASKELL__ == 201
                 ioToUgnM  (GHCbase.ioToPrimIO (hPutStr stderr msg)) `thenUgn` \ _ ->
@@ -777,7 +774,7 @@ mk_class_assertion :: RdrNameHsType -> (RdrName, RdrNameHsType)
 
 mk_class_assertion (MonoTyApp (MonoTyVar name) ty@(MonoTyVar tyname)) = (name, ty)
 mk_class_assertion other
-  = pprError "ERROR: malformed type context: " (ppr PprForUser other)
+  = pprError "ERROR: malformed type context: " (ppr (PprForUser opt_PprUserLength) other)
     -- regrettably, the parser does let some junk past
     -- e.g., f :: Num {-nothing-} => a -> ...
 \end{code}