Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You need to check syntax, or try some more basic examples first. In this case you pasted piece of code that won't work itself.

If you want to get know more about it: http://learnyouahaskell.com/syntax-in-functions



Sure, but my point is that maybe the top example should be one that'd work verbatim in the REPL, to not scare noobs like me away.


Yeah, the REPL story's a bit of a mess, but Haskellers tend to forget that.


Just to mention it here, IHaskell solves a lot of the annoyances with ghci. Easy multi-line input, don't need let in front of functions, can define modules and load them (automatically compiled), etc. I think they are working on support for template haskell too (important for experimenting with lens code etc)


Oops, I missed that. Indeed example is not REPL ready.


I totally agree with you.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: