In the Haskell Weekly Newsletter today, there was a link to this article: https://www.scannedinavian.com/how-to-run-haskell-source-files-like-shell-scripts.html
In it, the author shows two ways to run Haskell source files as a script. The first using runhaskell
:
And the second using cabal
:
Beforehand, I was only aware of how to do it with stack
.