haskellscript alternatives and similar packages
Based on the "Development" category.
Alternatively, view haskellscript alternatives based on common mentions on social networks and blogs.
-
cabal-install-parsers
Scripts and instructions for using CI services (e.g. Travis CI or Appveyor) with multiple GHC configurations -
fourmolu
A fourk of ormolu that uses four space indentation and allows arbitrary configuration. Don't like it? PRs welcome!
SaaSHub - Software Alternatives and Reviews
Do you think we are missing an alternative of haskellscript or a related project?
Popular Comparisons
README
Shell Scripting With Haskell
This tool provides the ability to script in a shell with Haskell (including dependencies) the same way that has been possible with bash scripts or Python.
Examples
Print out JSON constructed with Aeson
Lookup weather for your current IP address
Prerequisites
A sandbox capable install of Cabal.
Howto
The script falls into three main parts:
- The hashbang first line:
bash #!/usr/bin/env haskellscript
- Dependencies (potentially including versions):
bash --#aeson
- The code:
haskell {-# LANGUAGE OverloadedStrings #-} import Data.Aeson import Data.ByteString.Lazy hiding (putStrLn, unpack) import Data.Text import Data.Text.Encoding jsonExample = object ["Test" .= True, "Example" .= True] main = putStrLn $ unpack $ decodeUtf8 $ toStrict $ encode jsonExample
Note that because the dependencies specified are hashed to enable re-use it's worth specifying exact versions across multiple scripts to prevent the version used being quite old after a while.