Re:Functional Programming 101 with Haskell
by brandonbloom on Friday January 24, 2014 @12:19AM
(#7113458)
Since Haskell has a strong divide between compile and runtime, the REPL is this weird pseudo-runtime. It's best not to think of it like a REPL except for very simple use cases and instead think of it like a command prompt that you can evaluate some portion of Haskell in.
If you type `:help` you'll see all of the colon-commands that make up the command language. I'm not a Haskell expert, but my naive workflow tends to be a lot of usage of `:reload`. As a Lisper, I kinda feel like the colon commands should have been the default (sans colon) and one of the commands should have been `eval <haskel code>`.
Re:Functional Programming 101 with Haskell
by mercuryrising on Friday January 24, 2014 @03:55AM
(#7113981)
Check out IHaskell - https://github.com/gibiansky/IHaskell
It lets you do multiline stuff, and you get to see the output right away. You don't need let, or to repeat the "main = do ..." every time you want to run a block of code.
I think it's really helpful when you're starting out.
edit: I take your last comment as "when using the REPL, it is easier not to use the REPL." :D