Commit 9d4c0380 authored by partain's avatar partain
Browse files

[project @ 1996-06-30 15:56:44 by partain]

partain 1.3 changes through 960629
parent da3d8948
......@@ -14,15 +14,15 @@ import HsSyn ( HsBinds(..), Bind(..), Sig(..), MonoBinds(..),
HsExpr, Match, PolyType, InPat, OutPat(..),
GRHSsAndBinds, ArithSeqInfo, HsLit, Fake,
collectBinders )
import RnHsSyn ( RenamedHsBinds(..), RenamedBind(..), RenamedSig(..),
RenamedMonoBinds(..), RnName(..)
import RnHsSyn ( SYN_IE(RenamedHsBinds), SYN_IE(RenamedBind), RenamedSig(..),
SYN_IE(RenamedMonoBinds), RnName(..)
)
import TcHsSyn ( TcHsBinds(..), TcBind(..), TcMonoBinds(..),
TcIdOcc(..), TcIdBndr(..) )
import TcHsSyn ( SYN_IE(TcHsBinds), SYN_IE(TcBind), SYN_IE(TcMonoBinds),
TcIdOcc(..), SYN_IE(TcIdBndr) )
import TcMonad hiding ( rnMtoTcM )
import GenSpecEtc ( checkSigTyVars, genBinds, TcSigInfo(..) )
import Inst ( Inst, LIE(..), emptyLIE, plusLIE, InstOrigin(..) )
import Inst ( Inst, SYN_IE(LIE), emptyLIE, plusLIE, InstOrigin(..) )
import TcEnv ( tcExtendLocalValEnv, tcLookupLocalValueOK, newMonoIds )
IMPORT_DELOOPER(TcLoop) ( tcGRHSsAndBinds )
import TcMatches ( tcMatchesFun )
......@@ -36,10 +36,9 @@ import Kind ( mkBoxedTypeKind, mkTypeKind )
import Id ( GenId, idType, mkUserId )
import IdInfo ( noIdInfo )
import Maybes ( assocMaybe, catMaybes )
import Name ( pprNonSym )
import Name ( pprNonSym, Name )
import PragmaInfo ( PragmaInfo(..) )
import Pretty
import RnHsSyn ( RnName ) -- instances
import Type ( mkTyVarTy, mkTyVarTys, isTyVarTy,
mkSigmaTy, splitSigmaTy,
splitRhoTy, mkForAllTy, splitForAllTy )
......
......@@ -6,9 +6,7 @@
\begin{code}
#include "HsVersions.h"
module TcClassDcl (
tcClassDecl1, tcClassDecls2
) where
module TcClassDcl ( tcClassDecl1, tcClassDecls2 ) where
IMP_Ubiq()
......@@ -18,27 +16,26 @@ import HsSyn ( ClassDecl(..), HsBinds(..), Bind(..), MonoBinds(..),
Stmt, Qualifier, ArithSeqInfo, InPat, Fake )
import HsPragmas ( ClassPragmas(..) )
import RnHsSyn ( RenamedClassDecl(..), RenamedClassPragmas(..),
RenamedClassOpSig(..), RenamedMonoBinds(..),
RenamedClassOpSig(..), SYN_IE(RenamedMonoBinds),
RenamedGenPragmas(..), RenamedContext(..),
RnName{-instance Uniquable-}
)
import TcHsSyn ( TcIdOcc(..), TcHsBinds(..), TcMonoBinds(..), TcExpr(..),
import TcHsSyn ( TcIdOcc(..), SYN_IE(TcHsBinds), SYN_IE(TcMonoBinds), SYN_IE(TcExpr),
mkHsTyApp, mkHsTyLam, mkHsDictApp, mkHsDictLam, tcIdType )
import Inst ( Inst, InstOrigin(..), LIE(..), emptyLIE, plusLIE, newDicts, newMethod )
import Inst ( Inst, InstOrigin(..), SYN_IE(LIE), emptyLIE, plusLIE, newDicts, newMethod )
import TcEnv ( tcLookupClass, tcLookupTyVar, tcLookupTyCon, newLocalIds, tcExtendGlobalTyVars )
import TcInstDcls ( processInstBinds )
import TcKind ( TcKind )
import TcKind ( unifyKind )
import TcKind ( unifyKind, TcKind )
import TcMonad hiding ( rnMtoTcM )
import TcMonoType ( tcPolyType, tcMonoType, tcContext )
import TcSimplify ( tcSimplifyAndCheck )
import TcType ( TcType(..), TcTyVar(..), tcInstType, tcInstSigTyVars, tcInstSigType )
import TcType ( SYN_IE(TcType), SYN_IE(TcTyVar), tcInstType, tcInstSigTyVars, tcInstSigType )
import Bag ( foldBag, unionManyBags )
import Class ( GenClass, mkClass, mkClassOp, classBigSig,
classOps, classOpString, classOpLocalType,
classOpTagByString
classOpTagByString, SYN_IE(ClassOp)
)
import Id ( mkSuperDictSelId, mkMethodSelId, mkDefaultMethodId,
idType )
......
......@@ -16,11 +16,11 @@ import HsSyn ( FixityDecl, Sig, HsBinds(..), Bind(..), MonoBinds(..),
GRHSsAndBinds, Match, HsExpr, HsLit, InPat,
ArithSeqInfo, Fake, MonoType )
import HsPragmas ( InstancePragmas(..) )
import RnHsSyn ( mkRnName, RnName(..), RenamedHsBinds(..), RenamedFixityDecl(..) )
import RnHsSyn ( mkRnName, RnName(..), SYN_IE(RenamedHsBinds), RenamedFixityDecl(..) )
import TcHsSyn ( TcIdOcc )
import TcMonad
import Inst ( InstanceMapper(..) )
import Inst ( SYN_IE(InstanceMapper) )
import TcEnv ( getEnv_TyCons, tcLookupClassByKey )
import TcKind ( TcKind )
import TcGenDeriv -- Deriv stuff
......
......@@ -25,13 +25,13 @@ IMP_Ubiq()
IMPORT_DELOOPER(TcMLoop) -- for paranoia checking
import Id ( SYN_IE(Id), GenId, idType, mkUserLocal )
import TcHsSyn ( TcIdBndr(..), TcIdOcc(..) )
import TcHsSyn ( SYN_IE(TcIdBndr), TcIdOcc(..) )
import TcKind ( TcKind, newKindVars, tcDefaultKind, kindToTcKind )
import TcType ( TcType(..), TcMaybe, TcTyVar(..), TcTyVarSet(..),
import TcType ( SYN_IE(TcType), TcMaybe, SYN_IE(TcTyVar), SYN_IE(TcTyVarSet),
newTyVarTys, tcInstTyVars, zonkTcTyVars
)
import TyVar ( mkTyVar, tyVarKind, unionTyVarSets, emptyTyVarSet )
import Type ( tyVarsOfTypes )
import Type ( tyVarsOfTypes, splitForAllTy )
import TyCon ( TyCon, tyConKind, synTyConArity )
import Class ( SYN_IE(Class), GenClass, classSig )
......@@ -41,7 +41,6 @@ import Name ( getOccName, getSrcLoc, Name{-instance NamedThing-} )
import PprStyle
import Pretty
import RnHsSyn ( RnName(..) )
import Type ( splitForAllTy )
import Unique ( pprUnique10, pprUnique{-ToDo:rm-} )
import UniqFM
import Util ( zipEqual, zipWithEqual, zipWith3Equal, zipLazy,
......
......@@ -15,18 +15,18 @@ import HsSyn ( HsExpr(..), Qualifier(..), Stmt(..),
ArithSeqInfo(..), HsLit(..), Sig, GRHSsAndBinds,
Match, Fake, InPat, OutPat, PolyType,
failureFreePat, collectPatBinders )
import RnHsSyn ( RenamedHsExpr(..), RenamedQual(..),
RenamedStmt(..), RenamedRecordBinds(..),
import RnHsSyn ( SYN_IE(RenamedHsExpr), SYN_IE(RenamedQual),
SYN_IE(RenamedStmt), SYN_IE(RenamedRecordBinds),
RnName{-instance Outputable-}
)
import TcHsSyn ( TcExpr(..), TcQual(..), TcStmt(..),
TcIdOcc(..), TcRecordBinds(..),
import TcHsSyn ( SYN_IE(TcExpr), SYN_IE(TcQual), SYN_IE(TcStmt),
TcIdOcc(..), SYN_IE(TcRecordBinds),
mkHsTyApp
)
import TcMonad hiding ( rnMtoTcM )
import Inst ( Inst, InstOrigin(..), OverloadedLit(..),
LIE(..), emptyLIE, plusLIE, plusLIEs, newOverloadedLit,
SYN_IE(LIE), emptyLIE, plusLIE, plusLIEs, newOverloadedLit,
newMethod, newMethodWithGivenTy, newDicts )
import TcBinds ( tcBindsAndThen )
import TcEnv ( tcLookupLocalValue, tcLookupGlobalValue, tcLookupClassByKey,
......@@ -37,7 +37,7 @@ import TcMatches ( tcMatchesCase, tcMatch )
import TcMonoType ( tcPolyType )
import TcPat ( tcPat )
import TcSimplify ( tcSimplifyAndCheck, tcSimplifyRank2 )
import TcType ( TcType(..), TcMaybe(..),
import TcType ( SYN_IE(TcType), TcMaybe(..),
tcInstId, tcInstType, tcInstSigTcType,
tcInstSigType, tcInstTcType, tcInstTheta,
newTyVarTy, zonkTcTyVars, zonkTcType )
......@@ -57,11 +57,11 @@ import Type ( mkFunTy, mkAppTy, mkTyVarTy, mkTyVarTys, mkRhoTy,
)
import TyVar ( GenTyVar, SYN_IE(TyVarSet), unionTyVarSets, mkTyVarSet )
import TysPrim ( intPrimTy, charPrimTy, doublePrimTy,
floatPrimTy, addrPrimTy
floatPrimTy, addrPrimTy, realWorldTy
)
import TysWiredIn ( addrTy,
boolTy, charTy, stringTy, mkListTy,
mkTupleTy, mkPrimIoTy, primIoDataCon
mkTupleTy, mkPrimIoTy, stDataCon
)
import Unify ( unifyTauTy, unifyTauTyList, unifyTauTyLists, unifyFunTy )
import Unique ( Unique, cCallableClassKey, cReturnableClassKey,
......@@ -269,7 +269,7 @@ tcExpr (CCall lbl args may_gc is_asm ignored_fake_result_ty)
mapNF_Tc new_arg_dict (zipEqual "tcExpr:CCall" args arg_tys) `thenNF_Tc` \ ccarg_dicts_s ->
newDicts result_origin [(cReturnableClass, result_ty)] `thenNF_Tc` \ (ccres_dict, _) ->
returnTc (HsCon primIoDataCon [result_ty] [CCall lbl args' may_gc is_asm result_ty],
returnTc (HsCon stDataCon [realWorldTy, result_ty] [CCall lbl args' may_gc is_asm result_ty],
-- do the wrapping in the newtype constructor here
foldr plusLIE ccres_dict ccarg_dicts_s `plusLIE` args_lie,
mkPrimIoTy result_ty)
......
......@@ -13,14 +13,14 @@ IMPORT_DELOOPER(TcLoop) -- for paranoia checking
import HsSyn ( GRHSsAndBinds(..), GRHS(..),
HsExpr, HsBinds(..), InPat, OutPat, Bind, Sig, Fake )
import RnHsSyn ( RenamedGRHSsAndBinds(..), RenamedGRHS(..) )
import TcHsSyn ( TcGRHSsAndBinds(..), TcGRHS(..), TcIdOcc(..) )
import RnHsSyn ( SYN_IE(RenamedGRHSsAndBinds), SYN_IE(RenamedGRHS) )
import TcHsSyn ( SYN_IE(TcGRHSsAndBinds), SYN_IE(TcGRHS), TcIdOcc(..) )
import TcMonad hiding ( rnMtoTcM )
import Inst ( Inst, LIE(..), plusLIE )
import Inst ( Inst, SYN_IE(LIE), plusLIE )
import TcBinds ( tcBindsAndThen )
import TcExpr ( tcExpr )
import TcType ( TcType(..) )
import TcType ( SYN_IE(TcType) )
import Unify ( unifyTauTy )
import TysWiredIn ( boolTy )
......
......@@ -10,20 +10,20 @@ checker.
#include "HsVersions.h"
module TcHsSyn (
TcIdBndr(..), TcIdOcc(..),
SYN_IE(TcIdBndr), TcIdOcc(..),
TcMonoBinds(..), TcHsBinds(..), TcBind(..), TcPat(..),
TcExpr(..), TcGRHSsAndBinds(..), TcGRHS(..), TcMatch(..),
TcQual(..), TcStmt(..), TcArithSeqInfo(..), TcRecordBinds(..),
TcHsModule(..),
SYN_IE(TcMonoBinds), SYN_IE(TcHsBinds), SYN_IE(TcBind), SYN_IE(TcPat),
SYN_IE(TcExpr), SYN_IE(TcGRHSsAndBinds), SYN_IE(TcGRHS), SYN_IE(TcMatch),
SYN_IE(TcQual), SYN_IE(TcStmt), SYN_IE(TcArithSeqInfo), SYN_IE(TcRecordBinds),
SYN_IE(TcHsModule),
TypecheckedHsBinds(..), TypecheckedBind(..),
TypecheckedMonoBinds(..), TypecheckedPat(..),
TypecheckedHsExpr(..), TypecheckedArithSeqInfo(..),
TypecheckedQual(..), TypecheckedStmt(..),
TypecheckedMatch(..), TypecheckedHsModule(..),
TypecheckedGRHSsAndBinds(..), TypecheckedGRHS(..),
TypecheckedRecordBinds(..),
SYN_IE(TypecheckedHsBinds), SYN_IE(TypecheckedBind),
SYN_IE(TypecheckedMonoBinds), SYN_IE(TypecheckedPat),
SYN_IE(TypecheckedHsExpr), SYN_IE(TypecheckedArithSeqInfo),
SYN_IE(TypecheckedQual), SYN_IE(TypecheckedStmt),
SYN_IE(TypecheckedMatch), SYN_IE(TypecheckedHsModule),
SYN_IE(TypecheckedGRHSsAndBinds), SYN_IE(TypecheckedGRHS),
SYN_IE(TypecheckedRecordBinds),
mkHsTyApp, mkHsDictApp,
mkHsTyLam, mkHsDictLam,
......@@ -37,7 +37,7 @@ IMP_Ubiq(){-uitous-}
-- friends:
import HsSyn -- oodles of it
import Id ( GenId(..), IdDetails, PragmaInfo, -- Can meddle modestly with Ids
import Id ( GenId(..), IdDetails, -- Can meddle modestly with Ids
SYN_IE(DictVar), idType,
SYN_IE(IdEnv), growIdEnvList, lookupIdEnv
)
......@@ -45,7 +45,7 @@ import Id ( GenId(..), IdDetails, PragmaInfo, -- Can meddle modestly with Ids
-- others:
import Name ( Name{--O only-} )
import TcMonad hiding ( rnMtoTcM )
import TcType ( TcType(..), TcMaybe, TcTyVar(..),
import TcType ( SYN_IE(TcType), TcMaybe, SYN_IE(TcTyVar),
zonkTcTypeToType, zonkTcTyVarToTyVar
)
import Usage ( SYN_IE(UVar) )
......
......@@ -21,21 +21,21 @@ import HsSyn ( InstDecl(..), FixityDecl, Sig(..),
InPat(..), OutPat(..), HsExpr(..), HsLit(..),
Stmt, Qualifier, ArithSeqInfo, Fake,
PolyType(..), MonoType )
import RnHsSyn ( RenamedHsBinds(..), RenamedMonoBinds(..),
import RnHsSyn ( SYN_IE(RenamedHsBinds), SYN_IE(RenamedMonoBinds),
RenamedInstDecl(..), RenamedFixityDecl(..),
RenamedSig(..), RenamedSpecInstSig(..),
RnName(..){-incl instance Outputable-}
)
import TcHsSyn ( TcIdOcc(..), TcHsBinds(..),
TcMonoBinds(..), TcExpr(..), tcIdType,
import TcHsSyn ( TcIdOcc(..), SYN_IE(TcHsBinds),
SYN_IE(TcMonoBinds), SYN_IE(TcExpr), tcIdType,
mkHsTyLam, mkHsTyApp,
mkHsDictLam, mkHsDictApp )
import TcMonad hiding ( rnMtoTcM )
import GenSpecEtc ( checkSigTyVars )
import Inst ( Inst, InstOrigin(..), InstanceMapper(..),
newDicts, newMethod, LIE(..), emptyLIE, plusLIE )
import Inst ( Inst, InstOrigin(..), SYN_IE(InstanceMapper),
newDicts, newMethod, SYN_IE(LIE), emptyLIE, plusLIE )
import TcBinds ( tcPragmaSigs )
import TcDeriv ( tcDeriving )
import TcEnv ( tcLookupClass, tcTyVarScope, newLocalId, tcExtendGlobalTyVars )
......@@ -45,7 +45,7 @@ import TcKind ( TcKind, unifyKind )
import TcMatches ( tcMatchesFun )
import TcMonoType ( tcContext, tcMonoTypeKind )
import TcSimplify ( tcSimplifyAndCheck )
import TcType ( TcType(..), TcTyVar(..), TcTyVarSet(..),
import TcType ( SYN_IE(TcType), SYN_IE(TcTyVar), SYN_IE(TcTyVarSet),
tcInstSigTyVars, tcInstType, tcInstTheta, tcInstTcType
)
import Unify ( unifyTauTy, unifyTauTyLists )
......
......@@ -17,15 +17,17 @@ module TcInstUtil (
IMP_Ubiq()
import HsSyn ( MonoBinds, Fake, InPat, Sig )
import RnHsSyn ( RenamedMonoBinds(..), RenamedSig(..),
import RnHsSyn ( SYN_IE(RenamedMonoBinds), RenamedSig(..),
RenamedInstancePragmas(..) )
import TcMonad hiding ( rnMtoTcM )
import Inst ( InstanceMapper(..) )
import Inst ( SYN_IE(InstanceMapper) )
import Bag ( bagToList )
import Class ( GenClass, GenClassOp, SYN_IE(ClassInstEnv),
classBigSig, classOps, classOpLocalType )
classBigSig, classOps, classOpLocalType,
SYN_IE(ClassOp)
)
import CoreSyn ( GenCoreExpr(..), mkValLam, mkTyApp )
import Id ( GenId, mkDictFunId, mkConstMethodId, mkSysLocal )
import MatchEnv ( nullMEnv, insertMEnv )
......
\begin{code}
interface TcLoop_1_3 1
__exports__
Outputable Outputable (..)
TcGRHSs tcGRHSsAndBinds (..)
\end{code}
\begin{code}
interface TcMLoop_1_3 1
__exports__
Outputable Outputable (..)
TcEnv TcEnv
TcEnv initEnv (..)
TcType TcMaybe
\end{code}
......@@ -13,20 +13,19 @@ IMP_Ubiq()
import HsSyn ( Match(..), GRHSsAndBinds(..), GRHS(..), InPat,
HsExpr, HsBinds, OutPat, Fake,
collectPatBinders, pprMatch )
import RnHsSyn ( RenamedMatch(..) )
import TcHsSyn ( TcIdOcc(..), TcMatch(..) )
import RnHsSyn ( SYN_IE(RenamedMatch), RnName{-instance Outputable-} )
import TcHsSyn ( TcIdOcc(..), SYN_IE(TcMatch) )
import TcMonad hiding ( rnMtoTcM )
import Inst ( Inst, LIE(..), plusLIE )
import Inst ( Inst, SYN_IE(LIE), plusLIE )
import TcEnv ( newMonoIds )
IMPORT_DELOOPER(TcLoop) ( tcGRHSsAndBinds )
import TcPat ( tcPat )
import TcType ( TcType(..), TcMaybe, zonkTcType )
import TcType ( SYN_IE(TcType), TcMaybe, zonkTcType )
import Unify ( unifyTauTy, unifyTauTyList )
import Kind ( Kind, mkTypeKind )
import Pretty
import RnHsSyn ( RnName{-instance Outputable-} )
import Type ( isTyVarTy, mkFunTy, getFunTy_maybe )
import Util
\end{code}
......
......@@ -8,11 +8,11 @@
module TcModule (
typecheckModule,
TcResults(..),
TcResultBinds(..),
TcIfaceInfo(..),
TcSpecialiseRequests(..),
TcDDumpDeriv(..)
SYN_IE(TcResults),
SYN_IE(TcResultBinds),
SYN_IE(TcIfaceInfo),
SYN_IE(TcSpecialiseRequests),
SYN_IE(TcDDumpDeriv)
) where
IMP_Ubiq(){-uitous-}
......@@ -22,8 +22,8 @@ import HsSyn ( HsModule(..), HsBinds(..), Bind, HsExpr,
SpecInstSig, DefaultDecl, Sig, Fake, InPat,
FixityDecl, IE, ImportDecl
)
import RnHsSyn ( RenamedHsModule(..), RenamedFixityDecl(..) )
import TcHsSyn ( TypecheckedHsBinds(..), TypecheckedHsExpr(..),
import RnHsSyn ( SYN_IE(RenamedHsModule), RenamedFixityDecl(..) )
import TcHsSyn ( SYN_IE(TypecheckedHsBinds), SYN_IE(TypecheckedHsExpr),
TcIdOcc(..), zonkBinds, zonkDictBinds )
import TcMonad hiding ( rnMtoTcM )
......@@ -59,7 +59,7 @@ import UniqFM ( lookupUFM_Directly, lookupWithDefaultUFM_Directly,
import Unique ( iOTyConKey, mainIdKey, mainPrimIOIdKey )
import Util
import FiniteMap ( emptyFM )
import FiniteMap ( emptyFM, FiniteMap )
tycon_specs = emptyFM
\end{code}
......
......@@ -2,7 +2,7 @@
#include "HsVersions.h"
module TcMonad(
TcM(..), NF_TcM(..), TcDown, TcEnv,
SYN_IE(TcM), SYN_IE(NF_TcM), TcDown, TcEnv,
SST_R, FSST_R,
initTc,
......@@ -28,22 +28,26 @@ module TcMonad(
rnMtoTcM,
TcError(..), TcWarning(..),
SYN_IE(TcError), SYN_IE(TcWarning),
mkTcErr, arityErr,
-- For closure
MutableVar(..), _MutableArray
SYN_IE(MutableVar),
#if __GLASGOW_HASKELL__ >= 200
GHCbase.MutableArray
#else
_MutableArray
#endif
) where
IMP_Ubiq(){-uitous-}
IMPORT_DELOOPER(TcMLoop) ( TcEnv, initEnv, TcMaybe ) -- We need the type TcEnv and an initial Env
IMPORT_DELOOPER(TcMLoop) ( TcEnv, initEnv, TcMaybe ) -- We need the type TcEnv and an initial Env
import Type ( SYN_IE(Type), GenType )
import TyVar ( SYN_IE(TyVar), GenTyVar )
import Usage ( SYN_IE(Usage), GenUsage )
import ErrUtils ( SYN_IE(Error), SYN_IE(Message), ErrCtxt(..),
SYN_IE(Warning) )
import ErrUtils ( SYN_IE(Error), SYN_IE(Message), SYN_IE(Warning) )
import SST
import RnMonad ( SYN_IE(RnM), RnDown, initRn, setExtraRn,
......@@ -55,7 +59,6 @@ import Bag ( Bag, emptyBag, isEmptyBag,
foldBag, unitBag, unionBags, snocBag )
import FiniteMap ( FiniteMap, emptyFM, isEmptyFM, keysFM{-ToDo:rm-} )
--import Outputable ( Outputable(..), NamedThing(..), ExportFlag )
import ErrUtils ( SYN_IE(Error) )
import Maybes ( MaybeErr(..) )
--import Name ( Name )
import SrcLoc ( SrcLoc, mkUnknownSrcLoc )
......@@ -79,11 +82,17 @@ type TcM s r = TcDown s -> TcEnv s -> FSST s r ()
\end{code}
\begin{code}
#if __GLASGOW_HASKELL__ >= 200
# define REAL_WORLD RealWorld
#else
# define REAL_WORLD _RealWorld
#endif
-- With a builtin polymorphic type for runSST the type for
-- initTc should use TcM s r instead of TcM RealWorld r
initTc :: UniqSupply
-> TcM _RealWorld r
-> TcM REAL_WORLD r
-> MaybeErr (r, Bag Warning)
(Bag Error, Bag Warning)
......@@ -465,7 +474,7 @@ getErrCtxt (TcDown def us loc ctxt errs) = ctxt
%~~~~~~~~~~~~~~~~~~
\begin{code}
rnMtoTcM :: RnEnv -> RnM _RealWorld a -> NF_TcM s (a, Bag Error)
rnMtoTcM :: RnEnv -> RnM REAL_WORLD a -> NF_TcM s (a, Bag Error)
rnMtoTcM rn_env rn_action down env
= readMutVarSST u_var `thenSST` \ uniq_supply ->
......
......@@ -12,10 +12,10 @@ IMP_Ubiq(){-uitous-}
import HsSyn ( PolyType(..), MonoType(..), Fake )
import RnHsSyn ( RenamedPolyType(..), RenamedMonoType(..),
RenamedContext(..), RnName(..)
RenamedContext(..), RnName(..),
isRnLocal, isRnClass, isRnTyCon
)
import TcMonad hiding ( rnMtoTcM )
import TcEnv ( tcLookupTyVar, tcLookupClass, tcLookupTyCon,
tcTyVarScope, tcTyVarScopeGivenKinds
......@@ -26,19 +26,15 @@ import TcKind ( TcKind, mkTcTypeKind, mkBoxedTypeKind,
)
import Type ( GenType, SYN_IE(Type), SYN_IE(ThetaType),
mkTyVarTy, mkTyConTy, mkFunTy, mkAppTy, mkSynTy,
mkSigmaTy
mkSigmaTy, mkDictTy
)
import TyVar ( GenTyVar, SYN_IE(TyVar) )
import Type ( mkDictTy )
import Class ( cCallishClassKeys )
import TyCon ( TyCon )
import TysWiredIn ( mkListTy, mkTupleTy )
import Unique ( Unique )
import PprStyle
import Pretty
import RnHsSyn ( isRnLocal, isRnClass, isRnTyCon,
RnName{-instance NamedThing-}
)
import Util ( zipWithEqual, panic, pprPanic{-ToDo:rm-} )
\end{code}
......
......@@ -13,17 +13,17 @@ IMP_Ubiq(){-uitous-}
import HsSyn ( InPat(..), OutPat(..), HsExpr(..), HsLit(..),
Match, HsBinds, Qualifier, PolyType,
ArithSeqInfo, Stmt, Fake )
import RnHsSyn ( RenamedPat(..) )
import TcHsSyn ( TcPat(..), TcIdOcc(..) )
import RnHsSyn ( SYN_IE(RenamedPat), RnName{-instance Outputable-} )
import TcHsSyn ( SYN_IE(TcPat), TcIdOcc(..) )
import TcMonad hiding ( rnMtoTcM )
import Inst ( Inst, OverloadedLit(..), InstOrigin(..),
emptyLIE, plusLIE, plusLIEs, LIE(..),
emptyLIE, plusLIE, plusLIEs, SYN_IE(LIE),
newMethod, newOverloadedLit
)
import TcEnv ( tcLookupGlobalValue, tcLookupGlobalValueByKey,
tcLookupLocalValueOK )
import TcType ( TcType(..), TcMaybe, newTyVarTy, newTyVarTys, tcInstId )
import TcType ( SYN_IE(TcType), TcMaybe, newTyVarTy, newTyVarTys, tcInstId )
import Unify ( unifyTauTy, unifyTauTyList, unifyTauTyLists )
import Bag ( Bag )
......@@ -34,7 +34,6 @@ import Maybes ( maybeToBool )
import PprType ( GenType, GenTyVar )
import PprStyle--ToDo:rm
import Pretty
import RnHsSyn ( RnName{-instance Outputable-} )
import Type ( splitFunTy, splitRhoTy, splitSigmaTy, mkTyVarTys,
getFunTy_maybe, maybeAppDataTyCon,
SYN_IE(Type), GenType
......
......@@ -17,7 +17,7 @@ IMP_Ubiq()
import HsSyn ( MonoBinds(..), HsExpr(..), InPat, OutPat, HsLit,
Match, HsBinds, Qualifier, PolyType, ArithSeqInfo,
GRHSsAndBinds, Stmt, Fake )
import TcHsSyn ( TcIdOcc(..), TcIdBndr(..), TcExpr(..), TcMonoBinds(..) )
import TcHsSyn ( TcIdOcc(..), SYN_IE(TcIdBndr), SYN_IE(TcExpr), SYN_IE(TcMonoBinds) )
import TcMonad hiding ( rnMtoTcM )
import Inst ( lookupInst, lookupSimpleInst,
......@@ -25,11 +25,11 @@ import Inst ( lookupInst, lookupSimpleInst,
matchesInst, instToId, instBindingRequired,
instCanBeGeneralised, newDictsAtLoc,
pprInst,
Inst(..), LIE(..), zonkLIE, emptyLIE,
Inst(..), SYN_IE(LIE), zonkLIE, emptyLIE,
plusLIE, unitLIE, consLIE, InstOrigin(..),
OverloadedLit )
import TcEnv ( tcGetGlobalTyVars )
import TcType ( TcType(..), TcTyVar(..), TcTyVarSet(..), TcMaybe, tcInstType )
import TcType ( SYN_IE(TcType), SYN_IE(TcTyVar), SYN_IE(TcTyVarSet), TcMaybe, tcInstType )
import Unify ( unifyTauTy )
import Bag ( Bag, unitBag, listToBag, foldBag, filterBag, emptyBag, bagToList,
......
......@@ -18,13 +18,13 @@ import HsSyn ( TyDecl(..), ConDecl(..), BangType(..),
import RnHsSyn ( isRnTyCon, RenamedTyDecl(..), RenamedClassDecl(..),
RnName(..){-instance Uniquable-}
)
import TcHsSyn ( TcHsBinds(..), TcIdOcc(..) )
import TcHsSyn ( SYN_IE(TcHsBinds), TcIdOcc(..) )
import TcMonad hiding ( rnMtoTcM )
import Inst ( InstanceMapper(..) )
import Inst ( SYN_IE(InstanceMapper) )
import TcClassDcl ( tcClassDecl1 )
import TcEnv ( tcExtendTyConEnv, tcExtendClassEnv,
tcTyVarScope, tcGetEnv )
tcTyVarScope )
import TcKind ( TcKind, newKindVars )
import TcTyDecls ( tcTyDecl, mkDataBinds )
......
......@@ -24,7 +24,7 @@ import RnHsSyn ( RenamedTyDecl(..), RenamedConDecl(..),
RnName{-instance Outputable-}
)
import TcHsSyn ( mkHsTyLam, mkHsDictLam, tcIdType,
TcHsBinds(..), TcIdOcc(..)
SYN_IE(TcHsBinds), TcIdOcc(..)
)
import Inst ( newDicts, InstOrigin(..), Inst )
import TcMonoType ( tcMonoTypeKind, tcMonoType, tcPolyType, tcContext )
......@@ -36,7 +36,9 @@ import TcEnv ( tcLookupTyCon, tcLookupTyVar, tcLookupClass,
import TcMonad hiding ( rnMtoTcM )
import TcKind ( TcKind, unifyKind, mkTcArrowKind, mkTcTypeKind )
import PprType ( GenClass, GenType{-instance Outputable-} )
import PprType ( GenClass, GenType{-instance Outputable-},
GenTyVar{-instance Outputable-}{-ToDo:possibly rm-}
)
import Class ( GenClass{-instance Eq-}, classInstEnv )
import Id ( mkDataCon, dataConSig, mkRecordSelId, idType,
dataConFieldLabels, dataConStrictMarks,
......@@ -59,7 +61,6 @@ import Type ( GenType, -- instances
applyTyCon, mkTyVarTys, mkForAllTys, mkFunTy,
splitFunTy, mkTyVarTy, getTyVar_maybe
)
import PprType ( GenTyVar{-instance Outputable-}{-ToDo:possibly rm-} )
import TyVar ( tyVarKind, elementOfTyVarSet, GenTyVar{-instance Eq-} )
import Unique ( Unique {- instance Eq -}, evalClassKey )
import UniqSet ( emptyUniqSet, mkUniqSet, uniqSetToList, unionManyUniqSets, SYN_IE(UniqSet) )
......
......@@ -3,17 +3,17 @@
module TcType (
TcTyVar(..),
SYN_IE(TcTyVar),
newTcTyVar,
newTyVarTy, -- Kind -> NF_TcM s (TcType s)
newTyVarTys, -- Int -> Kind -> NF_TcM s [TcType s]
TcTyVarSet(..),
SYN_IE(TcTyVarSet),
-----------------------------------------
TcType(..), TcMaybe(..),
TcTauType(..), TcThetaType(..), TcRhoType(..),
SYN_IE(TcType), TcMaybe(..),
SYN_IE(TcTauType), SYN_IE(TcThetaType), SYN_IE(TcRhoType),
-- Find the type to which a type variable is bound
tcWriteTyVar, -- :: TcTyVar s -> TcType s -> NF_TcM (TcType s)
......@@ -229,37 +229,37 @@ zonkTcTypeToType env ty
tcConvert bind_fn occ_fn env ty_to_convert
= do env ty_to_convert
= doo env ty_to_convert
where
do env (TyConTy tycon usage) = returnNF_Tc (TyConTy tycon usage)
doo env (TyConTy tycon usage) = returnNF_Tc (TyConTy tycon usage)
do env (SynTy tycon tys ty) = mapNF_Tc (do env) tys `thenNF_Tc` \ tys' ->
do env ty `thenNF_Tc` \ ty' ->
doo env (SynTy tycon tys ty) = mapNF_Tc (doo env) tys `thenNF_Tc` \ tys' ->
doo env ty `thenNF_Tc` \ ty' ->
returnNF_Tc (SynTy tycon tys' ty')
do env (FunTy arg res usage) = do env arg `thenNF_Tc` \ arg' ->
do env res `thenNF_Tc` \ res' ->
doo env (FunTy arg res usage) = doo env arg `thenNF_Tc` \ arg' ->
doo env res `thenNF_Tc` \ res' ->
returnNF_Tc (FunTy arg' res' usage)
do env (AppTy fun arg) = do env fun `thenNF_Tc` \ fun' ->
do env arg `thenNF_Tc` \ arg' ->