Hell (Haskell shell): Year in Review

New blog post for the new year: Hell (Haskell shell): Year in Review

27 Likes

That was a great read, thanks!

Typo: footnote 3 is a duplicate of footnote 1.

2 Likes

On hackage, I see that the last upload for hell is in 2014. But on GitHub I see the last commit is 4 hours ago.
What am I missing?
More importantly if I wish to use this, what route would you recommend?

5 Likes

The one on Hackage is a different approach that I started on this path to scripting in Haskell, which evolved to various iterations on and off over the years on GitHub, until I arrived at this version.

At the moment it can be used from the following routes:

  • Build from the Git source via Nix flakes, cabal install, or stack.
  • Downloaded as a statically linked x86 64-bit Linux binary from the releases page. Handy for grabbing a tool for CI scripts etc. and my preferred option if you’re not on Nix, as it doesn’t have any dependencies apart from the Linux kernel.

I’ve uploaded a version to Hackage, if that’s helpful.

1 Like

Would it be possible to add type signatures (perhaps only for top-level definitions)?

What happens when a base Haskell function throws an exception?

That is helpful; now it can find its way into stackage, linux distros, brew etc.

The new version number is funny, I hope it doesn’t limit hell’s appeal… :slight_smile:

1 Like

It’s presently possible to put type annotations on variables in lambdas and lets, but not top-level names. But that’s easy to add.

When an exception is thrown by a base function it’ll produce the normal exception behavior. So functions like withTempSystemDirectory will remove the file if the inner function throws in IO, for example. Pure functions that throw will behave the same as in Haskell: lazily. Error.error exhibits this.

1 Like