On 18/01/13 16:45, Simon Peyton-Jones wrote:
| > 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.

Looks like we should be using throwIO. Unfortunately I'm out of time right now, feel free to fix it, otherwise I'll do it next week.

Cheers,
        Simon


_______________________________________________
ghc-devs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/ghc-devs

Reply via email to