Reputation: 39380
Among other methods, there are a few most common ways to run a haskell program:
ghci
, load the file, run main by hand from shellrunhaskell file.hs
ghc file.hs && ./file
I weren't able to find, however, how to run simple code from standard input / command arguments.
For example, standard Lua interpreter will allow you to do:
$ lua -e "print (2+2)"
4
What would be an equivalent of the above for a common Haskell Platform environment?
Upvotes: 3
Views: 524