mathiasbynens/small — pull request #11 by anders- (2012-02-19 17:12:12+00:00)
Title: Haskell examples

Not sure whether these are supposed to exit with status 0 or if it doesn’t matter, so here’s one of each.

---

haskell_loop.hs is an infinite loop (well, in GHC, it throws a NonTermination
exception instead).

haskell_term.hs is AFAICT the smallest program that terminates successfully; it
even has output! (But only because `print 0` is slightly shorter than
`return()`.)

Actually, the smallest *syntactically* valid file is empty. But in an actual
program the Main module (which a file with no module header is) has to at least
contain the `main` function. And similarly, `main=0` would be shorter but main
is expected to have the type `IO ()`.