X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fspecialise%2FSpecialise.lhs;h=006e06d15e99605149e8463bec211c4137f20b67;hb=5943a1ad1ad1296251c1576722d41df83b0c8380;hp=56aa6387d28df55db5d86e89bb35c554398b0234;hpb=80e363e77af6001acda87813c128362e746b8a4b;p=ghc-hetmet.git diff --git a/ghc/compiler/specialise/Specialise.lhs b/ghc/compiler/specialise/Specialise.lhs index 56aa638..006e06d 100644 --- a/ghc/compiler/specialise/Specialise.lhs +++ b/ghc/compiler/specialise/Specialise.lhs @@ -9,7 +9,7 @@ module Specialise ( specProgram ) where #include "HsVersions.h" import CmdLineOpts ( DynFlags, DynFlag(..) ) -import Id ( Id, idName, idType, mkUserLocal, idSpecialisation, isDataConWrapId ) +import Id ( Id, idName, idType, mkUserLocal ) import TcType ( Type, mkTyVarTy, tcSplitSigmaTy, tyVarsOfTypes, tyVarsOfTheta, isClassPred, mkForAllTys, tcCmpType @@ -787,8 +787,6 @@ specDefn subst calls (fn, rhs) | rhs_tyvars `lengthIs` n_tyvars -- Rhs of fn's defn has right number of big lambdas && rhs_bndrs `lengthAtLeast` n_dicts -- and enough dict args && notNull calls_for_me -- And there are some calls to specialise - && not (isDataConWrapId fn) -- And it's not a data con wrapper, which have - -- stupid overloading that simply discard the dictionary -- At one time I tried not specialising small functions -- but sometimes there are big functions marked INLINE @@ -1029,10 +1027,9 @@ mkCallUDs subst f args spec_tys = [mk_spec_ty tv ty | (tv, Type ty) <- tyvars `zip` args] dicts = [dict_expr | (_, dict_expr) <- theta `zip` (drop n_tyvars args)] - mk_spec_ty tyvar ty | tyvar `elemVarSet` constrained_tyvars - = Just ty - | otherwise - = Nothing + mk_spec_ty tyvar ty + | tyvar `elemVarSet` constrained_tyvars = Just ty + | otherwise = Nothing ------------------------------------------------------------ plusUDs :: UsageDetails -> UsageDetails -> UsageDetails