theam / aws-lambda-haskell-runtime

⚡Haskell runtime for AWS Lambda
https://theam.github.io/aws-lambda-haskell-runtime/
Other
270 stars 48 forks source link

Difference to hal? #125

Open nomeata opened 1 year ago

nomeata commented 1 year ago

I’m using aws-lambda-haskell-runtime, but recently stumbled over hal, and I wonder if there are significant difference worth knowing.

At https://github.com/Nike-Inc/hal/issues/118 I asked the same, and Nathan responded, so I thought I’d crosslink, and maybe you have a different take.

Ideally maybe the respective docs can give friendly advice to users which one to pick?

NickSeagull commented 1 year ago

Hey! I was just taking a look at the other thread. Personally, I haven't tried hal in depth, and when I did it was long time ago, so cannot recall the differences really.

If it helps in your research in some way, the approach taken in the development of this library was to use the simplest language features out there to lower the entrance barrier to anyone, even if they were newcomers to Haskell. That's why docs use so much IO (Either a b) everywhere and there's little mention to custom monads and/or transformers (unless you want to configure your own handler dispatcher, but that's an advanced use case on its own)

hal seems to be much more configurable and tweakable at the lower level, but you gotta know what you're doing, while this library abstracts you from all of the details.

Both have their own tradeoffs. If you happen to have a comparison text, would love to put it in the docs and put a link to hal :)