[Xmonad] darcs patch: fix bug leading to early exit in XPrompt.

Andrea Rossato mailing_list at istitutocolli.org
Wed Aug 29 08:55:35 EDT 2007

On Tue, Aug 28, 2007 at 02:14:15PM -0400, David Roundy wrote:
> Another option would be to avoid exceptions and instead make the job return
> explicitly whether or not to continue
> eventLoop :: (EventType -> IO ContinueOrNot) -> IO ()
> data ContinueOrNot = ExitNow | KeepGoing

> But I'm not sure either of these is optimal.  Exceptions are ugly.  You
> could also (given you're in a state monad) throw a "stop now" flag into
> that state, which is perhaps better than either of these.  Then you'd only
> need to specify exitLoop (or whatever you choose to call it)...

I think exceptions are not the right solution. Instead I like the
other two and I'll study them.


More information about the Xmonad mailing list