Web server: how to do simple bot detection based on User Agent?

I am using snap (in combination with servant and obsidian systems `obelisk) for my web server. In snap I can get the user agent string by reading the approriate header of the request like so:

someHandler :: Snap ()
someHandler = do
    -- ...
    req <- getRequest
    mStrUserAgent <- getHeader "User-Agent" req
    case mStrUserAgent of
        Nothing  -> -- handle missing header
        Just str -> -- do something with the user agent string

For the most simple bot detection, I would then do some sort of lookup in a list of user agent strings of known bots. Does something like this exists in Haskell? My google search didn’t yield any helpful results.

Any advice regarding a starting point for this sort of simple bot detection is very welcome, as well as suggestion for a whole different approach.

I might use this API that gives me access to a huge database of user agent strings. I would call it overkill, but the service is free for less then 5000 lookups per month.