Today's validate failures

Ian Lynagh ian at well-typed.com
Wed Jan 30 02:20:27 CET 2013


On Fri, Jan 18, 2013 at 05:03:26PM +0000, Simon Marlow wrote:
> 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.

I tried that, but it didn't fix it. However, it seems like a sensible
thing to be doing anyway, so I pushed the patch. I'll do a sweep for
other places that we could/should be using throwIO.


Thanks
Ian




More information about the ghc-devs mailing list