X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Ftypes%2FInstEnv.lhs;h=a6ee42e5cbb66c781c6d1ea304322baff26a9320;hb=d254a44b8392ff0a4327f1916ef921887ce78769;hp=4f36597c58633da716fe0e66013d67c2c8547267;hpb=ef3da13ba529e1f0202709bec93a2b5ba7f3e1b8;p=ghc-hetmet.git diff --git a/ghc/compiler/types/InstEnv.lhs b/ghc/compiler/types/InstEnv.lhs index 4f36597..a6ee42e 100644 --- a/ghc/compiler/types/InstEnv.lhs +++ b/ghc/compiler/types/InstEnv.lhs @@ -34,6 +34,7 @@ import UniqFM ( UniqFM, lookupWithDefaultUFM, addToUFM, emptyUFM, eltsUFM ) import Id ( idType ) import ErrUtils ( Message ) import CmdLineOpts +import Util ( notNull ) \end{code} @@ -326,7 +327,7 @@ addToInstEnv :: DynFlags addToInstEnv dflags (inst_env, errs) dfun_id -- Check first that the new instance doesn't -- conflict with another. See notes below about fundeps. - | not (null bad_fundeps) + | notNull bad_fundeps = (inst_env, fundep_err : errs) -- Bad fundeps; report the first only | otherwise @@ -426,7 +427,7 @@ badFunDeps :: ClsInstEnv -> Class badFunDeps cls_inst_env clas ins_tv_set ins_tys = [ dfun_id | fd <- fds, (tvs, tys, dfun_id) <- cls_inst_env, - not (null (checkClsFD (tvs `unionVarSet` ins_tv_set) fd clas_tvs tys ins_tys)) + notNull (checkClsFD (tvs `unionVarSet` ins_tv_set) fd clas_tvs tys ins_tys) ] where (clas_tvs, fds) = classTvsFds clas