[Xmonad] patch: StackSet.hs edits

Brent Yorgey byorgey at gmail.com
Mon Oct 22 17:55:24 EDT 2007


>
>     [StackSet.hs: (peek): why use return when you just mean Just?  it
>     will just confuse the n00bs and return to haunt you later.  Brent
>     Yorgey <byorgey at gmail.com>**20071022190732] {
>     hunk ./StackSet.hs 314
>     -peek = with Nothing (return . focus)
>     +peek = with Nothing (Just . focus)
>     }
>
> I used return . focus here because it reads nicely :)
> After all, peek returns focus..


Ah.  Well, you can keep it if you really want. =)  It's just that I had to
stare at it for a while to convince myself that I understood what it was
doing.  Especially in juxtaposition with the previous function (which has
(Just . f)), it made me think, "wait, hmm, there must be a good reason that
this one uses return but the one above uses Just..."  It took me a while to
realize that no, there really wasn't.

-Brent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/xmonad/attachments/20071022/9e49ec3c/attachment.htm


More information about the Xmonad mailing list