TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Haskell I/O and XPath

75 pointsby adamretterover 6 years ago

8 comments

lmmover 6 years ago
This feels like cargo culting. The point of IO isn&#x27;t the RealWorld stuff (that&#x27;s an implementation technique, and not even really true these days as IO offers all sorts of other facilities), the point is that it&#x27;s a way to get the language&#x27;s type system to help you distinguish between accidental control flow and essential control flow ( <a href="http:&#x2F;&#x2F;www.lihaoyi.com&#x2F;post&#x2F;WhatsFunctionalProgrammingAllAbout.html" rel="nofollow">http:&#x2F;&#x2F;www.lihaoyi.com&#x2F;post&#x2F;WhatsFunctionalProgrammingAllAbo...</a> ). Without the type system it&#x27;s a lot of ceremony for no benefit.
评论 #18902903 未加载
ToJansover 6 years ago
On a side note: IMHO this article contains one of the most accessible explanations I have seen about monads.
评论 #18906152 未加载
评论 #18908072 未加载
评论 #18902907 未加载
paulddraperover 6 years ago
Good post, and clever technique.<p>Site feedback: That blue bar at the top make it looks like your page hasn&#x27;t loaded. If I want to see how far I&#x27;ve read, I will just look to the right side at the scrollbar.
peteretepover 6 years ago
Aha, nice! I have wondered about doing something similar before.<p>As part of a module on XML for my MSc I decided to go maximum overkill, and created in XSLT a simple key-value lookup, a breadth-first node search algorithm, and a simple TAP-based test suite to make sure it all worked properly. Almost looked at seeing how much of the Functional Data Structures book I could cram into XSLT for my dissertation before choosing something a little less ambitious.
mark_l_watsonover 6 years ago
That is a good writeup, a fun read! I love Haskell but I tend to use a small subset of the language. This means that I am effective when working in my own Haskell projects but reading and understanding other people’s code takes time and effort.
kreetxover 6 years ago
Wow! Great article, and interesting info on Philip Wadler!
crb002over 6 years ago
It&#x27;s never a good day when I have to pull out AWK and XSLT because that&#x27;s all the server supports.
agumonkeyover 6 years ago
didn&#x27;t know Wadler was part of xquery et al .. interesting.<p>good read