unrelenting.technology

Hi! You are viewing the archive of unrelenting.technology. This website is no longer updated, my current one is val.packett.cool. Check it out instead :)

Webmention endpoint discovery in Haskell. Probably the best function ever written :-)

This is how I search for it in HTML.

listToMaybe $ unsafePerformIO $ runX $ htmlDoc //> hasAttrValue "rel" isWebmentionRel >>> getAttrValue "href"

Why unsafePerformIO? Because there’s no reason for HTML parsing to depend on IO, but they’ve implemented parsing strings as parsing files with the string protocol.

Published

Categories and tags

Notes #sweetroll #haskell