Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

/prog/ advice series: Haskell

Name: Anonymous 2008-07-18 0:23

Dear /prog/,

I'm tired of fighting with ENTERPRISE languages. I want to learn Haskell. The question is, where do I start?

I'm not completely ignorant of programming language theory -- I read http://mitpress.mit.edu/catalog/item/default.asp?ttype=2&tid=8184 several years ago -- but the math is a bit rusty. I've tried a few Haskell ``introductions'' but they were more philosophical wanking about the beauty of monads and other abstract bullshite than an instruction on how to program in Haskell. In short, help.

Name: Anonymous 2008-07-29 5:45

>>37
In unrelated news, thanks to the monomorphism restriction η-reduction doesn't always work in Haskell.
Hurrrrrrr

Just give your function an explicit type signature (which you should be doing for all top-level values anyway) or turn the MR off (usually not a good solution).

But >>36 is right. If you're going to complain, then at least complain about real problems like the clunky record system, the stupid organization of the numeric type classes or the fact that fail is required for every Monad.

On a final note, I solve your composition problem by defining

(.:) :: (c -> d) -> (a -> b -> c) -> a -> b -> d
(.:) = (.) . (.)
infixr 9 .:


You can go further and define (.::) and so on, but I've never needed to (and I write quite a bit of Haskell).

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List