What is the Haskell response to Node.js?

I believe the Erlang community is not envious of Node.js as it does non-blocking I/O natively and has ways to scale deployments easily to more than one processor (something not even built-in in Node.js). More details at http://journal.dedasys.com/2010/04/29/erlang-vs-node-js and Node.js or Erlang What about Haskell? Can Haskell provide some of the benefits of Node.js, namely … Read more

Comparing Haskell’s Snap and Yesod web frameworks

The two Haskell web frameworks in the news recently are Yesod (at 0.8) and Snap (at 0.4). It’s quite obvious that Yesod currently supports a lot more features than Snap. However, I can’t stand the syntax Yesod uses for its HTML, CSS and Javascript. So, I’d like to understand what I’d be missing if I … Read more

Haskell: Lists, Arrays, Vectors, Sequences

I’m learning Haskell and read a couple of articles regarding performance differences of Haskell lists and (insert your language)’s arrays. Being a learner I obviously just use lists without even thinking about performance difference. I recently started investigating and found numerous data structure libraries available in Haskell. Can someone please explain the difference between Lists, … Read more

Getting associated type synonyms with template Haskell

Can Template Haskell find out the names and/or the declarations of the associated type synonyms declared in a type class? I expected reify would do what I want, but it doesn’t seem to provide all the necessary information. It works for getting function type signatures: % ghci GHCi, version 7.8.3: http://www.haskell.org/ghc/ 😕 for help … … Read more

What’s so bad about Template Haskell?

It seems that Template Haskell is often viewed by the Haskell community as an unfortunate convenience. It’s hard to put into words exactly what I have observed in this regard, but consider these few examples Template Haskell listed under “The Ugly (but necessary)” in response to the question Which Haskell (GHC) extensions should users use/avoid? … Read more

Abusing the algebra of algebraic data types – why does this work?

The ‘algebraic’ expression for algebraic data types looks very suggestive to someone with a background in mathematics. Let me try to explain what I mean. Having defined the basic types Product • Union + Singleton X Unit 1 and using the shorthand X² for X•X and 2X for X+X et cetera, we can then define … Read more