April 13, 2018

Some Haskell Notes

I call this the "fine points of Haskell", but that is quite a stretch since I am only starting to get a grasp of the language, but it will do as a poor title for now.

Hello World

You can write haskell source and then compile it. If you are more concerned with convenience that speed, you can do what I do, namely treat it like python or ruby and start your haskell source file with a "shebang" line. If you do that, the hello world program will look like this:
#!/bin/runghc
main = putStrLn "Hello, world!!"
Many or most tutorials have you use ghci, which is an interactive Haskell gizmo. Many people seem to like doing things this way, but it is important to know that this introduces some language differences.
Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org