X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fcompiler%2FcodeGen%2FClosureInfo.lhs;fp=ghc%2Fcompiler%2FcodeGen%2FClosureInfo.lhs;h=86380ecaa6f071c12610b88537a05ce111a9935d;hb=17d537ba0af20a72a5bf54f01b463be05935634e;hp=2de88025d4161fdd26d74eb77495c285637804db;hpb=fc63e16fda616d34ffc93a19d1f47271d416e65a;p=ghc-hetmet.git diff --git a/ghc/compiler/codeGen/ClosureInfo.lhs b/ghc/compiler/codeGen/ClosureInfo.lhs index 2de8802..86380ec 100644 --- a/ghc/compiler/codeGen/ClosureInfo.lhs +++ b/ghc/compiler/codeGen/ClosureInfo.lhs @@ -1,7 +1,7 @@ % % (c) The GRASP/AQUA Project, Glasgow University, 1992-1998 % -% $Id: ClosureInfo.lhs,v 1.61 2003/11/17 14:23:31 simonmar Exp $ +% $Id: ClosureInfo.lhs,v 1.62 2004/03/31 15:23:17 simonmar Exp $ % \section[ClosureInfo]{Data structures which describe closures} @@ -76,7 +76,7 @@ import PrimRep import SMRep -- all of it import Type ( isUnLiftedType, Type, repType, splitTyConApp_maybe ) import TcType ( tcSplitSigmaTy ) -import TyCon ( isFunTyCon ) +import TyCon ( isFunTyCon, isAbstractTyCon ) import BasicTypes ( TopLevelFlag(..), isNotTopLevel, isTopLevel, ipNameName ) import Util ( mapAccumL, listLengthCmp, lengthIs ) import FastString @@ -241,7 +241,9 @@ mkClosureLFInfo bndr top fvs upd_flag [] might_be_a_function :: Type -> Bool might_be_a_function ty | Just (tc,_) <- splitTyConApp_maybe (repType ty), - not (isFunTyCon tc) = False + not (isFunTyCon tc) && not (isAbstractTyCon tc) = False + -- don't forget to check for abstract types, which might + -- be functions too. | otherwise = True \end{code}