[xmonad] XMonad.Actions.Search parsing and a new dep

Gwern Branwen gwern0 at gmail.com
Sun Aug 9 08:16:20 EDT 2009


On Fri, Aug 7, 2009 at 8:49 PM, Don Stewart<dons at galois.com> wrote:
> spencerjanssen:
>> On Fri, Aug 07, 2009 at 08:22:08PM -0400, gwern0 at gmail.com wrote:
>> > While adding & pushing a Wiktionary function, I noticed some of the functionality that's been added to XMonad.Actions.Search since I last looked; specifically:
>> >
>> > intelligent ∷  SearchEngine →  SearchEngine
>> > intelligent (SearchEngine name site) = searchEngineF name (λs →  if (fst $ break (≡ ':') s) `elem` ["http", "https", "ftp"] then s else (site s))
>> >
>> > This, I think, is much worse than just using Network.URI.isURI ∷ String → Bool
>> >
>> > Problem is, Network.URI pulls in a network package dependency. This shouldn't be a problem as it's quite as usually installed as say process or directory, but I thought I'd ask before going ahead and adding it.
>> >
>> > --
>> > gwern
>>
>> intelligent seems like a not-very-useful function, is a network dependency
>> really worth it?
>>
>
> what about using the uri package (or ripping it out).
>
> -- Don

Well, as far as ripping it out goes, it presumably is valuable to the fellow who took the effort to code it up and then get it into XMC (Michal Trybus).

re: uri; what package is that? I don't see it on Hackage, and my ghc-pkg doesn't know it. If it's more 'lightweight' than using the URI modules in network, then I guess that'd be fine.

re: network: as I discussed with Spencer in #xmonad, I'm not sure a network dependency is a very 'heavy' dependency. Apparently it isn't bundled with GHC by default, but do we have any users of XMonadContrib who do not also have network installed, or cabal-installable?

(XMC currently depends on utf8-string and x11-xft, and those strike me as very heavyweight dependencies indeed - is the latter even pure Haskell?)

-- 
gwern
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: OpenPGP digital signature
Url : http://www.haskell.org/pipermail/xmonad/attachments/20090809/a9254890/signature.bin


More information about the xmonad mailing list