Fast Haskell Scripts on GitHub Actions 1 ▲ Abhinav Sarkar 102 days ago · 12 min read2308 words · Tech · hide · Fediverse post Magix is a neat tool that lets us run Haskell programs as scripts1. We put a shebang on top mentioning Magix, list the Haskell packages we need, and ./script.hs just works. This post is about running such a script fast(er) on GitHub Actions. This post was originally published on abhinavsarkar.net. ContentsThe SetupThe ProblemThe IdeaThe BundleThe GitHub Actions WorkflowThe PayoffThe Conclusion The Setup# As our example, we’ll take the static site generator (SSG) I wrote some time ago: BlogShake. It is written as a single Haskell file. It uses Shake to build the website, Pandoc to render posts, and Mustache for templates. The script starts with these Magix directives2: #!/usr/bin/env magix #!magix haskell #!haskellPackages mustache pandoc shake feed yaml #!ghcFlags -threaded -O2 Running the script is as simple as: ./blog.hs Magix compiles the script into an executable and runs it. Nothing else to install, no cabal, or nix-shell required. Nix and Cabal can also run scripts by providing… Commenting on Bubbles has been removed. Why? If you want to talk about this post, write to the author, use the comments on their blog if it has them, or reply with a "RE:" post on your own blog. Suggestions? feedback@bubbles.town