> > +extraLogreasonAccess :: String
> > +extraLogreasonAccess =
> > + fromMaybe
> > +   (fail "Failed to retrieve the monitoring daemon access log")
> > +   (Runtime.daemonsExtraLogbase GanetiMond AccessLog)
> >
> 
> Maybe I'm mistaken, but shouldn't the first parameter of "fromMaybe" be of
> the same type as its result value? Here the result value is string,
> according to the signature, but the first parameter is 'fail "..."', which
> is a monadic value.

Perhaps, I should use 'error' instead of 'fail', because 'fail' will
simply return an empty list, whereas 'error' will throw an exception.

extraLogreasonAccess :: String
extraLogreasonAccess =
 fromMaybe
   (error "Failed to retrieve the monitoring daemon access log")
   (Runtime.daemonsExtraLogbase GanetiMond AccessLog)

Thanks,
Jose

Reply via email to