[xmonad] Misleading documentation for XMonad.Actions.Search

Gwern Branwen gwern0 at gmail.com
Mon Mar 21 23:00:51 CET 2011


On Sun, Mar 20, 2011 at 4:54 PM, Mats Rauhala <mats.rauhala at gmail.com> wrote:
> The documentation for (!>) in XMonad.Actions.Search is misleading. The
> documentation says "> multiEngine = intelligent (wikipedia !> mathworld
> !> (prefixAware google))", but this syntax doesn't provide the expected
> behaviour.
>
> See
>
> *XMonad.Actions.Search> use (wikipedia !> hoogle !> prefixAware google)
> "hoogle:foo"
> "http://www.google.com/search?num=100&q=hoogle%3Afoo"
>
> compared to:
>
> *XMonad.Actions.Search> use (wikipedia !> (hoogle !> (prefixAware
> google))) "hoogle:foo"
> "http://www.haskell.org/hoogle/?q=foo"
>
>
> I propose changing the documentation from <snip>"intelligent (wikipedia
> !> mathworld !> (prefixAware google))"</snip> to <snip>"intelligent
> (wikipedia !> (mathworld !> (prefixAware google)))"</snip>

I never use this particular functionality (nor did I write it; Michal
Trybus apparently did), but is this *desired* behavior? I mean, adding
a infixity declaration would seem to bring the code back into
correspondence with the documentation rather than the other way
around. If you add

hunk ./XMonad/Actions/Search.hs 327
+infixr 7 !>
+

Then GHCi seems to give the documentation's results:

*XMonad.Actions.Search Control.Monad Data.Char Data.List> use
(wikipedia !> hoogle !> prefixAware google) "hoogle:foo"
Loading package X11-1.5.0.0 ... linking ... done.
Loading package utf8-string-0.3.6 ... linking ... done.
Loading package xmonad-0.10 ... linking ... done.
"http://www.haskell.org/hoogle/?q=foo"

-- 
gwern
http://www.gwern.net



More information about the xmonad mailing list