ndmitchell / hoogle

Haskell API search engine
http://hoogle.haskell.org/
Other
738 stars 134 forks source link

Guard against a null list #11

Closed jwiegley closed 11 years ago

jwiegley commented 11 years ago

Neil, can you verify that I'm making the right fix here? This is something we've observed causing an exception fairly often on our site's Hoogle. Thanks!

ndmitchell commented 11 years ago

That function is still disturbingly partial, and since I haven't seen it for a while, I don't really know the argument why it is meant to be total. Clearly, if you're seeing it fail, the argument isn't very good and the fix looks reasonable. My guess would be an empty pre block or something breaking things.