From ce1a26945eefbf58eb020cf8c4464094eebb5d9e Mon Sep 17 00:00:00 2001 From: sof Date: Mon, 26 May 1997 02:17:54 +0000 Subject: [PATCH] [project @ 1997-05-26 02:15:54 by sof] Updated imports --- ghc/compiler/prelude/PrimOp.lhs | 14 +++++--------- ghc/compiler/prelude/StdIdInfo.lhs | 16 +++++++--------- ghc/compiler/prelude/TysPrim.lhs | 5 +++-- ghc/compiler/prelude/TysWiredIn.lhs | 4 ++-- 4 files changed, 17 insertions(+), 22 deletions(-) diff --git a/ghc/compiler/prelude/PrimOp.lhs b/ghc/compiler/prelude/PrimOp.lhs index 53a19cd..82dfabf 100644 --- a/ghc/compiler/prelude/PrimOp.lhs +++ b/ghc/compiler/prelude/PrimOp.lhs @@ -38,20 +38,17 @@ import TysWiredIn import CStrings ( identToC ) import Constants ( mIN_MP_INT_SIZE, mP_STRUCT_SIZE ) import HeapOffs ( addOff, intOff, totHdrSize, HeapOffset ) -import PprStyle --( codeStyle, ifaceStyle ) +import Outputable ( PprStyle, Outputable(..), codeStyle, ifaceStyle ) import PprType ( pprParendGenType, GenTyVar{-instance Outputable-} ) import Pretty import SMRep ( SMRep(..), SMSpecRepKind(..), SMUpdateKind(..) ) import TyCon ( TyCon{-instances-} ) -import Type {- ( getAppDataTyConExpandingDicts, maybeAppDataTyConExpandingDicts, - mkForAllTys, mkFunTy, mkFunTys, applyTyCon, typePrimRep - ) -} +import Type ( mkForAllTys, mkFunTy, mkFunTys, applyTyCon, typePrimRep, + getAppDataTyConExpandingDicts, SYN_IE(Type) + ) import TyVar --( alphaTyVar, betaTyVar, gammaTyVar, GenTyVar{-instance Eq-} ) import Unique ( Unique{-instance Eq-} ) import Util ( panic#, assoc, panic{-ToDo:rm-} ) -#if __GLASGOW_HASKELL__ >= 202 -import Outputable -#endif \end{code} %************************************************************************ @@ -1381,8 +1378,7 @@ primOpInfo ErrorIOPrimOp -- errorIO# :: PrimIO () -> State# RealWorld# primOpInfo (CCallOp _ _ _ arg_tys result_ty) = AlgResult SLIT("ccall#") [] arg_tys result_tycon tys_applied where - (result_tycon, tys_applied, _) = --trace "PrimOp.getAppDataTyConExpandingDicts" $ - getAppDataTyConExpandingDicts result_ty + (result_tycon, tys_applied, _) = getAppDataTyConExpandingDicts result_ty #ifdef DEBUG primOpInfo op = panic ("primOpInfo:"++ show (I# (tagOf_PrimOp op))) diff --git a/ghc/compiler/prelude/StdIdInfo.lhs b/ghc/compiler/prelude/StdIdInfo.lhs index d968566..52e0a18 100644 --- a/ghc/compiler/prelude/StdIdInfo.lhs +++ b/ghc/compiler/prelude/StdIdInfo.lhs @@ -21,6 +21,7 @@ module StdIdInfo ( IMP_Ubiq() import Type +import CmdLineOpts ( opt_PprUserLength ) import CoreSyn import Literal import CoreUnfold ( mkUnfolding, PragmaInfo(..) ) @@ -29,25 +30,22 @@ import Id ( GenId, mkTemplateLocals, idType, dataConStrictMarks, dataConFieldLabels, dataConArgTys, recordSelectorFieldLabel, dataConSig, StrictnessMark(..), - isDataCon, isMethodSelId_maybe, isSuperDictSelId_maybe, + isAlgCon, isMethodSelId_maybe, isSuperDictSelId_maybe, isRecordSelector, isPrimitiveId_maybe, addIdUnfolding, addIdArity, SYN_IE(Id) ) import IdInfo ( ArityInfo, exactArity ) import Class ( GenClass, GenClassOp, classSig, classOpLocalType ) -import TyCon ( isNewTyCon ) +import TyCon ( isNewTyCon, isDataTyCon, isAlgTyCon ) import FieldLabel ( FieldLabel ) import PrelVals ( pAT_ERROR_ID ) import Maybes -import PprStyle ( PprStyle(..) ) +import Outputable ( PprStyle(..), Outputable(..) ) import Pretty import Util ( assertPanic, pprTrace, assoc ) -#if __GLASGOW_HASKELL__ >= 202 -import Outputable -#endif \end{code} @@ -86,7 +84,7 @@ addStandardIdInfo :: Id -> Id addStandardIdInfo con_id - | isDataCon con_id + | isAlgCon con_id = con_id `addIdUnfolding` unfolding `addIdArity` exactArity (length locals) where @@ -145,7 +143,7 @@ We're going to build a record selector that looks like this: \begin{code} addStandardIdInfo sel_id | isRecordSelector sel_id - = ASSERT( null theta ) + = ASSERT( null theta && isDataTyCon tycon ) sel_id `addIdUnfolding` unfolding `addIdArity` exactArity 1 -- ToDo: consider adding further IdInfo @@ -175,7 +173,7 @@ addStandardIdInfo sel_id maybe_the_arg_id = assocMaybe (field_lbls `zip` arg_ids) field_lbl error_expr = mkApp (Var pAT_ERROR_ID) [] [rhs_ty] [LitArg msg_lit] - full_msg = show (sep [text "No match in record selector", ppr PprForUser sel_id]) + full_msg = show (sep [text "No match in record selector", ppr (PprForUser opt_PprUserLength) sel_id]) msg_lit = NoRepStr (_PK_ full_msg) \end{code} diff --git a/ghc/compiler/prelude/TysPrim.lhs b/ghc/compiler/prelude/TysPrim.lhs index 33bb877..069f54f 100644 --- a/ghc/compiler/prelude/TysPrim.lhs +++ b/ghc/compiler/prelude/TysPrim.lhs @@ -16,8 +16,9 @@ IMP_Ubiq(){-uitous-} import Kind ( mkUnboxedTypeKind, mkBoxedTypeKind, mkTypeKind, mkArrowKind ) import Name ( mkWiredInTyConName ) import PrimRep ( PrimRep(..) ) -- getPrimRepInfo uses PrimRep repn -import TyCon --( mkPrimTyCon, mkDataTyCon, NewOrData(..) ) -import Type --( applyTyCon, mkTyVarTys, mkTyConTy ) +import TyCon ( mkPrimTyCon, mkDataTyCon, SYN_IE(TyCon) ) +import BasicTypes ( NewOrData(..) ) +import Type ( applyTyCon, mkTyVarTys, mkTyConTy, SYN_IE(Type) ) import TyVar ( GenTyVar(..), alphaTyVars ) import Usage ( usageOmega ) import PrelMods ( gHC__ ) diff --git a/ghc/compiler/prelude/TysWiredIn.lhs b/ghc/compiler/prelude/TysWiredIn.lhs index 82ecbba..59241ac 100644 --- a/ghc/compiler/prelude/TysWiredIn.lhs +++ b/ghc/compiler/prelude/TysWiredIn.lhs @@ -83,7 +83,6 @@ module TysWiredIn ( --import Pretty --import Util --import PprType ---import PprStyle --import Kind IMP_Ubiq() @@ -100,8 +99,9 @@ import TysPrim import Kind ( mkBoxedTypeKind, mkArrowKind ) import Name --( mkWiredInTyConName, mkWiredInIdName, mkTupNameStr ) import TyCon ( mkDataTyCon, mkTupleTyCon, mkSynTyCon, - NewOrData(..), TyCon, SYN_IE(Arity) + TyCon, SYN_IE(Arity) ) +import BasicTypes ( NewOrData(..) ) import Type ( mkTyConTy, applyTyCon, mkSigmaTy, mkTyVarTys, mkFunTy, mkFunTys, maybeAppTyCon, GenType(..), SYN_IE(ThetaType), SYN_IE(TauType) ) -- 1.7.10.4