X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypecheck%2FTcHsSyn.lhs;h=db82b24acf5ee7c4d5b1a4f5e79433096915e8db;hb=8fbe28ca67a6c07575aee35bfade43e967ad792e;hp=a9a89e416218b2d2b754d9feed2b4632900a8584;hpb=bca9dd54c2b39638cb4638aaccf6015a104a1df5;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcHsSyn.lhs b/ghc/compiler/typecheck/TcHsSyn.lhs index a9a89e4..db82b24 100644 --- a/ghc/compiler/typecheck/TcHsSyn.lhs +++ b/ghc/compiler/typecheck/TcHsSyn.lhs @@ -24,7 +24,6 @@ module TcHsSyn ( mkHsTyApp, mkHsDictApp, mkHsConApp, mkHsTyLam, mkHsDictLam, mkHsLet, - idsToMonoBinds, -- re-exported from TcEnv TcId, tcInstId, @@ -39,7 +38,7 @@ module TcHsSyn ( import HsSyn -- oodles of it -- others: -import Id ( idName, idType, idUnfolding, setIdType, omitIfaceSigForId, isIP, Id ) +import Id ( idName, idType, isLocalId, setIdType, isIP, Id ) import DataCon ( dataConWrapId ) import TcEnv ( tcLookupGlobal_maybe, tcExtendGlobalValEnv, TcEnv, TcId, tcInstId @@ -48,9 +47,7 @@ import TcEnv ( tcLookupGlobal_maybe, tcExtendGlobalValEnv, import TcMonad import TcType ( zonkTcTypeToType, zonkTcTyVarToTyVar, zonkTcType, zonkTcSigTyVars ) -import Name ( isLocallyDefined ) import CoreSyn ( Expr ) -import CoreUnfold( unfoldingTemplate ) import BasicTypes ( RecFlag(..) ) import Bag import Outputable @@ -119,12 +116,6 @@ mkHsLet EmptyMonoBinds expr = expr mkHsLet mbinds expr = HsLet (MonoBind mbinds [] Recursive) expr mkHsConApp data_con tys args = foldl HsApp (HsVar (dataConWrapId data_con) `mkHsTyApp` tys) args - -idsToMonoBinds :: [Id] -> TcMonoBinds -idsToMonoBinds ids - = andMonoBindList [ CoreMonoBind id (unfoldingTemplate (idUnfolding id)) - | id <- ids - ] \end{code} %************************************************************************ @@ -165,9 +156,8 @@ zonkIdBndr id zonkIdOcc :: TcId -> NF_TcM Id zonkIdOcc id - | not (isLocallyDefined id) || omitIfaceSigForId id || isIP id - -- The omitIfaceSigForId thing may look wierd but it's quite - -- sensible really. We're avoiding looking up superclass selectors + | not (isLocalId id) || isIP id + -- We're avoiding looking up superclass selectors -- and constructors; zonking them is a no-op anyway, and the -- superclass selectors aren't in the environment anyway. = returnNF_Tc id @@ -176,7 +166,7 @@ zonkIdOcc id let new_id = case maybe_id' of Just (AnId id') -> id' - other -> pprTrace "zonkIdOcc: " (ppr id) id + other -> pprTrace "zonkIdOcc:" (ppr id) id in returnNF_Tc new_id \end{code}