Commit e0a56725 authored by simonpj's avatar simonpj

[project @ 2002-07-23 14:58:16 by simonpj]

Use tcLookupId, not tcLookupGlobalId, in Inst.newMethodFromName

    This really only affects the behaviour with -fno-implicit-prelude

	*** MERGE TO STABLE BRANCH ***
parent 5a5552c1
......@@ -39,7 +39,7 @@ import TcHsSyn ( TcExpr, TcId, TypecheckedHsExpr,
mkHsTyApp, mkHsDictApp, mkHsConApp, zonkId
)
import TcMonad
import TcEnv ( TcIdSet, tcGetInstEnv, tcLookupId, tcLookupGlobalId )
import TcEnv ( TcIdSet, tcGetInstEnv, tcLookupId )
import InstEnv ( InstLookupResult(..), lookupInstEnv )
import TcMType ( zonkTcType, zonkTcTypes, zonkTcPredType, zapToType,
zonkTcThetaType, tcInstTyVar, tcInstType, tcInstTyVars
......@@ -393,7 +393,11 @@ tcInstDataCon orig data_con
newMethodFromName :: InstOrigin -> TcType -> Name -> NF_TcM Inst
newMethodFromName origin ty name
= tcLookupGlobalId name `thenNF_Tc` \ id ->
= tcLookupId name `thenNF_Tc` \ id ->
-- Use tcLookupId not tcLookupGlobalId; the method is almost
-- always a class op, but with -fno-implicit-prelude GHC is
-- meant to find whatever thing is in scope, and that may
-- be an ordinary function.
newMethod origin id [ty]
newMethod :: InstOrigin
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment