aws-lambda-haskell-runtime
aws-lambda-haskell-runtime copied to clipboard
add custom handlers support?
APIGatewayHandler
and ALBHandler
are very handy handlers. I'm wondering if we could write more custom handlers using the low level StandaloneLambdaHandler
?
Had a quick look at the source code it seems impossible right now. These three handlers are constructers of Handler
type. Perhaps Handler
should be a typeclass.
Thanks for reporting this!
Now that you mention it, maybe it could be done through ReaderT handler (IO a)
?
I think it could be positive to use it in a concrete way like that, instead of relying on a type class which could result in more confusing errors for newcomers