On Tue, Jan 7, 2014 at 10:23 AM, Klaus Aehlig <[email protected]> wrote:
>
> > > -readJobStatus (JobWithStat {jStat=fstat, jJob=job}) = do
> > > +readJobStatus jWS@(JobWithStat {jStat=fstat, jJob=job}) = do
> > > [...]
> > > - return . Just $ JobWithStat {jStat=fstat', jJob=job'}
> > > + return . Just $ jWS {jStat=fstat', jJob=job'}
> > >
> >
> > Consider renaming "jWS" to something more meaning full (I guess it means
> a
> > job not monitored with inotify as opposed to JobWitStat, but I think the
> > name should be clear enough to not having me to guess :)).
>
> Do you have a suggestion for a better name? "jWS" was just short for
> "JobWithStat", indicating that it is the whole object of that type. It
> may or may not have an inotify attached, but that doesn't matter for that
> function as the value is just passed through; to pass through the value I
> needed a variable for whole object, even though I'm just looking at the
> jStat and jJob fields. I was hoping that the "jWS@(JobWithStat {...})"
> construct made this clear, but apparently it didn't.
>
Hm, I see your problem. I don't really have a better suggestion, but I
would be fine in this case if you just add a comment saying what component
of JobWithStat jWS is/represents.
Cheers,
Helga