I have to say this looks like a really convenient library!
Aside: As a Haskell beginner, I find it astonishing that 1-letter names are the norm in Haskell-land. To me, names are not just placeholders imposed on you by the language, they should convey meaning, too!
As always, parametric polymorphism necessitates one-letter names, as variables can really stand for anything at all. The compiler guarantees you can't know much (or anything) about some polymorphic variables.
Other idioms come from math, e.g. 'x' for an unknown value, and then we get 'xs' for a list of unknown values.
map :: (a -> b) -> [a] -> [b]
map f (x:xs) = f x : map f xs
It's not often discussed in polite company, but Haskell programmers are actually not Homo sapiens sapiens. They're a whole other sentient species walking invisibly among us. Their Achilles heel is the keystroke: each one like smoking a cigarette is to us (in terms of damage, not addiction). So while you and I have the luxury of calling something "connection", a Haskell programmer considers that 9 steps closer to fingertip cancer.
> However, the example code uses `c' for connection and `q' for query. Surely, knowing what those are from the variable name would be a good thing?
In this case, the example is short enough that there's no chance of confusion (for the intended audience): clearly c is a connection and q is a request. They're only used in those few lines.
However, I wouldn't say 1-letter names are the norm in typical Haskell code (outside type variables).
The first version is pretty standard Haskell. Certainly not caricatural.
For generic code, writing first:rest is not bad but it does look a bit superfluous, somewhat like writing
quotient = numerator / denominator
instead of simply x = y / z. It doesn't really give you any extra information, and for me it sort of suggests that the programmer needs to remind themselves of what the operators : and / mean.
Of course, if the code is not generic and the variables do have concrete meanings you should name them appropriately, e.g. roi = return / investment. But when we write x:xs it's typically polymorphic (or otherwise generic) code.
They should and they do. But for local variables Haskell programmers generally assert one letter adequately conveys the meaning, especially since you know the type. But the second you can't is also the second you should use more than one letter.
Io-streams looks nice, but I think I'll stay with pipes. Along with pipes-safe, it lets you for instance open resources safely inside your stream, which is a very convenient feature at times.
I like Snap, but I am still skeptic too. One of the nicer things of enumeratee, conduit, and pipes is that you can use them in pure code as well. io-streams drags in the IO monad if you want to structure code as streams, even if your 'enumerator', 'enumeratee' or 'iterator' is pure.
I think that's a design goal. The idea is to pipe IO streams and not arbitrary streams, which seems to make for a much less complicated machinery (just look at the types signatures from pipes :) ). It's a viable design choice, but it certainly has drawbacks as well.
Aside: As a Haskell beginner, I find it astonishing that 1-letter names are the norm in Haskell-land. To me, names are not just placeholders imposed on you by the language, they should convey meaning, too!