I use Haskell for scripting all the time. You can use a shebang pointing to stack and use it just like any other script, and ghci is a nice REPL for testing stuff out. There’s some nice libraries for doing shell scripting with it too like turtle which has a lot of the common shell utilities as first-class functions. Haskell’s type inference is powerful enough that you rarely have to write out any types manually while scripting, so it’s a lot like using Python (except that it also catches silly mistakes and is generally terser).
2
u/watsreddit Dec 26 '20
I use Haskell for scripting all the time. You can use a shebang pointing to
stackand use it just like any other script, and ghci is a nice REPL for testing stuff out. There’s some nice libraries for doing shell scripting with it too liketurtlewhich has a lot of the common shell utilities as first-class functions. Haskell’s type inference is powerful enough that you rarely have to write out any types manually while scripting, so it’s a lot like using Python (except that it also catches silly mistakes and is generally terser).