
On Sun, Aug 09, 2009 at 08:16:20AM -0400, Gwern Branwen wrote:
On Fri, Aug 7, 2009 at 8:49 PM, Don Stewart
wrote: spencerjanssen:
On Fri, Aug 07, 2009 at 08:22:08PM -0400, gwern0@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).
I'm guessing Don meant to rip the isURI function out of its package and paste it into the Search module with a comment saying where it came from, not ripping out the 'intelligent' function. There is a 'url' package on Hackage, not sure if that's what Don was referring to. Yes, I know URL is not the same thing as URI, but really, are we ever going to refer to a search engine by something that is a URI but not a URL? -Brent