Today's validate failures

Simon Peyton-Jones simonpj at microsoft.com
Fri Jan 18 17:45:01 CET 2013


| > In Packages we have a dflags with an error thunk in it for pkgState,
| and it's the strict evaluation of that pkgState that is changing the
| behaviour.
| 
| Whereabouts are we evaluating it?  Could we fix that instead?

That would be good.  It's here;

applyPackageFlag dflags unusable pkgs flag =
  case flag of
    ExposePackage str ->
       case selectPackages (matchingStr str) pkgs unusable of
         Left ps         -> packageFlagErr dflags flag ps
         Right (p:ps,qs) -> return (p':ps')
          where p' = p {exposed=True}
                ps' = hideAll (pkgName (sourcePackageId p)) (ps++qs)
         _ -> panic "applyPackageFlag"

etc

The call to packageFlagErr is divergent, of course, but dflags has an error thunk for the pkgState.

Simon



More information about the ghc-devs mailing list