X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fcompiler%2Ftypecheck%2FTcSimplify.lhs;h=a1e987a1417697893ffb68ae8db9e27cd815c793;hb=26741ec416bae2c502ef00a2ba0e79050a32cb67;hp=c6089d007901cb4ae227e84a27b57cd62b341bf9;hpb=ae45ff0e9831a0dc862a5d68d03e355d7e323c62;p=ghc-hetmet.git diff --git a/ghc/compiler/typecheck/TcSimplify.lhs b/ghc/compiler/typecheck/TcSimplify.lhs index c6089d0..a1e987a 100644 --- a/ghc/compiler/typecheck/TcSimplify.lhs +++ b/ghc/compiler/typecheck/TcSimplify.lhs @@ -7,7 +7,7 @@ #include "HsVersions.h" module TcSimplify ( - tcSimplify, tcSimplifyAndCheck, tcSimplifyWithExtraGlobals, + tcSimplify, tcSimplifyAndCheck, tcSimplifyTop, tcSimplifyThetas, tcSimplifyCheckThetas, tcSimplifyRank2, bindInstsOfLocalFuns ) where @@ -34,22 +34,22 @@ import Unify ( unifyTauTy ) import Bag ( Bag, unitBag, listToBag, foldBag, filterBag, emptyBag, bagToList, snocBag, consBag, unionBags, isEmptyBag ) -import Class ( GenClass, Class(..), ClassInstEnv(..), +import Class ( GenClass, SYN_IE(Class), SYN_IE(ClassInstEnv), isNumericClass, isStandardClass, isCcallishClass, isSuperClassOf, classSuperDictSelId, classInstEnv ) import Id ( GenId ) -import Maybes ( expectJust, firstJust, catMaybes, seqMaybe, maybeToBool, Maybe(..) ) +import Maybes ( expectJust, firstJust, catMaybes, seqMaybe, maybeToBool ) import Outputable ( Outputable(..){-instance * []-} ) import PprStyle--ToDo:rm import PprType ( GenType, GenTyVar, GenClass{-instance Outputable;ToDo:rm-} ) import Pretty import SrcLoc ( mkUnknownSrcLoc ) import Util -import Type ( GenType, Type(..), TauType(..), mkTyVarTy, getTyVar, eqSimpleTy, +import Type ( GenType, SYN_IE(Type), SYN_IE(TauType), mkTyVarTy, getTyVar, eqSimpleTy, getTyVar_maybe ) import TysWiredIn ( intTy ) -import TyVar ( GenTyVar, GenTyVarSet(..), +import TyVar ( GenTyVar, SYN_IE(GenTyVarSet), elementOfTyVarSet, emptyTyVarSet, unionTyVarSets, isEmptyTyVarSet, tyVarSetToList ) import Unique ( Unique ) @@ -162,26 +162,6 @@ tcSimplify local_tvs wanteds tcSimpl False global_tvs local_tvs emptyBag wanteds \end{code} -@tcSimplifyWithExtraGlobals@ is just like @tcSimplify@ except that you get -to specify some extra global type variables that the simplifer will treat -as free in the environment. - -\begin{code} -tcSimplifyWithExtraGlobals - :: TcTyVarSet s -- Extra ``Global'' type variables - -> TcTyVarSet s -- ``Local'' type variables - -> LIE s -- Wanted - -> TcM s (LIE s, -- Free - [(TcIdOcc s,TcExpr s)], -- Bindings - LIE s) -- Remaining wanteds; no dups - -tcSimplifyWithExtraGlobals extra_global_tvs local_tvs wanteds - = tcGetGlobalTyVars `thenNF_Tc` \ global_tvs -> - tcSimpl False - (global_tvs `unionTyVarSets` extra_global_tvs) - local_tvs emptyBag wanteds -\end{code} - @tcSimplifyAndCheck@ is similar to the above, except that it checks that there is an empty wanted-set at the end. It may still return some of constant insts, which have to be resolved finally at the end.